Skip to content

Commit abf3280

Browse files
committed
forward port osgeo4w stuff from 1.7
1 parent 98eccb2 commit abf3280

10 files changed

+148
-39
lines changed

ms-windows/osgeo4w/httpd.conf.tmpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
LoadModule fcgid_module modules/mod_fcgid.so
2+
3+
DefaultInitEnv PATH "@osgeo4w@\bin;@osgeo4w@\apps\@package@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\bin;@osgeo4w@\apps\grass\grass-@grassversion@\lib;@windir@\system32;@windir@;@windir@\System32\Wbem"
4+
DefaultInitEnv QGIS_PREFIX_PATH "@osgeo4w@\apps\@package@"
5+
DefaultInitEnv TEMP "@temp@"
6+
7+
Alias /@package@/ @osgeo4w@/apps/@package@/bin/
8+
9+
<Directory "@osgeo4w@/apps/@package@/bin/">
10+
SetHandler fcgid-script
11+
Options ExecCGI
12+
Order allow,deny
13+
Allow from all
14+
</Directory>

ms-windows/osgeo4w/package-nightly.cmd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ cmake -G "Visual Studio 9 2008" ^
111111
-D QT_PNG_LIBRARY=%O4W_ROOT%/lib/libpng13.lib ^
112112
-D QWT_INCLUDE_DIR=%O4W_ROOT%/include/qwt ^
113113
-D QWT_LIBRARY=%O4W_ROOT%/lib/qwt5.lib ^
114-
-D ZLIB_INCLUDE_DIR=%O4W_ROOT%/include ^
115-
-D ZLIB_LIBRARY=%O4W_ROOT%/lib/zlib.lib ^
116114
-D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/%PACKAGENAME% ^
117115
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="/MD /ZI /Od /D NDEBUG" ^
118116
-D FCGI_INCLUDE_DIR=%O4W_ROOT%/include ^

ms-windows/osgeo4w/package.cmd

Lines changed: 107 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ set SRCDIR=%CD%
4646
if "%BUILDDIR:~1,1%"==":" %BUILDDIR:~0,2%
4747
cd %BUILDDIR%
4848

49+
if exist repackage goto package
50+
4951
if not exist build.log goto build
5052

5153
REM
@@ -107,8 +109,6 @@ cmake -G "Visual Studio 9 2008" ^
107109
-D QT_PNG_LIBRARY=%O4W_ROOT%/lib/libpng13.lib ^
108110
-D QWT_INCLUDE_DIR=%O4W_ROOT%/include/qwt ^
109111
-D QWT_LIBRARY=%O4W_ROOT%/lib/qwt5.lib ^
110-
-D ZLIB_INCLUDE_DIR=%O4W_ROOT%/include ^
111-
-D ZLIB_LIBRARY=%O4W_ROOT%/lib/zlib.lib ^
112112
-D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/%PACKAGENAME% ^
113113
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="/MD /ZI /Od /D NDEBUG" ^
114114
-D FCGI_INCLUDE_DIR=%O4W_ROOT%/include ^
@@ -134,45 +134,119 @@ echo INSTALL: %DATE% %TIME%>>%LOG% 2>&1
134134
%DEVENV% qgis%VERSION%.sln /Project INSTALL /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
135135
if errorlevel 1 goto error
136136

137+
:package
137138
echo PACKAGE: %DATE% %TIME%>>%LOG% 2>&1
138139

139140
cd ..
140-
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
141-
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' preremove.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
141+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-common.bat >%OSGEO4W_ROOT%\etc\postinstall\\%PACKAGENAME%-common.bat
142+
143+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-desktop.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
144+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' preremove-desktop.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
142145
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl
143146
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' browser.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser.bat.tmpl
144147
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' qgis.reg.tmpl >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.reg.tmpl
145148

