[HelpOnLanguages] [TitleIndex] [WordIndex]

WindowsBuildInstructions

Install QGIS and other dependencies

Follow all the instructions at : http://wiki.qgis.org/qgiswiki/BuildingFromSource

Checkout openModeller sources and build

Create the following directory path:

c:\dev\cpp

All notes from this point forward will assume that you are working in the above directory. Also some of the pro files assume this is where your sources live so you really should use the same dir for your checked out sources. From the cmd.exe prompt type:

svn co https://openmodeller.svn.sourceforge.net/svnroot/openmodeller/trunk/openmodeller
cd openmodeller
make

The build results should now be in c:\program files\openmodeller and c:\program files\openmodeller-debug

Checkout openModeller Desktop sources

svn co https://openmodeller.svn.sourceforge.net/svnroot/openmodeller/trunk/openModellerDesktop

Create the build directory

The procedure we follow is to download the current binary installer, install it, copy the installed files to a working directory, build openModeller, copy the files into the working directory. The working directory should have the version number appended to the directory name.

copy "c:\program files\openModeller Desktop" c:\program files\openModellerDesktop1.0.5

/!\ Now Uninstall the debug setup file using the supplied uninstaller application

Create the debug versions of Qt

Note that if you have more up to date versions of any of the supplied files, you should replace the supplied ones with your more up to date ones at this point. The build processes outlined below will overwrite binaries contained in c:\temp\omgui1. These will then be repackaged to create a new setup.exe installer file.

Open the Trolltech Qt4.1 menu and choose:

For this walk through we will be building release versions.

Now copy the commands listed in the sample command prompt session below:

cd \
cd dev\cpp\om
build.bat

The compilation should run - hopefully without any errors. The build libs will be in c:\temp\omgui1

Build the openModeller Gui

Open the Qt Command prompt if its not already open

cd c:\dev\cpp\omgui1

You can edit the settings.pro file at this point if you wish to make any changes to how the build will be carried out. For example you can enable or disable the compilation of adapters and so on. Once you are happy type the following in the Command window:

qmake
make

The compilation should run - hopefully without any errors. The build libs will be in c:\temp\omgui1-debug and c:\temp\omgui1-release (it builds both debug and release versions in one go).

Create the NSIS Installer

To build the setup file you need to download NSIS and install it.

Right click on

C:\dev\cpp\omgui1\installer\omgui1.nsi

and choose 'Compile NSIS Script'. This will generate a openModellerDesktop.exe setup file in the installer directory.

Debugging

Option 1

I suggest installing "Dr. Mingw" which will attach itself to segfaulting code and give you a core dump in a window if that happens.

  http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html

The actual Dr.Mingw installer is available at:

http://ufpr.dl.sourceforge.net/sourceforge/mingw/mingw-utils-0.2.tar.gz

Extract the above tarball into your c:\MinGW directory and then from a dos command prompt do:

cd c:\mingw\bin
drmingw -i

The next time you program crashes chose the debug option on the crash handler and then a stacktrace will be displayed for you.

Option 2

You can also debug in a cygwin session using gdb.

Of course you can use both of the above approaches which is what I do.


2014-08-13 10:46