@@ -31,7 +31,7 @@ Download and install following packages:
31
31
For the QGIS build you need to install following packages from cygwin:
32
32
- bison
33
33
- flex
34
- - git
34
+ - git (even if you already have Git for Windows installed)
35
35
-
36
36
37
37
and from OSGeo4W (select //Advanced Install//):
@@ -51,62 +51,81 @@ dependencies. If you're interested in that, check the history of this page in t
51
51
or the SVN repository.
52
52
53
53
ninja:
54
- copy ninja.exe to d :\OSGeo4W64\bin\
54
+ copy ninja.exe to C :\OSGeo4W64\bin\
55
55
56
- === Setting up the Visual Studio project with CMake ===
57
-
58
- /!\ Consider this section as example. It tends to outdate, when OSGeo4W and
59
- SDKs move on. ``ms-windows/osgeo4w/package-nightly.cmd`` is used for the
60
- nightly builds and constantly updated and hence might contain necessary
61
- updates that are not yet reflected here.
56
+ === Clone the QGIS Source Code ===
62
57
63
- To start a command prompt with an environment that both has the VC++ and the OSGeo4W
64
- variables create the following batch file (assuming the above packages were
65
- installed in the default locations):
58
+ Chose a directory to store the QGIS source code.
59
+ For example, to put it in the OSGeo4W64 install, navigate there:
66
60
67
61
```
68
- @echo off
69
- call X:\src\qgis\ms-windows\osgeo4w\msvc-env.bat x86_64
70
- @cmd
62
+ cd C:\OSGeo4W64
71
63
```
72
64
73
- Save the batch file as ``d:\OSGeo4W64\OSGeo4W-dev.bat`` and run it.
74
- On the command prompt checkout the QGIS source from
65
+ This directory will be assumed for all instructions
66
+ that follow.
67
+
68
+ On the command prompt clone the QGIS source from
75
69
git to the source directory ``QGIS``:
76
70
77
71
```
78
72
git clone git://github.com/qgis/QGIS.git
79
73
```
80
74
75
+ This requires Git. If you have Git for Windows on your PATH already,
76
+ you can do this from a normal command prompt. If you do not, you can
77
+ use the Git package that was installed as part of Cygwin by opening
78
+ a Cygwin[64] Terminal
79
+
81
80
And, to avoid Git in Windows reporting changes to files not actually modified:
82
81
83
82
```
84
83
git config core.filemode false
85
84
```
86
85
86
+ === Setting up the Visual Studio project with CMake ===
87
+
88
+ /!\ Consider this section as example. It tends to outdate, when OSGeo4W and
89
+ SDKs move on. ``ms-windows/osgeo4w/package-nightly.cmd`` is used for the
90
+ nightly builds and constantly updated and hence might contain necessary
91
+ updates that are not yet reflected here.
92
+
93
+ To start a command prompt with an environment that both has the VC++ and the OSGeo4W
94
+ variables create the following batch file (assuming the above packages were
95
+ installed in the default locations):
96
+
97
+ ```
98
+ @echo off
99
+ call C:\OSGeo4W64\QGIS\ms-windows\osgeo4w\msvc-env.bat x86_64
100
+ @cmd
101
+ ```
102
+
103
+ Save the batch file as ``C:\OSGeo4W64\OSGeo4W-dev.bat`` and run it.
104
+
87
105
88
106
Using configonly.bat to create the MSVC solution file:
89
- We will be using the file ms-windows/osgeo4w/configonly.bat to create an MSVC solution file.
107
+ We will be using the file `` ms-windows/osgeo4w/configonly.bat`` to create an MSVC solution file.
90
108
There are a few options for a solution file, following are the options: ninja, native MSVC.
91
- The advantage of using native MSVC solution is that you can find the root of build problems much easily.
109
+ The advantage of using native MSVC solution is that you can find the root of build problems much more easily.
92
110
configonly.bat is meant to create a configured build directory with a MSVC solution file:
93
111
94
- ```
95
- configonly.bat
96
- ```
112
+ ```
113
+ cd C:\OSGeo4W64\QGIS\ms-windows\osgeo4w
114
+ configonly.bat
115
+ ```
97
116
98
117
Compiling QGIS with MSVC:
99
118
We will need to run MSVC with all the environment variables set, thus we will run it as follows:
100
- Run the batch file OSGeo4W-dev.bat you created before. On the command prompt run: ``devenv``
119
+ Run the batch file OSGeo4W-dev.bat you created before. On the command prompt run: ``devenv`` to open MSVC.
101
120
From MSVC, open the solution file
102
- ``d :\OSGeo4W64\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\qgis.sln``
121
+ ``C :\OSGeo4W64\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\qgis.sln``
103
122
Try to build the solution (go grab a cup of tea, it may take a while).
104
123
If it fails, run it again and again until there are (hopefully) no errors.
105
124
106
125
107
126
Running QGIS from within MSVC:
108
127
Edit the properties of the project ALL_BUILD:
109
- Debugging -> Command -> D :\OSGeo4W64\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\bin\RelWithDebInfo\qgis.exe
128
+ Debugging -> Command -> ``C :\OSGeo4W64\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\bin\RelWithDebInfo\qgis.exe``
110
129
Run.
111
130
Ignore the "These projects are out of date" message, it appears even if no files were changed.
112
131
0 commit comments