These instructions describe how to build an OS X installation package for the MoSync SDK. The completed installation package is an .dmg file, just like our featured releases and our nightly builds.
To build a full installation package that includes all the MoSync runtimes, you will need a Windows, a Mac OS X, and a Linux machine. If you want an installation package that just has the iPhone runtime, you can build the whole thing on a single OS X machine.
To be able to follow these instructions you will need to be registered as an Apple Developer. Instructions for building the MoSync SDK for Windows are also available.
To build the MoSync Eclipse IDE, the MoSync libraries, and the MoSync tools, you will need a Mac OS X Snow Leopard (OS X v. 10.6) computer capable of running Xcode.
To build the MoSync runtimes you will need:
If you only want the iPhone runtime, everything can be built on OS X.
1. Download and install Xcode 3.2.5 toolset from the iPhone Dev Center, including the iPhone SDK.
2. Download and install the 32-bit version of Fink for Snow Leopard.
3. Download and install MacPorts.
4. Download and install IceBerg for Mac OS X.
5. From the Terminal, run the following commands:
sudo fink -b install sdl sudo fink -b install sdl-image sudo fink -b install sdl-ttf sudo fink -b install sdl-sound sudo port install freeimage +universal sudo port install ImageMagick +universal sudo port install doxygen
6. Get the MoSync source code from github repository:
git clone https://github.com/MoSync/MoSync.git MoSync
7. Clone the MoSync Eclipse Repository into the same path as MoSync:
git clone https://github.com/MoSync/Eclipse.git Eclipse
8. Download the zip-package here that contains everything needed to build the Eclipse-based IDE and put it in the folder:
/MoSync/tools/ReleasePackageBuild/
9. In your checked out version of the MoSync SDK trunk, go to the folder:
/MoSync/tools/ReleasePackageBuild/
then run:
./build_mac_package.sh
10. If everything goes as it should, the script will build a .dmg installation package in the folder called /results.
11. Install the .dmg installation package on an OS X machine.
12. If required, build the Moblin runtimes on Linux.
13. If required, build the Windows Mobile, Java ME, Android, and Symbian runtimes on Windows (see Building the MoSync SDK on Windows).
14. Add the runtimes to the folder:
/Applications/MoSync/profiles
15. Done.
If you want to create an iPhone runtime to use with the Windows version of the MoSync SDK (see building the MoSync SDK for Windows ), here’s how:
1. Follow the instructions above for Preparing the Mac and Getting the MoSync Source Code. (You do not need to get Eclipse or make the MoSync package.)
2. Give your user the correct permissions to the /MoSync folder by entering the following command at the Terminal (replace user with you actual user name):
sudo chown -R user /Applications/MoSync
3. To build the MoSync base prerequisites, go to your cloned MoSync source directory and run the command:
ruby workfile.rb base
4. Now you are ready to build the iPhone runtime from source. In your checked out version of the MoSync SDK trunk do:
cd runtimes/cpp/platforms/iphone cp Classes/impl/config_platform.h.example Classes/impl/config_platform.h ruby buildLibraries.rb cp -R template $MOSYNCDIR/profiles/runtimes/iphoneos/1/
5. Find the runtime in the folder:
/Applications/MoSync/profiles/runtimes/iphoneos/1/
6. Copy it to your MoSync installation directory on your Windows computer in the folder:
\MoSync\profiles\runtimes\iphoneos\
7. Done.