149+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' postinstall-server.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-server.bat
150+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' preremove-server.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-server.bat
151+
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%GRASS_VERSION%/g' httpd.conf.tmpl >%OSGEO4W_ROOT%\httpd.d\httpd_%PACKAGENAME%.conf.tmpl
152+
146153
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
147154
REM if errorlevel 1 goto error
148155

149156
REM del %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py
150157

151158
touch exclude
152159

160+
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2 ^
161+
--exclude-from exclude ^
162+
--exclude "*.pyc" ^
163+
"apps/%PACKAGENAME%/bin/Microsoft.VC90.CRT.manifest" ^
164+
"apps/%PACKAGENAME%/bin/msvcm90.dll" ^
165+
"apps/%PACKAGENAME%/bin/msvcp90.dll" ^
166+
"apps/%PACKAGENAME%/bin/msvcr90.dll" ^
167+
"apps/%PACKAGENAME%/bin/qgispython.dll" ^
168+
"apps/%PACKAGENAME%/bin/qgis_analysis.dll" ^
169+
"apps/%PACKAGENAME%/bin/qgis_networkanalysis.dll" ^
170+
"apps/%PACKAGENAME%/bin/qgis_core.dll" ^
171+
"apps/%PACKAGENAME%/bin/qgis_gui.dll" ^
172+
"apps/%PACKAGENAME%/doc/" ^
173+
"apps/%PACKAGENAME%/plugins/delimitedtextprovider.dll" ^
174+
"apps/%PACKAGENAME%/plugins/diagramoverlay.dll" ^
175+
"apps/%PACKAGENAME%/plugins/gdalprovider.dll" ^
176+
"apps/%PACKAGENAME%/plugins/gpxprovider.dll" ^
177+
"apps/%PACKAGENAME%/plugins/memoryprovider.dll" ^
178+
"apps/%PACKAGENAME%/plugins/ogrprovider.dll" ^
179+
"apps/%PACKAGENAME%/plugins/osmprovider.dll" ^
180+
"apps/%PACKAGENAME%/plugins/postgresprovider.dll" ^
181+
"apps/%PACKAGENAME%/plugins/spatialiteprovider.dll" ^
182+
"apps/%PACKAGENAME%/plugins/sqlanywhereprovider.dll" ^
183+
"apps/%PACKAGENAME%/plugins/qgissqlanyconnection.dll" ^
184+
"apps/%PACKAGENAME%/plugins/wfsprovider.dll" ^
185+
"apps/%PACKAGENAME%/plugins/wmsprovider.dll" ^
186+
"apps/%PACKAGENAME%/plugins/mssqlprovider.dll" ^
187+
"apps/%PACKAGENAME%/resources/qgis.db" ^
188+
"apps/%PACKAGENAME%/resources/spatialite.db" ^
189+
"apps/%PACKAGENAME%/resources/srs.db" ^
190+
"apps/%PACKAGENAME%/resources/symbology-ng-style.xml" ^
191+
"apps/%PACKAGENAME%/svg/" ^
192+
"apps/%PACKAGENAME%/crssync.exe" ^
193+
"etc/postinstall/%PACKAGENAME%-common.bat" ^
194+
>>%LOG% 2>&1
195+
if errorlevel 1 goto error
196+
197+
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-server-%VERSION%-%PACKAGE%.tar.bz2 ^
198+
--exclude-from exclude ^
199+
--exclude "*.pyc" ^
200+
"apps/%PACKAGENAME%/bin/qgis_mapserv.fcgi.exe" ^
201+
"apps/%PACKAGENAME%/bin/admin.sld" ^
202+
"apps/%PACKAGENAME%/bin/wms_metadata.xml" ^
203+
"httpd.d/httpd_%PACKAGENAME%.conf.tmpl" ^
204+
"etc/postinstall/%PACKAGENAME%-server.bat" ^
205+
"etc/preremove/%PACKAGENAME%-server.bat" ^
206+
>>%LOG% 2>&1
207+
if errorlevel 1 goto error
208+
153209
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
154210
--exclude-from exclude ^
155211
--exclude "*.pyc" ^
156-
--exclude "apps/%PACKAGENAME%/grass" ^
157-
--exclude "apps/%PACKAGENAME%/bin/qgisgrass.dll" ^
158-
--exclude "apps/%PACKAGENAME%/plugins/grassrasterprovider.dll" ^
159-
--exclude "apps/%PACKAGENAME%/plugins/grassplugin.dll" ^
160-
--exclude "apps/%PACKAGENAME%/plugins/grassprovider.dll" ^
161-
--exclude "apps/%PACKAGENAME%/plugins/globeplugin.dll" ^
162-
apps/%PACKAGENAME% ^
163-
bin/%PACKAGENAME%.bat.tmpl ^
164-
bin/%PACKAGENAME%-browser.bat.tmpl ^
165-
etc/postinstall/%PACKAGENAME%.bat ^
166-
etc/preremove/%PACKAGENAME%.bat ^
212+
"apps/%PACKAGENAME%/bin/qbrowser.exe" ^
213+
"apps/%PACKAGENAME%/bin/qgis.exe" ^
214+
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
215+
"apps/%PACKAGENAME%/i18n/" ^
216+
"apps/%PACKAGENAME%/icons/" ^
217+
"apps/%PACKAGENAME%/images/" ^
218+
"apps/%PACKAGENAME%/plugins/coordinatecaptureplugin.dll" ^
219+
"apps/%PACKAGENAME%/plugins/delimitedtextplugin.dll" ^
220+
"apps/%PACKAGENAME%/plugins/dxf2shpconverterplugin.dll" ^
221+
"apps/%PACKAGENAME%/plugins/evis.dll" ^
222+
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
223+
"apps/%PACKAGENAME%/plugins/gpsimporterplugin.dll" ^
224+
"apps/%PACKAGENAME%/plugins/interpolationplugin.dll" ^
225+
"apps/%PACKAGENAME%/plugins/offlineeditingplugin.dll" ^
226+
"apps/%PACKAGENAME%/plugins/oracleplugin.dll" ^
227+
"apps/%PACKAGENAME%/plugins/rasterterrainplugin.dll" ^
228+
"apps/%PACKAGENAME%/plugins/roadgraphplugin.dll" ^
229+
"apps/%PACKAGENAME%/plugins/spatialqueryplugin.dll" ^
230+
"apps/%PACKAGENAME%/plugins/spitplugin.dll" ^
231+
"apps/%PACKAGENAME%/plugins/sqlanywhereplugin.dll" ^
232+
"apps/%PACKAGENAME%/plugins/zonalstatisticsplugin.dll" ^
233+
"apps/%PACKAGENAME%/plugins/heatmapplugin.dll" ^
234+
"apps/%PACKAGENAME%/qgis_help.exe" ^
235+
"apps/%PACKAGENAME%/python/" ^
236+
"apps/%PACKAGENAME%/resources/context_help/" ^
237+
"apps/%PACKAGENAME%/resources/function_help/" ^
238+
"apps/%PACKAGENAME%/resources/customization.xml" ^
239+
"apps/%PACKAGENAME%/resources/qgis_help.db" ^
240+
"bin/%PACKAGENAME%.bat.tmpl" ^
241+
"bin/%PACKAGENAME%-browser.bat.tmpl" ^
242+
"etc/postinstall/%PACKAGENAME%.bat" ^
243+
"etc/preremove/%PACKAGENAME%.bat" ^
167244
>>%LOG% 2>&1
168245
if errorlevel 1 goto error
169246

