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 both Windows and Linux.

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.

Testing Your Environment

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

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.38.
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 commnands:

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

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/01/07 16:38 by tstone2077
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki