Setting Up Your Programming Environment

By following the subsequent steps, you should be able to successfully compile Mira's source code. There are instructions for Linux, Mac OS X and Windows.

Linux

Please note that the provided instructions assume that your Linux distribution is Debian or Debian-based. If it is not, please install the packages using your distribution's installer.

Core Build Packages

You will need to download the following core packages (on Debian or Ubuntu, you can do so with the terminal command: sudo apt-get install PACKAGE_NAME);

  • g++
  • build-essential
  • libgtk2.0-dev

Boost

It is best to install the latest version of Boost. To do so, you will need to download the latest revision from its source code repository using Subversion. If you do not already have the Subversion client installed, please see these instructions.

Next, to download Boost, please follow the anonymous SVN checkout instructions provided by Boost's developers. To then install Boost, run the following commands from the top level of the Boost download directory:

./bootstrap.sh
sudo ./bjam install

The Mira Core Development Team is currently using Boost 1.42.
For more information regarding Boost, visit Boost.org.

Qt 4

The Qt 4 Application Development Open Source libraries can be downloaded from the Qt Software website. Visit the download page, choose LGPL / Free Downloads and download the Qt libraries for Linux/X11 package to your Desktop. Then run the following commands from a terminal window (make sure to replace the Qt version number with that of the one you downloaded):

cd ~/Desktop
tar xzvf qt-x11-opensource-src-4.5.3.tar.gz
cd qt-x11-opensource-src-4.5.3
./configure
make
sudo make install

CMake

CMake is a cross-platform Open Source build system which is used to build both Mira Client and Mira Server. To install it, download the Linux source code from CMake's website and install it with the commands:

./configure
make
sudo make install

Avahi Development Libraries

The Avahi development libraries are required to support LAN service discovery. You will need to download the following packages (on Debian or Ubuntu, you can do so with the terminal command: sudo apt-get install PACKAGE_NAME);

  • libavahi-client-dev
  • libavahi-core-dev
  • libavahi-qt4-dev

BitRock InstallBuilder

BitRock InstallBuilder is only required if you wish to configure and edit the installers for Mira Client or Server, NOT if you would like to install the applications themselves.

To install InstallBuilder, download the Enterprise version for Linux from BitRock's website. Then, in a terminal window, run:

chmod +x bitrock-installbuilder-6.3.bin
./bitrock-installbuilder-6.3.bin
And follow the instructions.

If you would like to unlock the full version, please request the Open Source licence (granted free of charge by the brilliant Sales team at BitRock) from Max Bossino on the Mira Development Mailing List.

Testing Your Environment

To test your development environment, try to download and build both Mira Client and Mira Server using the instructions found here.

Mac OS X

Please note that the provided instructions assume that you are using the latest version of Mac OS X, Snow Leopard (version 10.6).

Core Build Packages

The core build packages are included with Apple's Integrated Development Environment, Xcode. It is free to use Xcode for Mac OS X development: all you have to do is register for a free account on the Mac Dev Center, download the latest Universal binary (.dmg) installer package for Xcode and install it on your Mac.

The Mira Core Development Team is currently using Xcode 3.2.2.

Boost

Download the boost_1_42_0.tar.gz package from the Boost project's Downloads page on SourceForge: here.

Let's assume that you have downloaded the package to your ~/Downloads/ directory. Open a Terminal environment (Applications > Utilities > Terminal, in Finder) and run:

cd ~/Downloads/
tar xzvf boost_1_42_0.tar.gz
cd boost_1_42_0/
./bootstrap.sh
sudo ./bjam install

You will need to enter your password to run the final command, which installs the Boost libraries.

The Mira Core Development Team is currently using Boost 1.42.
For more information regarding Boost, visit Boost.org.
For more information on installing Boost on Mac OS X, please see the Boost Getting Started guide.

Qt 4

The easiest way of installing the Qt 4 Application Development Open Source libraries is using MacPorts.

Visit the MacPorts install page, choose to download the dmg disk image for Snow Leopard and save it to your Downloads directory. Once it has downloaded, open your Downloads directory in Finder and double-click the dmg file to install MacPorts.

When it has finished installing, run the following commands from a Terminal environment:

sudo port selfupdate
sudo port install qt4-mac

The Mira Core Development Team is currently using Qt 4.6.2.
For more information on Qt, visit Qt Centre.
For more information on using MacPorts, visit the MacPorts User Guide.

CMake

CMake is a cross-platform Open Source build system which is used to build both Mira Client and Mira Server. To install it, download the Mac OS X Universal .dmg installer from CMake's website, and run the installer. When you are prompted about installing the Command Line Links to /usr/bin/, choose to install them.

The Mira Core Development Team is currently using CMake 2.8.1.

BitRock InstallBuilder

BitRock InstallBuilder is only required if you wish to configure and edit the installers for Mira Client or Server, NOT if you would like to install the applications themselves.

To install InstallBuilder, download the Enterprise version for Mac OS x, PPC and Intel from BitRock's website. Then extract the installbuilder-enterprise-6.3.1-osx-installer.zip file and run the installer package.

If you would like to unlock the full version, please request the Open Source licence (granted free of charge by the brilliant Sales team at BitRock) from Max Bossino on the Mira Development Mailing List.

The Mira Core Development Team is currently using BitRock InstallBuilder Enterprise 6.3.1.

Testing Your Environment

To test your development environment, try to download and build both Mira Client and Mira Server using the instructions found here.

Windows

Please note that the provided instructions have only been tested on Windows XP (32 bit).

MingW

