|
|
On this page is described the procedures to follow if you want to download
the Train Director 3 sources to modify them and build them for your own system.
First is described the procedure for Microsoft Windows systems,
then the procedure to build on Linux systems.
In either case it's necessary to download the program's sources.
However, before one can build the sources, it's necessary to
download and build the wxWidgets run-time libraries.
wxWidgets is a very versatile collection of C++ classes that
makes very easy to create multi-platform applications that
look very nice and that have advanced functionalities.
Thanks to these libraries, the same code can be compiled
on both Windows and Linux systems without any change.
Building on Windows
To build on Windows using the project file included in the
source package is necessary to have the Microsoft Visual Studio 6
environment.
Follow this procedure:
Building on Linux
Building on Linux is a bit more complex, due to the great
variety of distributions and compiler versions available.
The executable binaries and the libraries available on
this site were compiled on a Red Hat Enterprise Linux 3
system, using the gcc 3.2.6 compiler and the Gnome environment.
Unfortunately such configuration may not be compatible with
more recent systems, such as Fedora Core 6.
Specific instructions to compile on Ubuntu 7
are available.
If you need to re-build the binaries, follow this procedure:
- Download the wxWidgets 2.8.0 library from the site
http://www.wxwidgets.org/download.
Install the sources in any directory. Personally I use
the directory /home/gcaprino/wxWidgets-2.8.0.
- In that directory, run the following commands:
$ ./configure --with-libpng --with-libjpeg --with-libxpm \
--with-gnomeprint --with-regex --with-zlib
$ make
This will build the dynamic libraries that will be
linked by Train Director 3.
-
Download the Train Director 3
sources, and unzip them in any directory.
Personally, I put the Train Director 3 sources in the
directory ~/traindir3. For example:
$ mkdir ~/traindir3
$ cd ~/traindir3
$ unzip -a tdir35src.zip
$ mkdir objs
-
At this point, you need to modify the Makefile.fc9
and specify where you compiled the wxWidgets libraries.
Change the following lines in the Train Director Makefile.fc9:
top_srcdir = /home/gcaprino/wxWidgets-2.8.0
top_builddir = /home/gcaprino/wxWidgets-2.8.0
...
CXXFLAGS = -O2 -pthread -Wall -Wundef Wno-ctor-dtor-privacy
...
WX_RELEASE = 2.8
- It is now possible to compile Train Director 3 by
simply typing:
$ make -f Makefile.fc9
Note that the build will produce many "warnings".
The main reason for this is that the major part
ot Train Director sources are still written in C
(like the versions before 3), and several sources
were simply renamed with the .cpp extension.
- At the end of the build you should get
a traindir3 executable file.
Run the executable file to start Train Director 3.
As already mentioned, I cannot guarantee that this
procedure will work with all distributions and compiler
combinations.
If you have any additions or corrections, send me
the updated files and I will update the site.
Compiling for Mac OS X
The instructions to compile for Mac OS X are basically the same as the
instructions to compile for Linux systems. The only difference is that you
should modify the file
Makefile.mac. The structure of this file is
the same as that of the corresponding Makefile.fc9, so you can just follow the
instructions in the previous chapter to modify and compile.
Compiling on Linux Ubuntu 7
The Train Director use ASCII strings, while
many distributions, including Ubuntu, install
by default the wxWidget libraries compiled
in Unicode mode.
In this case it's probable that upon execution
of Train Director, the program will crash immediately.
It is therefore indispensible to download the appropriate
wxWidgets libraries with ASCII support.
Perform the following steps:
This page is maintained by g_caprino@gmail.com
(Remove the '_' before sending your message.)
Created on: January 4, 2007
|
|