Building the code
First, you'll want to grab the source for mchelper. You can do this either by
- grabbing the latest code or a tag from the SVN repository, or
- downloading a .zip archive of the source for the last release.
To checkout a copy of the latest source via SVN, you'll issue a command like
svn co https://makingthings.svn.sourceforge.net/svnroot/makingthings/mchelper/trunk
As with most projects, development is done in the trunk and release snapshots are kept in tags. The trunk will always be the most up to date, but that can mean that there might be a bug or two...
Browse the .zip mchelper downloads on the Make Controller SourceForge page here.
Windows
To add...
- setting up the workspace
- adding qmake as an external tool
OS X
Trolltech has made it extra easy to work with Qt apps on OS X by providing a simple way to generate Xcode projects for a group of files. This is what I've done, and it's worked great. To do this, in the Terminal:# head to wherever you downloaded the mchelper source to
cd /path/to/mchelper/source
# build the Xcode project
qmake -spec macx-xcode mchelper.pro
Because mchelper on OS X uses the Sparkle auto-update framework, there are a few extra steps:
- drag Sparkle.framework from resources/osx/Sparkle-1.1 to the Frameworks group in your Xcode project
- add a new "copy files" build phase to copy Sparkle into mchelper. To do this, right-click on mchelper in the Targets groups and select "new build phase", and then "copy files build phase". Select Frameworks as the destination, and then drag Sparkle.framework from within the Xcode project into mchelper's new build phase.
- enable the carbon_cocoa.m file in the source group by clicking in the empty little box all the way on the right, and right-click on McHelperWindow.cpp and select Get Info. In the Filetype dropdown, select sourcecode.cpp.objcpp. This allows Qt's Carbon-based code to link with Sparkle's Cocoa-based code.
Note that any time you add files to the project, you'll need to also add them to the project file mchelper.pro and regenerate the Xcode project (yes, this is a drag).
To build on linux....
setenv PATH /path/to/qt/:${PATH}
setenv QMAKESPEC linux-g++-64
qmake
make
you might need to use a QMAKESPEC of linux-g++ on 32 bit systems.
"/path/to/qt" should be the root of the QT installation. (so that the path to moc is /path/to/qt/bin/moc)