SDK Tools Guides


Building the MoSync SDK for Windows

These instructions describe how to build a Windows installation package for the MoSync SDK. The completed installation package is an .exe file, just like our featured releases and our nightly builds.

To build the full installation package, you will need a Windows machine, a Mac OS X machine, and a Linux machine. If you omit the iPhone and Moblin runtimes, you can build a partial package on just the Windows machine.

(Instructions for building the MoSync SDK from source on OS X are also available.)

Hardware and OS Requirements

To build the MoSync Eclipse IDE, the MoSync libraries, and the MoSync tools, you will need a computer running Windows (Windows XP, Windows Vista, or Windows 7) and capable of running Visual Studio C++ 2005.

To build the MoSync runtimes you will need:

  • For the Java ME, Android, Symbian, and Windows Mobile runtimes, your Windows computer.
  • For the iPhone runtime, a Mac running Snow Leopard (OS X v. 10.6).
  • For the Moblin runtime, a Linux computer running the i386 version of Ubuntu.

If you don’t need the iPhone and Moblin runtimes, everything can be built on the Windows machine.

Getting the MoSync Source Code

1. Download the source tarball (.tar.bz2) of our current feature release from our website or from our open-source project repository:

Alternatively, get the source tarball for our latest nightly build from our website:

or through Git:

git clone c:\mb\MoSync-trunk
git clone c:\mb\Eclipse

2. Unpack the source tarball into (or, if you have installed TortoiseGit, check it out to):


Getting Eclipse

3. Download which contains everything needed to build the Eclipse-based IDE. Put the zip-file in:


Installing the Dependencies

Important! Make sure you install and configure the dependencies in the order listed below. If you do not, terrible things may happen!

Visual Studio C++ 2005

4. Download and install Microsoft® Visual Studio® 2005 and apply Service Pack 1. Make sure that you install the runtime MT (Multi Threaded) DLL.

5. Add the following paths to Visual Studio:

  • To the end of the list at Tools > Options > Projects and Solutions > VC ++ Directories > Include Files add:
  • To Tools > Options > Projects and Solutions > VC ++ Directories > Library Files add:

6. Find the file:


Copy it to the directory:

C:\Program Files\Microsoft Visual Studio 8\VC\include\

Visual Studio SDKs

7. Download and install the following Visual Studio SDKs:

8. Find the files:

C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Include\Armv4i\gdiplus*.h 

Copy them to:


C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\Smartphone2003\Include\


9. Download and install the Ruby 1.8 (or later).

10. Download Sqlite 3 for Ruby 1.8 and put it in your ruby\bin directory. (If you have installed a later version of Ruby you'll have to find another version of the Sqlite 3 dll.)

11. Install Sqlite 3 Ruby Gem by opening a command (cmd) window and entering:

gem install sqlite3-ruby

12. Accept the installation of dependencies. These are the ones you need:

  • hoe
  • rake-compiler
  • mocha
  • rake
  • rubyforge

Java SE Development Kit (JDK) 1.6

13. Download and install Java SE Development Kit (JDK) 1.6.

14. Make sure the JDK’s \bin directory has been added to Window’s list of path environment variables, otherwise add it.

SonyEricsson J2ME SDK

15. Download and install the latest version of the SonyEricsson SDK for the Java ME Platform.

16. Download and install the ProGuard 3.7 Java obfuscator.

17. Put  the file proguard.jar in the \OnDeviceDebug\bin directory of the J2ME SDK.

Symbian Series 60 SDK

18.  Download and install ActiverPerl 5.8 Community Edition .

19. Download and install S60 3rd Edition SDK for Symbian OS FP1.

20. Download and install the Extensions plug-in for S60 3rd Edition SDK for Symbian OS, for C++, MR.
21. Download and install S60 2nd Edition SDK for Symbian OS FP3. If the installer asks you which network adapter to use, pick any.
22. Download and install S60 5th Edition SDK for Symbian OS. Make sure you install it in the folder \Symbian\s60v5\, as that is the location that is assumed by our build scripts.
23. Download the Extensions Plug-in for S60 3rd Edition SDK for Symbian OS, for C++, supporting Feature Pack 1, v2.5. Install it in both 3rd and 5th edition SDKs.
24. Download and unzip Install it over the s60v5 SDK.
25. Download and unzip Install it over the s60v2 SDK, located in the folder:


26. For both 3rd and 5th edition SDKs, run CSL Toolchain (GCCE) Install, found on the Start menu, under:

\S60 Developer Tools\* Edition SDK\v1.0\Tools

27. For each Symbian SDK, make sure that the following folder exists:


Sometimes, this folder is a file, or does not exist at all, and in both cases this would cause the build to fail.

 28. For both 3rd and 5th edition SDKs, find line 31 in the file \epoc32\tools\

die "EPOCROOT environment variable must be capitalised\n" if (!$found);

29. Disable this line by adding a hash sign (#) in front of it.

GNU binutils

30. Download and install CoreUtils for Windows.

31. Download and install Grep for Windows.

32. Download and install Sed for Windows.

33. Make sure the \bin directory of GNU binutils has been added to Window’s list of path environment variables, otherwise add it.

Building the SDK

34. If required, build the Moblin runtimes on Linux.

35. If required, build the iPhone runtime on Mac OS X.

(You do not need to build the Windows Mobile,  Java ME, Android, and Symbian runtimes, they are automatically built by the build script).

36. Locate the file run.bat.example in \mb\mosync-trunk\trunk\tools\ReleasePackageBuild, copy it, and name the copy run.bat.

37. Replace the SDK path in run.bat with one appropriate for your system:

start /B /BELOWNORMAL build_package.bat c:\SonyEricsson\JavaME_SDK_CLDC\OnDeviceDebug\ 2>&1 | tee log.txt

38. Start run_commercial_recompiler.bat. It will set up an environment, then call your run.bat (found in the \mb\mosync-trunk\tools\ReleasePackageBuild folder). You can use one of the other run_*.bat files to build the package in different ways.

If all goes well, an installer package should appear in \mb\MoSyncReleasePackage\.
It will be called something like MoSyncSetup_XXX.exe.

39. Done.


Building Runtimes for the MoSync SDK on OS X

If you want to create the Windows Mobile,  Java ME, Android, and Symbian runtimes to use with the OS X version of the MoSync SDK (see building the MoSync SDK from source on OS X), here’s how:

1. Follow the instructions above for Getting the MoSync Source Code and Installing the Dependencies.  (You do not need to get Eclipse or build the SDK.)

2. Run the following command from the command line to set the target MoSync Directory:

set MOSYNCDIR=\mb\MoSyncReleasePackage

3. Go to  the folder


and run the following command:

ruby workfile.rb base

4. Go to


and run the following command:

ruby ConcurrentBuild.rb \mb\MoSyncReleasePackage \mb\MoSync-trunk android javame wm s60

The script will build your runtimes and put them in the \profiles folder under \mb\MoSyncReleasePackage .

5. Copy the runtimes to your mac installation folder and you can start using them on your Mac OS X version.

6. Done.

MoSync SDK 3.3
Copyright © 2013 MoSync AB