Skip to content

Commit

Permalink
osgeo4w: more 'improvements'
Browse files Browse the repository at this point in the history
 * 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
  • Loading branch information
jef-n committed Sep 22, 2013
1 parent 699e450 commit 68bf1d8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 30 deletions.
Binary file modified ms-windows/Installer-Files/WelcomeFinishPage.bmp
Binary file not shown.
14 changes: 8 additions & 6 deletions ms-windows/QGIS-Installer.nsi
Expand Up @@ -90,12 +90,14 @@ ShowUnInstDetails show
; if the uninstall procedure succeeded, call the current installer asking for the install PATH

Function .onInit
${If} ${RunningX64}
DetailPrint "Installer running on 64-bit host"
; disable registry redirection (enable access to 64-bit portion of registry)
SetRegView 64
; change install dir
StrCpy $INSTDIR "$PROGRAMFILES64\${QGIS_BASE}"
${If} ${ARCH} == "x86_64"
${If} ${RunningX64}
DetailPrint "Installer running on 64-bit host"
; disable registry redirection (enable access to 64-bit portion of registry)
SetRegView 64
; change install dir
StrCpy $INSTDIR "$PROGRAMFILES64\${QGIS_BASE}"
${EndIf}
${EndIf}

Var /GLOBAL ASK_FOR_PATH
Expand Down
9 changes: 5 additions & 4 deletions ms-windows/osgeo4w/creatensis.pl
Expand Up @@ -277,8 +277,8 @@ sub getDeps {
$version = "$major.$minor.$patch" unless defined $version;

unless( defined $binary ) {
if( -f "binary-$version" ) {
open P, "binary-$version";
if( -f "binary-$archpostfix$version" ) {
open P, "binary-$archpostfix$version";
$binary = <P>;
close P;
$binary++;
Expand Down Expand Up @@ -363,18 +363,19 @@ sub getDeps {
$cmd .= " -DBINARY_REVISION=$binary";
$cmd .= sprintf( " -DVERSION_INT='%d%02d%02d%02d'", $major, $minor, $patch, $binary );
$cmd .= " -DQGIS_BASE='$packagename $releasename'";
$cmd .= " -DINSTALLER_NAME='QGIS-OSGeo4W-$version-$binary-Setup$archpostfix.exe'";
$cmd .= " -DINSTALLER_NAME='$packagename-OSGeo4W-$version-$binary-Setup$archpostfix.exe'";
$cmd .= " -DDISPLAYED_NAME='$packagename \'$releasename\' ($version)'";
$cmd .= " -DSHORTNAME='$shortname'";
$cmd .= " -DINSTALLER_TYPE=OSGeo4W";
$cmd .= " -DPACKAGE_FOLDER=osgeo4w/$unpacked";
$cmd .= " -DLICENSE_FILE='$license'";
$cmd .= " -DARCH='$arch'";
$cmd .= " QGIS-Installer.nsi";

system $cmd;
die "running nsis failed" if $?;

open P, ">osgeo4w/binary-$version";
open P, ">osgeo4w/binary-$archpostfix$version";
print P $binary;
close P;

Expand Down
16 changes: 7 additions & 9 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -37,8 +37,8 @@ call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86

if "%OSGEO4W_ROOT%"=="" set OSGEO4W_ROOT=%PROGRAMFILES%\OSGeo4W
if not exist "%OSGEO4W_ROOT%\bin\o4w_env.bat" goto error

call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
path %PATH%;c:\cygwin\bin

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

echo REMOVE: %DATE% %TIME%>>%LOG% 2>&1
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
if errorlevel 1 goto error
if exist %OSGEO4W_ROOT%\apps\%PACKAGENAME% (
echo REMOVE: %DATE% %TIME%>>%LOG% 2>&1
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
if errorlevel 1 goto error
)

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

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
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
if not exist %OSGEO4W_ROOT%\httpd.d mkdir %OSGEO4W_ROOT%\httpd.d
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

REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
Expand All @@ -192,7 +195,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/bin/qgis_gui.dll" ^
"apps/%PACKAGENAME%/doc/" ^
"apps/%PACKAGENAME%/plugins/delimitedtextprovider.dll" ^
"apps/%PACKAGENAME%/plugins/diagramoverlay.dll" ^
"apps/%PACKAGENAME%/plugins/gdalprovider.dll" ^
"apps/%PACKAGENAME%/plugins/gpxprovider.dll" ^
"apps/%PACKAGENAME%/plugins/memoryprovider.dll" ^
Expand Down Expand Up @@ -241,7 +243,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/icons/" ^
"apps/%PACKAGENAME%/images/" ^
"apps/%PACKAGENAME%/plugins/coordinatecaptureplugin.dll" ^
"apps/%PACKAGENAME%/plugins/delimitedtextplugin.dll" ^
"apps/%PACKAGENAME%/plugins/dxf2shpconverterplugin.dll" ^
"apps/%PACKAGENAME%/plugins/evis.dll" ^
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
Expand All @@ -260,10 +261,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/qgis_help.exe" ^
"apps/qt4/plugins/sqldrivers/qsqlspatialite.dll" ^
"apps/%PACKAGENAME%/python/" ^
"apps/%PACKAGENAME%/resources/context_help/" ^
"apps/%PACKAGENAME%/resources/function_help/" ^
"apps/%PACKAGENAME%/resources/customization.xml" ^
"apps/%PACKAGENAME%/resources/qgis_help.db" ^
"bin/%PACKAGENAME%.bat.tmpl" ^
"bin/%PACKAGENAME%-browser.bat.tmpl" ^
"etc/postinstall/%PACKAGENAME%.bat" ^
Expand Down
19 changes: 8 additions & 11 deletions ms-windows/osgeo4w/package64.cmd
Expand Up @@ -29,17 +29,16 @@ if "%VERSION%"=="" goto error
if "%PACKAGE%"=="" goto error
if "%PACKAGENAME%"=="" set PACKAGENAME=qgis

path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.8\bin
path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES(X86)%\CMake 2.8\bin
set PYTHONPATH=

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

if "%OSGEO4W_ROOT%"=="" set OSGEO4W_ROOT=C:\OSGeo4W64
if not exist "%OSGEO4W_ROOT%\bin\o4w_env.bat" goto error
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
path %PATH%;c:\cygwin\bin
echo on

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

echo RMDIR: %DATE% %TIME%>>%LOG% 2>&1
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
if errorlevel 1 goto error
if exist %OSGEO4W_ROOT%\apps\%PACKAGENAME% (
echo REMOVE: %DATE% %TIME%>>%LOG% 2>&1
rmdir /s /q %OSGEO4W_ROOT%\apps\%PACKAGENAME%
if errorlevel 1 goto error
)

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

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
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
if not exist %OSGEO4W_ROOT%\httpd.d mkdir %OSGEO4W_ROOT%\httpd.d
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

REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
Expand All @@ -185,7 +187,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-common-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/bin/qgis_gui.dll" ^
"apps/%PACKAGENAME%/doc/" ^
"apps/%PACKAGENAME%/plugins/delimitedtextprovider.dll" ^
"apps/%PACKAGENAME%/plugins/diagramoverlay.dll" ^
"apps/%PACKAGENAME%/plugins/gdalprovider.dll" ^
"apps/%PACKAGENAME%/plugins/gpxprovider.dll" ^
"apps/%PACKAGENAME%/plugins/memoryprovider.dll" ^
Expand Down Expand Up @@ -234,7 +235,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/icons/" ^
"apps/%PACKAGENAME%/images/" ^
"apps/%PACKAGENAME%/plugins/coordinatecaptureplugin.dll" ^
"apps/%PACKAGENAME%/plugins/delimitedtextplugin.dll" ^
"apps/%PACKAGENAME%/plugins/dxf2shpconverterplugin.dll" ^
"apps/%PACKAGENAME%/plugins/evis.dll" ^
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
Expand All @@ -253,10 +253,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/qgis_help.exe" ^
"apps/qt4/plugins/sqldrivers/qsqlspatialite.dll" ^
"apps/%PACKAGENAME%/python/" ^
"apps/%PACKAGENAME%/resources/context_help/" ^
"apps/%PACKAGENAME%/resources/function_help/" ^
"apps/%PACKAGENAME%/resources/customization.xml" ^
"apps/%PACKAGENAME%/resources/qgis_help.db" ^
"bin/%PACKAGENAME%.bat.tmpl" ^
"bin/%PACKAGENAME%-browser.bat.tmpl" ^
"etc/postinstall/%PACKAGENAME%.bat" ^
Expand Down

0 comments on commit 68bf1d8

Please sign in to comment.