|
| 1 | + Procedure for setup of a windows build environment for QGIS |
| 2 | + Tim Sutton and Godofredo Contreras 2005 |
| 3 | + With thanks to Tisham Dhar for preparing the initial msys environment |
| 4 | +--------------------------------------------------------------------------------- |
| 5 | + |
| 6 | +This document describes the process you need to follow to get QGIS built directly |
| 7 | +under windows (rather than using a cross compiler under linux). |
| 8 | + |
| 9 | +Note: The process for building under windows is still being sorted out so |
| 10 | + check this document regularly for updates. |
| 11 | + |
| 12 | +Msys: |
| 13 | +------------- |
| 14 | +get this : |
| 15 | + |
| 16 | +http://qgis.org/uploadfiles/mingw/msys.rar |
| 17 | + |
| 18 | +and unpack to c:\msys |
| 19 | + |
| 20 | +Qt4.2: |
| 21 | +------------- |
| 22 | +Download qt4.2 opensource precompiled edition exe and install (including the |
| 23 | +download and install of mingw). |
| 24 | + |
| 25 | +Edit C:\Qt\4.2.0\bin\qtvars.bat and add the following line (the second is only |
| 26 | +needed if you like vim in your shell): |
| 27 | + |
| 28 | +set PATH=%PATH%;C:\msys\local\bin |
| 29 | +set PATH=%PATH%;"c:\Program Files\Vim\vim70\ |
| 30 | + |
| 31 | + |
| 32 | +NSIS: |
| 33 | +------------- |
| 34 | +Downlad and install NSIS from (http://nsis.sourceforge.net/Main_Page) |
| 35 | + |
| 36 | +GDB: |
| 37 | +------------- |
| 38 | +Download and install gdb-6.3.2.exe from |
| 39 | + |
| 40 | +http://sourceforge.net/project/showfiles.php?group_id=2435 |
| 41 | + |
| 42 | +and install into c:\mingw |
| 43 | + |
| 44 | + |
| 45 | +QGIS: |
| 46 | +------------- |
| 47 | +Check out to c:\dev\cpp\qgis |
| 48 | +Currently you need to put it into that location I think - if you try to build |
| 49 | +somewhere else you *may* run into problems - particularly with the NSIS installer |
| 50 | +as I havent checked all paths are relative yet. |
| 51 | + |
| 52 | +Next you need to shift some files around. Note I expect this requirement to go away |
| 53 | +once the windows build process is refined a bit. |
| 54 | + |
| 55 | + |
| 56 | +Core: |
| 57 | +------------- |
| 58 | + - moved qgsspatialrefsys* and qgscoordinatetransform* into core dir from gui |
| 59 | + - qgsspatialrefsys.cpp - commented out lines using qgsproject as it depends on gui stuff |
| 60 | + - qgsdistancearea.cpp - commented out lines using qgsproject as it depends on |
| 61 | + gui stuff and moved to core |
| 62 | + |
| 63 | +I have created a small archive which includes the above changes, which I will make available. |
| 64 | + |
| 65 | +Gui: |
| 66 | +------------- |
| 67 | + Temporarily disable postgres support until we heve resolved issues |
| 68 | + - added #undef HAVE_POSTGRESQL to qgisapp.cpp around line 144 |
| 69 | + - added #undef HAVE_POSTGRESQL to qgsvectorlayerproperties.cpp around line 32 |
| 70 | + |
| 71 | + - moved qgspluginregistry.* to gui from core |
| 72 | + |
| 73 | +Building: |
| 74 | +------------- |
| 75 | + |
| 76 | +Now open the qt command shell |
| 77 | + |
| 78 | +cd c:\dev\cpp\qgis |
| 79 | +qmake |
| 80 | +make |
| 81 | + |
| 82 | + |
| 83 | +Create the installation package: |
| 84 | +--------------------------------- |
| 85 | + |
| 86 | +Download both the QGIS debug and release installer packages from |
| 87 | + |
| 88 | +http://qgis.org/uploadfiles/testbuilds/ |
| 89 | + |
| 90 | +and install them. Now copy the installation dirs from C:\Program Files\QGIS* into |
| 91 | +c:\dev\cpp\qgis\qgis-debug and c:\dev\cpp\qgis\qgis-release respectively. After |
| 92 | +making these copies uninstall the release and debug versions of QGIS from |
| 93 | +your c:\Program Files directories using the provided uninstaller. Double check |
| 94 | +that both dirs are complete gone under program files afterwards. |
| 95 | + |
| 96 | +Now using windows explorer, enter the c:\dev\cpp\qgis\win_build directory and right |
| 97 | +click on qgis.nsi and choose the option 'Compile NSIS Script'. Do the same |
| 98 | +for qgis-debug.nsi. Congratulations you should have two installable qgis |
| 99 | +setup files in the win_build directory now.. |
0 commit comments