170247
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-grass-plugin-%VERSION%-%PACKAGE%.tar.bz2 ^
171248
--exclude-from exclude ^
172249
--exclude "*.pyc" ^
173-
"apps/%PACKAGENAME%/themes/classic/grass" ^
174-
"apps/%PACKAGENAME%/themes/default/grass" ^
175-
"apps/%PACKAGENAME%/themes/gis/grass" ^
176250
"apps/%PACKAGENAME%/grass" ^
177251
"apps/%PACKAGENAME%/bin/qgisgrass.dll" ^
178252
"apps/%PACKAGENAME%/plugins/grassrasterprovider.dll" ^
@@ -182,18 +256,33 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-grass-plugin-%VERSION%-%PACKAGE%.tar.bz
182256
if errorlevel 1 goto error
183257

184258
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-globe-plugin-%VERSION%-%PACKAGE%.tar.bz2 ^
259+
--exclude-from exclude ^
260+
--exclude "*.pyc" ^
185261
"apps/%PACKAGENAME%/globe" ^
186262
"apps/%PACKAGENAME%/plugins/globeplugin.dll" ^
187263
>>%LOG% 2>&1
188264
if errorlevel 1 goto error
189265

266+
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-devel-%VERSION%-%PACKAGE%.tar.bz2 ^
267+
--exclude-from exclude ^
268+
--exclude "*.pyc" ^
269+
"apps/%PACKAGENAME%/FindQGIS.cmake" ^
270+
"apps/%PACKAGENAME%/include/" ^
271+
"apps/%PACKAGENAME%/lib/" ^
272+
>>%LOG% 2>&1
273+
if errorlevel 1 goto error
274+
190275
goto end
191276

