Personal tools
You are here: Home Documentation Tutorials Building mchelper Building the code
Document Actions

Building the code

Set up your desktop environment to work on mchelper.
How to build mchelper (Make Controller Helper) from source.
Page 2 of 2.

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

I've used Eclipse as an IDE for Qt apps and it's worked quite nicely. There's a little bit of monkeying involved to set it up, however, so be prepared.

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).

Linux/Other

KDevelop is a pretty popular IDE for Qt projects, but I haven't used it too much.  If anybody has any specific recommendations, please let me know...
 

To build on linux....

Posted by Erin Tomson at 2008-05-01 16:51
To build this on linux, I needed to do the following:

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)