In the following article, I will describe how I install BlitzMax on OS X Leopard from the official Blitz Research Limited Subversion (short: SVN) repositories. According to Wikipedia, “a repository is a place where data or specimens are stored and maintained for future retrieval.” The repository that we are interested in here is the storage where the BRL developers store their most recent versions of the BlitzMax development package. It contains the latest bug fixes and newest features, and it is much more frequently updated than official BlitzMax releases are shipped. So there are very good reasons to prefer SVN ‘checkouts’ over the regular distribution.
Since no BlitzMax installation is complete without Bruce A. “Brucey” Henderson’s popular collection of BlitzMax modules, we will also those via SVN from the Google Code archive. Unfortunately, not all of his great modules have made it to the Google Code archives yet, so you should also check his webpage for the remaining modules. The URL is http://www.brucey.net/programming/blitz/index.php.
Before we start, you need to either download and install Apple’s Xcode developer tools from developer.apple.com or you install the version that is on the OS X Leopard installation DVD.
You will also need a software tool called “SCPlugin” from Tigris.org. SCPlugin is for the Mac what TortoiseSVN is for Microsoft Windows: A GUI front-end to Subversion that integrates into Finder’s context menus (where TortoiseSVN does the same in Windows Explorer).
SCPlugin installation files can be downloaded from the project’s “documents & files” page. The URL is http://scplugin.tigris.org/servlets/ProjectDocumentList.
Once SCPlugin is installed, create an empty folder for your BlitzMax installation. I always name my folder “BlitzMax” and put it in the /Applications folder.
Then, right-click (or Ctrl-click) on the new BlitzMax folder and enter the “More” submenu, select “Subversion” and then “Checkout”. This will lead to this dialog window:

In “Repository URL:”, provide the full URL to the main BRL development repository. This URL is:
- http://blitzbasic.com:81/svn/blitzmax/dev/main
You will also need to provide the credentials that BRL has assigned to your user account with them. The very same username and password that you use for downloading official product releases or that you use to access the BRL discussion forum will also work here. Do not use anonymous access for the SVN repository, it won’t work.
Once you have entered your credentials, click on “Checkout”. When everything works well, you will see a screen like this:

Confirm it with clicking on “OK”.
This was only the beginning, and there are more folders in the repository that you need to checkout to complete your BlitzMax installation. Namely, these are the folders “bin”, “lib”, “samples” and, if you have purchased a license for it as well, MaxGUI.Depending on the CPU of your Mac, you will either need to checkout the PowerPC or the Intel version of BlitzMax.
The PowerPC versions are stored here:
http://blitzbasic.com:81/svn/blitzmax/dev/macos_ppc/bin
http://blitzbasic.com:81/svn/blitzmax/dev/macos_ppc/lib
The Intel versions are located here:
http://blitzbasic.com:81/svn/blitzmax/dev/macos_x86/bin
http://blitzbasic.com:81/svn/blitzmax/dev/macos_x86/lib
To checkout the “lib” folder of your BlitzMax installation, right-click (or Ctrl-click) on your BlitzMax folder again and once more go to “More/Subversion/Checkout”.

Enter the URL to the lib folder matching your CPU architecture and make sure that you checkout the files to a subfolder named “lib”. In our example, the files will be stored in /Applications/BlitzMax/lib. Again, you also have to enter your BRL username and password.
Now do the same for the “bin” folder. Following our example, you will want to store the files to /Applications/BlitzMax/bin.
Then, you might want to checkout the sample games and code that comes with BlitzMax. Checkout http://blitzbasic.com:81/svn/blitzmax/dev/samples to /Applications/BlitzMax/samples.
If you own MaxGUI, you want to check it out from http://blitzbasic.com:81/svn/maxgui/dev/maxgui.mod to /Applications/BlitzMax/mod/maxgui.mod as shown in this dialog:

Now Brucey’s modules are checked out from http://maxmods.googlecode.com/svn/trunk to /Applications/BlitzMax/mod/bah.mod. And this time, we use anonymous access:

This will also checkout at least two trouble makers: The MySQL module and a module names xlwriter.mod. The MySQL module won’t compile unless you install the header files from a MySQL installation. If you don’t have those and if you don’t necessarily want to access a MySQL database from a BlitzMax application, my advice is to delete the folder dbmysql.mod in /Applications/BlitzMax/mod/bah.mod. xlwriter.mod won’t work without a wxMax installation; for now, I also recommend deleting the the xlwriter.mod folder.
I will not go into the installation of Brucey’s exhaustive wxMax module, which at the time of this writing has not yet officially reached release status, but still is in late beta stage. You will find more details on the official Google Code page. But in any case, the URL to the wxMax.mod SVN repository is http://wxmax.googlecode.com/svn/trunk/wx.mod. Again, anonymous access will do. But in order to get it to work, you will have to download a collection of wxWidgets files and headers. Really, follow the official instructions on http://code.google.com/p/wxmax/wiki/SetupAndInstallation.
To finalize the setup from SVN and to get BlitzMax working, open a Terminal window (the OS X terminal application is in /Applications/Utilities) and type the following commands:
cd /Applications/BlitzMax/bin
./bmk makemods
This will build all modules that you’ve just downloaded from the repository. It is a long procedure and will take a while, but it is a mandatory step - BlitzMax won’t work without it.
If you are new to the command prompt, or shell, as it’s usually called in the Unix-world: You can use auto-completion by pressing that TAB key. For example, if you type in cd /App and press TAB, it will auto-complete to cd /Applications. Then you can add /Bli and press TAB again and you will see cd /Applications/BlitzMax in the command line. This feature can safe you a lot of typing.
You will also want to build the documentation. Still in Terminal and in the /Applications/BlitzMax/bin directory, type in the following command:
./docmods
Now there is one culprit left for us to install: MaxIDE. The problem here is that no MaxIDE application binary is stored in the repository (only the source code), so we have to get it from somewhere else. The recommended procedure is to copy it from an existing BlitzMax installation. That certainly is a valid and easy option, but we will compile an own version from the checked out source code instead.
In Terminal, type these commands:
cd /Applications/BlitzMax/src/maxide
../../bin/bmk makeapp -t gui maxide.bmx
This will create an application bundle with the name maxide.app. You can close Terminal now and open Finder. Move maxide.app from /Applications/BlitzMax/src/maxide to /Applications/BlitzMax. For convenience, you should also create a link in the dock for MaxIDE by simply dragging its application icon from Finder to the dock. Launch MaxIDE. Strangely enough, it will want to rebuild the documentation on the first start. Simply confirm this request.
Congratulations, that’s it! You now have a working BlitzMax installation from the SVN repositories!
To keep the installation updated, you can simply right-click (or Ctrl-click) on the folders and select “More/Subversion Update”.