Just a guy playing with code and trains
Compiling XTrkCad from source on Mac OSX posted 04 Feb 2012 23:25 by
Well it's railway time and I'm finding that my plans are far more elaborate than ever before so I need a way of planning the layout so I can test various turnouts and track combinations before I have to start cutting track etc. No bother when there is great software out there to help you and XTrkCad is just such a great (and open source) piece of software - but why would I ever need to build it from scratch?
My problems seem to be related to 1) Apple OSX Lion changed a lot of the underlying libraries and it breaks XTrkCad and 2) I want to tweak the software and generally fix it up on Mac. So, if you are interested in this too please follow along!
sudo port install mercurial gtk2 webkit-gtk
hg clone http://xtrkcad-fork.hg.sourceforge.net:8000/hgroot/xtrkcad-fork/xtrkcad
cd xtrkcad cmake make sudo make install
You can now run the program by executing /usr/local/bin/xtrkcad on the command line. If you would like to create a more familiar looking .app bundle then you should:
make package sudo cp -r ./_CPack_Packages/Darwin/Bundle/xtrkcad-setup-4.2.0beta1-i386/XTrackCAD.app /Applications/
Now you have the latest XTrkCad on your machine you can have a little fun. If this does not work out give me a shout and I will update my docs. I hope to get the app build updated on the website soon so this is not necessary by all users of XTrkCad in OSX Lion.