192277
:error
193278
echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME%
194279
echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME%>>%LOG% 2>&1
280+
if exist %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2
195281
if exist %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2
282+
if exist %PACKAGENAME%-server-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-server-%VERSION%-%PACKAGE%.tar.bz2
283+
if exist %PACKAGENAME%-devel-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-devel-%VERSION%-%PACKAGE%.tar.bz2
196284
if exist %PACKAGENAME%-grass-plugin-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-grass-plugin-%VERSION%-%PACKAGE%.tar.bz2
285+
if exist %PACKAGENAME%-globe-plugin-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-globe-plugin-%VERSION%-%PACKAGE%.tar.bz2
197286

198287
:end
199288
echo FINISHED: %DATE% %TIME% >>%LOG% 2>&1
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
2+
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin
3+
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\@package@
4+
%OSGEO4W_ROOT%\apps\@package@\crssync
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
textreplace -std -t bin\@package@.bat
2+
textreplace -std -t bin\@package@-browser.bat
3+
4+
mkdir "%OSGEO4W_STARTMENU%"
5+
xxmklink "%OSGEO4W_STARTMENU%\Quantum GIS Desktop (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
6+
xxmklink "%ALLUSERSPROFILE%\Desktop\Quantum GIS Desktop (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
7+
xxmklink "%OSGEO4W_STARTMENU%\Quantum GIS Browser (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@-browser.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
8+
xxmklink "%ALLUSERSPROFILE%\Desktop\Quantum GIS Browser (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@-browser.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
9+
10+
set O4W_ROOT=%OSGEO4W_ROOT%
11+
set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\%
12+
textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
13+
"%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
textreplace -std ^
2+
-map @windir@ "%WINDIR%" ^
3+
-map @temp@ "%TEMP%" ^
4+
-t httpd.d\httpd_@package@.conf
5+
del httpd.d\httpd_@package@.conf.tmpl

ms-windows/osgeo4w/postinstall.bat

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
del "%OSGEO4W_ROOT%"\httpd.d\httpd_@package@.conf

src/crssync/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ int main( int argc, char ** argv )
4141
QgsApplication a( argc, argv, false );
4242

4343
if ( !QgsApplication::isRunningFromBuildDir() )
44-
a.setPrefixPath( CMAKE_INSTALL_PREFIX, true );
44+
{
45+
char *prefixPath = getenv( "QGIS_PREFIX_PATH" );
46+
a.setPrefixPath( prefixPath ? prefixPath : CMAKE_INSTALL_PREFIX, true );
47+
}
4548

4649
std::cout << "Synchronizing CRS database with PROJ definitions." << std::endl;
4750

0 commit comments

Comments
 (0)