Introduction
This document describes how to compile and install gpsim on WIN32 platforms.
Gpsim can be compiled in a CLI - command line interface mode (no gui), or in GUI - graphical user interface mode.
Which tools are required, where to get them
Native WIN32 gpsim port can be compiled with
- MinGW gcc toolchain using makefile.mingw make files
- Cygwin MinGW gcc toolchain using makefile.mingw make files ("Official" builds)
or with
- Microsoft Visual Studio 2010 using Visual Studio project files
Some additional GNU tools are required to build gpsim:
- bison (or some other yacc compatible parser generator)
- flex (or some other lex compatible lexical analyzer generator). The recommended flex version is 2.5.4.
- gawk (or some other awk compatible interpreter)
- GNU make for MinGW compilation
The recommended installation for bison, flex and gawk is from Cygwin environment.
The other possibility is to use nativeWIN32 ports of bison, flex and
gawk, which are part of UnxUtils
project and GnuWin32 project.
Cygwin environment is required (or at least recommended) for WIN32 native compilation of additional packages.
How to set up development environment for WIN32 port of gpsim
Cygwin installation:
In the Devel Category select bison, flex, gawk, make, gcc, gcc-g++, mingw-gcc-core, mingw-gcc-g++, mingw-binutils, mingw-w32api, mingw-runtime packages.
You have to have C:\cygwin\bin specified in the PATH environment variable.
Which additional packages are required, where to get them, how to to install them
Common packages used by CLI (supported only by Visual Studio compilation) and GUI:
The CLI and GUI WIN32 versions of gpsim require 2 common packages: popt and glib.
- popt is a command line option parsing library.
- The Visual Studio build requires popt packages from GnuWin32 project.
The following packages are required:
- The MinGW build requires popt packages from GTK+ project.
The following packages are required:
- glib is the low-level core library that forms the basis for projects such as GTK+ and GNOME.
The WIN32 port of glib package is a part of The GTK+ Project.
The latest version of developer, runtime and source packages can be found at
GTK+ - Download for Windows.
GUI:
The GUI WIN32 version of gpsim requires the following additional packages, in addition to packages mentioned in the CLI section:
- readline - The Readline library provides a set of functions for use by applications that allow
users to edit command lines as they are typed in.
- gtkextra-2 - GtkExtra is a useful set of widgets for creating GUI's for the Xwindows system
using GTK+. You can use it complementary to GTK+ and it is written in C. It is also Free Software and released under the LGPL license.
- pthreads - The pthreads-win32 package implements Posix Threads on Win32. Note, pthreads are currently
used only in modules and in particular in the usart module.
- pthreads-w32-*-release.zip: sources, header files, static libraries and DLLs, required for gpsim modules development and by gpsim modules runtime.
The WIN32 ports of following packages are a part of
The GTK+ Project. The latest version of developer, runtime and source packages can be found at
GTK+ - Download for Windows.
- gtk - GTK+ is a multi-platform toolkit for creating graphical user interfaces.
- pango - Pango is a library for layout and rendering of text, with an emphasis on
internationalization. It forms the core of text and font handling for GTK+-2.0.
- atk - The ATK library provides a set of interfaces for accessibility.
- gdk-pixbuf - The GDK-PixBuf library.
- cairo - Cairo is a 2D graphics library with support for multiple output devices.
- expat - The Expat XML Parsers: Expat is an XML parser library written in C.
- PNG - Portable Network Graphics: An Open, Extensible Image Format with Lossless Compression
Setting up the development environment
- Create the gpsim_proj directory for the complete gpsim project
- Create the gpsim subdirectory for the gpsim package and download the latest gpsim version from Subversion
CLI (supported only by Visual Studio compilation):
- Create the readline subdirectory and extract readline-*-lib.zip into it
- For Visual Studio build:
For MinGW build:
- Create the glib subdirectory and extract glib-dev_*_win32.zip into it
- For the development of CLI mode, only header files from glib package are required. The only functionality needed from the
library for the command line mode is slist (Singly-Linked Lists), which is currently replaced with the implementation in plat/win32/glist.cpp.
- For the development of GUI mode, the complete glib library is required.
- Double-click on gpsim.sln to start the Microsoft Visual Studio 2010, select Debug or Release solution configuration and rebuild the solution.
GUI:
- Execute steps, described in previous CLI section
- Create the gtk+ subdirectory and extract gtk+-dev_*_win32.zip into it
- Create the pango subdirectory and extract pango-dev_*_win32.zip into it
- Create the atk subdirectory and extract atk-dev_*_win32.zip into it
- Create the cairo subdirectory and extract cairo-dev-*.zip into it
- Create the gdk-pixbuf subdirectory and extract gdk-pixbuf-dev_*_win32.zip into it
- Create the fontconfig subdirectory and extract fontconfig-dev-*.zip into it
- Create the gtkextra-2 subdirectory and extract gtk+extra-*-dev.zip into it
- Create the pthreads subdirectory and extract pthreads-w32-*-release.zip and copy the contents of the Pre-built.2 directory into it
- Compile gpsim native WIN32 port:
- Go to the gpsim subdirectory and execute
make -f makefile.mingw
- For Visual Studio 2010 compilation double-click on gpsim.sln to start the Microsoft Visual Studio, select Debug GUI or Release GUI solution configuration and rebuild the solution.
gpsim_proj
|
+- gpsim
+- readline
+- popt
+- popt-1.8.1
+- glib
+- gtk+
+- pango
+- atk
+- gdk-pixbuf
+- cairo
+- fontconfig
+- gtkextra-2
+- pthreads (for modules).
Setting up the runtime
CLI:
- For Visual Studio build:
- Extract bin\popt1.dll from popt-*-bin.zip package to the same directory where gpsim.exe resides.
- Extract bin\libintl-2.dll and bin\libiconv-2.dll from popt-*-dep.zip package to the same directory where gpsim.exe resides.
For MinGW build:
- Copy libstdc++-6.dll and libgcc_s_dw2-1.dll from Cygwin installation at usr\i686-pc-mingw32\sys-root\mingw\bin to the same directory where gpsim.exe resides.
- Extract bin\libpopt-0.dll from popt-*-tml-*.zip package to the same directory where gpsim.exe resides.
- Extract bun\readline5.dll from readline-*-bin.zip package to the same directory where gpsim.exe resides.
GUI:
- Extract bin\libgio-2.0-0.dll, bin\libglib-2.0-0.dll, bin\libgobject-2.0-0.dll and bin\libgmodule-2.0-0.dll from glib_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\freetype6.dll from freetype_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\zlib1.dll from zlib_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\iconv.dll from libiconv-*.bin.woe32.zip package to the same directory where gpsim.exe resides.
- Extract bin\intl.dll from gettext-runtime_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract everything in bin directory, complete etc and complete lib directory from gtk+_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\libpango-1.0-0.dll, bin\libpangowin32-1.0-0.dll and bin\libpangocairo-1.0-0.dll, complete etc and complete lib directory from pango_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\libatk-1.0-0.dll from atk_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\libgdk_pixbuf-2.0-0.dll from gdk-pixbuf_*_win32.zip package to the same directory where gpsim.exe resides.
- Extract bin\cairo-2.dll from cairo-*.zip package to the same directory where gpsim.exe resides.
- Extract bin\libpng12-0.dll from libpng-*.zip package to the same directory where gpsim.exe resides.
- Extract bin\gtkextra-win32-2.1.dll from gtk+extra-*-dev.zip package to the same directory where gpsim.exe resides.
Modules:
- Unpack pthreads-w32-*-release.zip self extracting archive to some directory and copy file
- For Visual Studio build:
- Pre-built.2\dll\x86\pthreadVC2.dll
For MinGW build:
- Pre-built.2\dll\x86\pthreadGC2.dll
to the same directory where gpsim.exe resides.
gpsimWin32 snapshot builds
gpsimWin32 snapshot builds can be found at http://sourceforge.net/projects/gpsim/files/snapshot_builds/gpsim-win32.
Document status
If you have questions / comments / other experiences about WIN32 gpsim port, post them to the gnupic mailing list: gnupic@linuxhacker.org.
Package versions
Packages from GnuWin32 project:
Packages from GTK+ - Download for Windows:
Other packages:
OldCigarettes Windows 2000 XP API Wrapper Pack (OCW):
Last update: $Date: 2013-08-16 13:39:26 +0200 (Fri, 16 Aug 2013) $ by Borut Ražem