Skip to content

Commit 68bf1d8

Browse files
committed
osgeo4w: more 'improvements'
* package(64).cmd: * remove apps/%PACKAGENAME% before install (ie. don't repackage old cruft) * context_help, function_help, qgis_help.db, delimitedtextplugin.dll and diagramoverlay.dll removed in 2.0 * package64.cmd: cmake is in PROGRAMFILES(X86) * nsis: adapt WelcomeFinishPage.bmp format for NSIS (ie. resave in paint) * nsis: installer don't use 64bit settings when installing 32bit package on 64bit OS
1 parent 699e450 commit 68bf1d8

File tree

5 files changed

+28
-30
lines changed

5 files changed

+28
-30
lines changed
-68 Bytes
Binary file not shown.

ms-windows/QGIS-Installer.nsi

+8-6
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@ ShowUnInstDetails show
9090
; if the uninstall procedure succeeded, call the current installer asking for the install PATH
9191

9292
Function .onInit
93-
${If} ${RunningX64}
94-
DetailPrint "Installer running on 64-bit host"
95-
; disable registry redirection (enable access to 64-bit portion of registry)
96-
SetRegView 64
97-
; change install dir
98-
StrCpy $INSTDIR "$PROGRAMFILES64\${QGIS_BASE}"
93+
${If} ${ARCH} == "x86_64"
94+
${If} ${RunningX64}
95+
DetailPrint "Installer running on 64-bit host"
96+
; disable registry redirection (enable access to 64-bit portion of registry)
97+
SetRegView 64
98+
; change install dir
99+
StrCpy $INSTDIR "$PROGRAMFILES64\${QGIS_BASE}"
100+
${EndIf}
99101
${EndIf}
100102

101103
Var /GLOBAL ASK_FOR_PATH

ms-windows/osgeo4w/creatensis.pl

+5-4
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ sub getDeps {
277277
$version = "$major.$minor.$patch" unless defined $version;
278278

279279
unless( defined $binary ) {
280-
if( -f "binary-$version" ) {
281-
open P, "binary-$version";
280+
if( -f "binary-$archpostfix$version" ) {
281+
open P, "binary-$archpostfix$version";
282282
$binary = <P>;
283283
close P;
284284
$binary++;
@@ -363,18 +363,19 @@ sub getDeps {
363363
$cmd .= " -DBINARY_REVISION=$binary";
364364
$cmd .= sprintf( " -DVERSION_INT='%d%02d%02d%02d'", $major, $minor, $patch, $binary );
365365
$cmd .= " -DQGIS_BASE='$packagename $releasename'";
366-
$cmd .= " -DINSTALLER_NAME='QGIS-OSGeo4W-$version-$binary-Setup$archpostfix.exe'";
366+
$cmd .= " -DINSTALLER_NAME='$packagename-OSGeo4W-$version-$binary-Setup$archpostfix.exe'";
367367
$cmd .= " -DDISPLAYED_NAME='$packagename \'$releasename\' ($version)'";
368368
$cmd .= " -DSHORTNAME='$shortname'";
369369
$cmd .= " -DINSTALLER_TYPE=OSGeo4W";
370370
$cmd .= " -DPACKAGE_FOLDER=osgeo4w/$unpacked";
371371
$cmd .= " -DLICENSE_FILE='$license'";
372+
$cmd .= " -DARCH='$arch'";
372373
$cmd .= " QGIS-Installer.nsi";
373374

374375
system $cmd;
375376
die "running nsis failed" if $?;
376377

377-
open P, ">osgeo4w/binary-$version";
378+
open P, ">osgeo4w/binary-$archpostfix$version";
378379
print P $binary;
379380
close P;
380381

ms-windows/osgeo4w/package.cmd

+7-9
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
3737

3838
if "%OSGEO4W_ROOT%"=="" set OSGEO4W_ROOT=%PROGRAMFILES%\OSGeo4W
3939
if not exist "%OSGEO4W_ROOT%\bin\o4w_env.bat" goto error
40-
4140
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
41+
path %PATH%;c:\cygwin\bin
4242

4343
set O4W_ROOT=%OSGEO4W_ROOT:\=/%
4444
set LIB_DIR=%O4W_ROOT%
@@ -147,9 +147,11 @@ echo ALL_BUILD: %DATE% %TIME%>>%LOG% 2>&1
147147
%DEVENV% qgis%VERSION%.sln /Project ALL_BUILD /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
148148
if errorlevel 1 goto error
149149

150-
echo REMOVE: %DATE% %TIME%>>%LOG% 2>&1
151-
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
152-
if errorlevel 1 goto error
150+
if exist %OSGEO4W_ROOT%\apps\%PACKAGENAME% (
151+
echo REMOVE: %DATE% %TIME%>>%LOG% 2>&1
152+
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
153+
if errorlevel 1 goto error
154+
)
153155

154156
echo INSTALL: %DATE% %TIME%>>%LOG% 2>&1
155157
%DEVENV% qgis%VERSION%.sln /Project INSTALL /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
@@ -169,6 +171,7 @@ sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassve
169171

170172
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
171173
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
174+
if not exist %OSGEO4W_ROOT%\httpd.d mkdir %OSGEO4W_ROOT%\httpd.d
172175
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
173176

174177
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
@@ -192,7 +195,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2 ^
192195
"apps/%PACKAGENAME%/bin/qgis_gui.dll" ^
193196
"apps/%PACKAGENAME%/doc/" ^
194197
"apps/%PACKAGENAME%/plugins/delimitedtextprovider.dll" ^
195-
"apps/%PACKAGENAME%/plugins/diagramoverlay.dll" ^
196198
"apps/%PACKAGENAME%/plugins/gdalprovider.dll" ^
197199
"apps/%PACKAGENAME%/plugins/gpxprovider.dll" ^
198200
"apps/%PACKAGENAME%/plugins/memoryprovider.dll" ^
@@ -241,7 +243,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
241243
"apps/%PACKAGENAME%/icons/" ^
242244
"apps/%PACKAGENAME%/images/" ^
243245
"apps/%PACKAGENAME%/plugins/coordinatecaptureplugin.dll" ^
244-
"apps/%PACKAGENAME%/plugins/delimitedtextplugin.dll" ^
245246
"apps/%PACKAGENAME%/plugins/dxf2shpconverterplugin.dll" ^
246247
"apps/%PACKAGENAME%/plugins/evis.dll" ^
247248
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
@@ -260,10 +261,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
260261
"apps/%PACKAGENAME%/qgis_help.exe" ^
261262
"apps/qt4/plugins/sqldrivers/qsqlspatialite.dll" ^
262263
"apps/%PACKAGENAME%/python/" ^
263-
"apps/%PACKAGENAME%/resources/context_help/" ^
264-
"apps/%PACKAGENAME%/resources/function_help/" ^
265264
"apps/%PACKAGENAME%/resources/customization.xml" ^
266-
"apps/%PACKAGENAME%/resources/qgis_help.db" ^
267265
"bin/%PACKAGENAME%.bat.tmpl" ^
268266
"bin/%PACKAGENAME%-browser.bat.tmpl" ^
269267
"etc/postinstall/%PACKAGENAME%.bat" ^

ms-windows/osgeo4w/package64.cmd

+8-11
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,16 @@ if "%VERSION%"=="" goto error
2929
if "%PACKAGE%"=="" goto error
3030
if "%PACKAGENAME%"=="" set PACKAGENAME=qgis
3131

32-
path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.8\bin
32+
path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES(X86)%\CMake 2.8\bin
3333
set PYTHONPATH=
3434

35-
call "%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
35+
call "%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
3636
path %PATH%;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE
3737

3838
if "%OSGEO4W_ROOT%"=="" set OSGEO4W_ROOT=C:\OSGeo4W64
3939
if not exist "%OSGEO4W_ROOT%\bin\o4w_env.bat" goto error
4040
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
4141
path %PATH%;c:\cygwin\bin
42-
echo on
4342

4443
set O4W_ROOT=%OSGEO4W_ROOT:\=/%
4544
set LIB_DIR=%O4W_ROOT%
@@ -144,9 +143,11 @@ echo ALL_BUILD: %DATE% %TIME%>>%LOG% 2>&1
144143
%DEVENV% qgis%VERSION%.sln /Project ALL_BUILD /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
145144
if errorlevel 1 goto error
146145

147-
echo RMDIR: %DATE% %TIME%>>%LOG% 2>&1
148-
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
149-
if errorlevel 1 goto error
146+
if exist %OSGEO4W_ROOT%\apps\%PACKAGENAME% (
147+
echo REMOVE: %DATE% %TIME%>>%LOG% 2>&1
148+
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
149+
if errorlevel 1 goto error
150+
)
150151

151152
echo INSTALL: %DATE% %TIME%>>%LOG% 2>&1
152153
%DEVENV% qgis%VERSION%.sln /Project INSTALL /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
@@ -166,6 +167,7 @@ sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassve
166167

167168
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
168169
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
170+
if not exist %OSGEO4W_ROOT%\httpd.d mkdir %OSGEO4W_ROOT%\httpd.d
169171
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
170172

171173
REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
@@ -185,7 +187,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2 ^
185187
"apps/%PACKAGENAME%/bin/qgis_gui.dll" ^
186188
"apps/%PACKAGENAME%/doc/" ^
187189
"apps/%PACKAGENAME%/plugins/delimitedtextprovider.dll" ^
188-
"apps/%PACKAGENAME%/plugins/diagramoverlay.dll" ^
189190
"apps/%PACKAGENAME%/plugins/gdalprovider.dll" ^
190191
"apps/%PACKAGENAME%/plugins/gpxprovider.dll" ^
191192
"apps/%PACKAGENAME%/plugins/memoryprovider.dll" ^
@@ -234,7 +235,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
234235
"apps/%PACKAGENAME%/icons/" ^
235236
"apps/%PACKAGENAME%/images/" ^
236237
"apps/%PACKAGENAME%/plugins/coordinatecaptureplugin.dll" ^
237-
"apps/%PACKAGENAME%/plugins/delimitedtextplugin.dll" ^
238238
"apps/%PACKAGENAME%/plugins/dxf2shpconverterplugin.dll" ^
239239
"apps/%PACKAGENAME%/plugins/evis.dll" ^
240240
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
@@ -253,10 +253,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
253253
"apps/%PACKAGENAME%/qgis_help.exe" ^
254254
"apps/qt4/plugins/sqldrivers/qsqlspatialite.dll" ^
255255
"apps/%PACKAGENAME%/python/" ^
256-
"apps/%PACKAGENAME%/resources/context_help/" ^
257-
"apps/%PACKAGENAME%/resources/function_help/" ^
258256
"apps/%PACKAGENAME%/resources/customization.xml" ^
259-
"apps/%PACKAGENAME%/resources/qgis_help.db" ^
260257
"bin/%PACKAGENAME%.bat.tmpl" ^
261258
"bin/%PACKAGENAME%-browser.bat.tmpl" ^
262259
"etc/postinstall/%PACKAGENAME%.bat" ^

0 commit comments

Comments
 (0)