Please note that these instructions are for the manual installation of MingW. The automated installer has not been tested.

For more information regarding MingW and MSYS, visit MingW.org.

MingW can be download from its SourceForge project page.
The following packages are necessary;

  • binutils
  • gcc-core
  • gcc-g++
  • mingw-runtime
  • w32api
  • msys

The Mira Core Development Team is currently using these versions.

  • binutils-2.17.50
  • gcc-3.4.5
  • gcc-g++-3.4.5
  • mingw-runtime-3.13
  • w32api-3.10
  • msys-1.0.10

MingW Manual Installation Steps

  • Create a folder named MinGW on your hard drive. (e.g. C:\mingw)
  • Download the following packages (preferably the versions listed above in GZip format) and save them into the folder you just created;
    • binutils
    • gcc-core
    • gcc-g++
    • mingw-runtime
    • w32api
  • Extract all the packages that you downloaded into the root of the folder you just created. I suggest you extract by the release date of that package from oldest to newest since some files will be duplicates and you probably want to have the latest file available.
  • Download the MSYS installer.
  • Install MSYS. When the installation is about to finish, a DOS prompt will pop up. Follow the instructions and set up MinGW together with MSYS. At this point, you should be able to compile a simple hello world program.

Boost

Prerequisite


bjam is required to build Boost, and it is the command-line tool that drives the Boost Build system. To build Boost binaries, you'll invoke bjam from the Boost root.

bjam executable can be downloaded at here. For Windows platform, you'll need to download the bjam file that has the ntx86 suffix in the file name.

Once you have downloaded bjam and extracted the archive to a directory, you will need to change some User Environment Variables (follow this guide if you do not know how);

  • Set BJAM_HOME to the same directory using the windows style (e.g. C:\Libraries\bjam)
  • Edit the 'PATH' variable and append the following text to the end of its value: %BJAM_HOME%

Now we have bjam setup, we'll continue the installation of Boost.


It is best to install the latest version of Boost. To do so, you will need to download the latest revision from its source code repository using Subversion. If you do not already have the Subversion client installed, please see these instructions.

Next, to download Boost, please follow the anonymous SVN checkout instructions provided by Boost's developers. Once downloaded, set the environment variable BOOST_ROOT to the directory boost is in.

The Mira Core Development Team is currently using Boost trunk (1.41 didn't work, but a fix is in for the next release. As soon as 1.42 is available, it will be tested and possibly used).
For more information regarding Boost, visit Boost.org.

Assuming you've boost installed in (c:/Libraries/boost)
To build all boost libraries, you can do the following

cd ${BOOST_ROOT}
mkdir build-boost
bjam --build-dir=build-boost --toolset=gcc stage

To build only the portion of the boost libraries that Mira is currently using, you can do the following

cd ${BOOST_ROOT}
mkdir build-boost
bjam --shows-libraries
bjam --build-dir=build-boost --toolset=gcc stage --with-date_time
bjam --build-dir=build-boost --toolset=gcc stage --with-filesystem
bjam --build-dir=build-boost --toolset=gcc stage --with-function_types
bjam --build-dir=build-boost --toolset=gcc stage --with-graph
bjam --build-dir=build-boost --toolset=gcc stage --with-iostreams
bjam --build-dir=build-boost --toolset=gcc stage --with-mpi
bjam --build-dir=build-boost --toolset=gcc stage --with-program_options
bjam --build-dir=build-boost --toolset=gcc stage --with-python
bjam --build-dir=build-boost --toolset=gcc stage --with-regex
bjam --build-dir=build-boost --toolset=gcc stage --with-serialization
bjam --build-dir=build-boost --toolset=gcc stage --with-signals
bjam --build-dir=build-boost --toolset=gcc stage --with-system
bjam --build-dir=build-boost --toolset=gcc stage --with-test
bjam --build-dir=build-boost --toolset=gcc stage --with-thread
bjam --build-dir=build-boost --toolset=gcc stage --with-wave

The command ”bjam –shows-libraries” will print a list of boost libraries you can build.
The command ”bjam –build-dir=build-boost –toolset=gcc stage –with-thread” will only build the thread command. If you want to build a different library say filesystem, then you will run this command ”bjam –build-dir=build-boost –toolset=gcc stage –with-filesystem”.

Download boost asio 1.0.0 from its SourceForge project page extract the boost files and copy them to ${BOOST_ROOT}

Qt 4

The Qt 4 Application Development Open Source libraries can be downloaded from the Qt Software website. Visit the download page, choose LGPL / Free Downloads and then download and install the Qt libraries for Windows package.

NB: These instructions are untested and might be incomplete.

CMake

CMake is a cross-platform Open Source build system which is used to build both Mira Client and Mira Server. To install it, download the Windows installer from CMake's website and run it.

Avahi Development Libraries

The Avahi development libraries are required to support LAN service discovery. Instructions on installing them on Windows will be added once Mira's Avahi implementation has been tested on Windows.

BitRock InstallBuilder

BitRock InstallBuilder is only required if you wish to configure and edit the installers for Mira Client or Server, NOT if you would like to install the applications themselves.

To install InstallBuilder, download the Enterprise version for Windows from BitRock's website, and run the installer.

If you would like to unlock the full version, please request the Open Source licence (granted free of charge by the brilliant Sales team at BitRock) from Max Bossino on the Mira Development Mailing List.

Testing Your Environment

To test your development environment, try to download and build both Mira Client and Mira Server using the instructions found here.

 
development/environment_setup.txt · Last modified: 2010/05/23 12:33 by j_k9
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki