Note: these steps are known to work on an Intel MAC running 14.7 (Sonoma)
To build, you will need to install the following dependencies - I recommend using <www.macports.org> to obtain them:</www.macports.org>
If you intend to build to use the internal webhelp (and not either a browser or the AppleHelp system) you will need
You will also need to install these tools
If you want to package an .app file and make it into a .dmg so others can install it, you will also need to install this dependency with macports, or the equivalent
Create a source library directory and clone the Mercurial repo into it (I assume you create an src directory and you put an xtrkcad directory under it
cd ~
mkdir -p src
cd src
# this is to make sure cloning into non-existant directory, skip if using a different name
rm -rf xtrkcad
# clone source from options branch or tag into xtrkcad directory, change name if desired
hg clone http://hg.code.sf.net/p/xtrkcad-fork/xtrkcad [-u "V5.3.0 GA" ] xtrkcad
Pull the branch you need if you didn't use the -u option on clone
cd ~/src/xtrkcad
hg update branch-name
cd ~
mkdir -p build/xtrkcad
mkdir -p install/xtrkcad/bin
export LIBRARY_PATH=/opt/local/lib
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=~/install/xtrkcad \
-S ~/src/xtrkcad -B ~/build/xtrkcad
cd ~/build/xtrkcad
make
make install
Remember that to run XTrackCAD on OSX, you must have XQuartz installed - see [MacInstall]. Once you have this, you can navigate to the install directory, navigate to the bin directory inside it and then just run the binary. Note: ensure the XQuartz version is compatible with the OSX version.
If you want to interactively debug, you can use LLDB, the Mac debugger.
lldb xtrkcad
>r
To package the app for distribution
cd ~/build/xtrkcad/distribution/osx/gtk-bundle
mkdir bin
mkdir share
./xtrkcad-bundler.sh -i ~/install/xtrkcad -v [version]
The TARed DMG will be in the ~/install/xtrkcad/bin folder with the name xtrkcad-OSX-[version].dmg.tar.gz