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 1.35.
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}

wxWidgets

The wxWidgets 2.8.4 installer (wxMSW-2.8.4-Setup.exe) can be downloaded from its SourceForge project page.

Once you have run the installer, you will need to change some User Environment Variables (follow this guide if you do not know how);

  • Set the 'WXWIN' variable to the wxWidgets installation directory. This should be in the msys style (e.g. /c/Libraries/wxWidgets-2.8.4).
  • Set WXWINPATH to the same directory using the windows style (C:\Libraries\wxWidgets-2.8.4)
  • Edit the 'PATH' variable and append the following text to the end of its value: ${WXWIN}\lib

Then, in MingW (MSYS, actually), run the following commands:

cd $WXWIN
mkdir buildu
cd buildu
../configure --with-msw --enable-unicode
make
cp -r lib/* ../lib
cd samples/minimal; make; ./minimal
cd ../../buildu; make install

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:

./configure
make
sudo make install

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

wxWidgets

Finally, in order to compile Mira Client's GUI you will need to install the wxWidgets development libraries. To do so, download the wxWidgets 2.8.4 package to your Desktop and then run the following commands from a terminal window:

cd ~/Desktop
tar xjvf wxWidgets-2.8.4.tar.bz2
cd wxWidgets-2.8.4
./configure --enable-unicode --with-expat=builtin
make
cd samples/minimal; make; ./minimal
cd ../../; sudo make install

Testing your environment

in msys:
cd to your mira root directory and run:
./configure --with-boost=${BOOST_ROOT}
make && make install
 
development/environment_setup.txt · Last modified: 2008/04/25 01:48 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki