Tutorials
Windows Build Instructions for QTViewer
Prerequisties
To build the QTViewer application on Windows 7 it is assumed that Steps 1–12 of the Ubuntu tutorial are finished and a virtual machine with Visual Studio 2010 has been setup.
Qt
- Download Qt
- ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.zip
- Unzip the source archive.
- Right-click at it and choose “Extract all”.
- Compile Qt
- Open a MSVC command prompt via
- Programs → MSVC → Tools → MSVC Command Prompt
- Change directory (cd) to the Qt directory.
- Configure Qt
configure -platform win32-msvc2010 -opengl desktop -release -static -no-libpng -no-sql-sqlite -nomake examples -nomake demos -nomake tests -opensource -confirm-license
- Compile Qt
nmake
- While Qt compiles, you’ve got time to drink plenty of coffee.
- Open a MSVC command prompt via
- Setup Qt
- Add the Qt “bin” directory to your PATH environment variable.
- System → Advanced → Environment Variables → PATH
- Add the Qt “bin” directory to your PATH environment variable.
- Check Qt
- On the MSVC command prompt
- qmake —version
- Should read “QMake version 2.01a”
- On the MSVC command prompt
Checkout
- Create new build directory
- Assumed to be “Projects” in your home folder.
- Checkout libMini’s QTViewer with Tortoise SVN
- Url: http://svn.code.sf.net/p/libmini/code/libmini/qtviewer
- Destination: …/Projects/qtviewer
- Checkout prebuilt WIN32 dependencies with Tortoise SVN
- Url: http://svn.code.sf.net/p/libmini/code/libmini/WIN32
- Destination: …/Projects/WIN32
Build GDAL
- Checkout GDAL with Tortoise SVN
- Url: http://svn.osgeo.org/gdal/tags/1.8.1/gdal
- Destination: …/Projects/gdal
- Open a MSVC command prompt via
- Programs → MSVC → Tools → MSVC Command Prompt
- Navigate into the GDAL source directory and type
- set PROJ=“your project directory”
- e.g set PROJ=“C:\Users\roettger\Projects”
- nmake /f makefile.vc MSVC_VER=1600 GDAL_HOME=%PROJ%
- nmake /f makefile.vc MSVC_VER=1600 GDAL_HOME=%PROJ% devinstall
- nmake /f makefile.vc MSVC_VER=1600 GDAL_HOME=%PROJ% staticlib
- copy /y gdal.lib %PROJ%\lib
- copy /y port\*.h %PROJ%\include
- copy /y gcore\*.h %PROJ%\include
- copy /y ogr\*.h %PROJ%\include
- set PROJ=“your project directory”
Build QTViewer
- Open a MSVC command prompt via
- Programs → MSVC → Tools → MSVC Command Prompt
- Navigate into the QTViewer source …/Projects/qtviewer directory and type
- build.bat
- produces qtviewer.exe in the project directory
- build.bat
Package QTViewer
Using the instructions above, the QTViewer is built against static libraries, meaning that it can be run as stand-alone executable.
Here is the latest stand-alone qtviewer.exe Δ.
You can get the latest WIN32 package in the download section.