OpenBUGS on Mac OS X

OpenBUGS can be installed on computers running Mac OS X as follows:

  1. Install Homebrew, which makes the installation of any other programs on your Mac quite easy!
  2. Install Wine by opening Terminal and typing the following command:
    • brew install wine
  3. Next, download the Windows version of OpenBUGS here (e.g.: file OpenBUGS323setup.exe depending on the current version)
  4. Still in Terminal, go to the directory where the file was downloaded and type:
    • wine OpenBUGS323setup.exe
  5. OpenBUGS is now installed and ready to be used! You can run it by typing:
    • wine ~/.wine/drive_c/Program\ Files/OpenBUGS/OpenBUGS323/OpenBUGS.exe
    • Note the syntax: wine <directory where OpenBUGS was installed/OpenBUGS.exe>

Creating an alias to run OpenBUGS

The syntax to run OpenBUGS can be quite long, as shown in (5) above. This is because of the location of the OpenBUGS file in your Wine directory. To avoid having to type that long syntax every time, you can create an alias in Terminal. For instance, every time you type 'openbugs', then the program opens automatically. To create the alias, type the following in Terminal:

  • cd ~
  • vim .profile

Then you can edit the .profile file using vim. Add the following line to your .profile:

alias openbugs='wine /Users/<yourusername>/.wine/drive_c/Program\ Files/OpenBUGS/OpenBUGS323/OpenBUGS.exe'

Make sure you write your user name where it says <yourusername> above. Also, don't forget to check that the file is located in that directory. If not, use the correct directory in your computer. Then after you add that line, save the file and quit vim. Then, on Terminal type:

  • source .profile
  • openbugs

The program OpenBUGS will open automatically!

Troubleshooting

Homebrew may complain that Wine cannot be installed because some libraries could not be found. If that happens, try the following:

  • brew update

Then try to install Wine again.