Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
osgeo4w: packaging updates
  • Loading branch information
jef-n committed Jan 27, 2013
1 parent fbb380d commit 74ace4a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
9 changes: 8 additions & 1 deletion ms-windows/QGIS-Installer.nsi
Expand Up @@ -345,6 +345,8 @@ Section "Quantum GIS" SecQGIS
GetFullPathName /SHORT $0 $INSTALL_DIR
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0'
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0'
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_MENU_LINKS", "1").r0'
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP_LINKS", "1").r0'

ReadEnvStr $0 COMSPEC
nsExec::ExecToLog '"$0" /c "$INSTALL_DIR\postinstall.bat"'
Expand All @@ -355,11 +357,14 @@ RebootNecessary:
SetRebootFlag true

NoRebootNecessary:
Delete "$DESKTOP\Quantum GIS (${VERSION_NUMBER}).lnk"
Delete "$SMPROGRAMS\${QGIS_BASE}\Quantum GIS (${VERSION_NUMBER}).lnk"

Delete "$DESKTOP\Quantum GIS Desktop (${VERSION_NUMBER}).lnk"
CreateShortCut "$DESKTOP\Quantum GIS Desktop (${VERSION_NUMBER}).lnk" "$INSTALL_DIR\bin\nircmd.exe" 'exec hide "$INSTALL_DIR\bin\${SHORTNAME}.bat"' \
"$INSTALL_DIR\icons\QGIS.ico" "" SW_SHOWNORMAL "" "Launch ${COMPLETE_NAME}"

Delete "$SMPROGRAMS\${QGIS_BASE}\Quantum GIS (${VERSION_NUMBER}).lnk"
Delete "$SMPROGRAMS\${QGIS_BASE}\Quantum GIS Desktop (${VERSION_NUMBER}).lnk"
CreateShortCut "$SMPROGRAMS\${QGIS_BASE}\Quantum GIS Desktop (${VERSION_NUMBER}).lnk" "$INSTALL_DIR\bin\nircmd.exe" 'exec hide "$INSTALL_DIR\bin\${SHORTNAME}.bat"' \
"$INSTALL_DIR\icons\QGIS.ico" "" SW_SHOWNORMAL "" "Launch ${COMPLETE_NAME}"

Expand Down Expand Up @@ -487,6 +492,8 @@ Section "Uninstall"
GetFullPathName /SHORT $0 $INSTDIR
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0'
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0'
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_MENU_LINKS", "1").r0'
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP_LINKS", "1").r0'

ReadEnvStr $0 COMSPEC
nsExec::ExecToLog '"$0" /c "$INSTALL_DIR\preremove.bat"'
Expand Down
9 changes: 5 additions & 4 deletions ms-windows/osgeo4w/creatensis.pl
Expand Up @@ -26,16 +26,18 @@
my $shortname;
my $version;
my $binary;
my $ininame = "setup.ini";
my $help;

my $result = GetOptions(
"verbose+" => \$verbose,
"keep" => \$keep,
"releasename=s" => \$releasename,
"version=s" => \$version,
"binary=s" => \$binary,
"binary=i" => \$binary,
"packagename=s" => \$packagename,
"shortname=s" => \$shortname,
"ininame=s" => \$ininame,
"help" => \$help
);

Expand All @@ -62,7 +64,7 @@
my %file;
my $package;

system "wget $wgetopt -c $root/setup.ini";
system "wget $wgetopt -O setup.ini -c $root/$ininame";
open F, "setup.ini" || die "setup.ini not found";
while(<F>) {
chop;
Expand Down Expand Up @@ -246,8 +248,6 @@ sub getDeps {
} else {
$binary = 1;
}
} else {
die "given binary version not numeric" unless $package =~ /^\d+$/;
}

system "unzip packages/Untgz.zip" unless -d "untgz";
Expand Down Expand Up @@ -294,6 +294,7 @@ =head1 SYNOPSIS
-keep don't start with a fresh unpacked directory
-version=m.m.p package version (defaults to CMakeLists.txt setting)
-binary=b binary version of package
-ininame=filename name of the setup.ini (defaults to setup.ini)
-packagename=s name of package (defaults to 'Quantum GIS')
-shortname=s shortname used for batch file (defaults to 'qgis')
-help this help
Expand Down
2 changes: 1 addition & 1 deletion ms-windows/osgeo4w/package-nightly.cmd
Expand Up @@ -101,6 +101,7 @@ if errorlevel 1 goto error

set LIB=%LIB%;%OSGEO4W_ROOT%\lib
set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include
set GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION%

cmake -G "Visual Studio 9 2008" ^
-D BUILDNAME="OSGeo4W-Nightly-VC9" ^
Expand All @@ -120,7 +121,6 @@ cmake -G "Visual Studio 9 2008" ^
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python27/include ^
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python27/libs/python27.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python27/sip.exe ^
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION% ^
-D QT_BINARY_DIR=%O4W_ROOT%/bin ^
-D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^
-D QT_HEADERS_DIR=%O4W_ROOT%/include/qt4 ^
Expand Down
4 changes: 2 additions & 2 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -27,7 +27,7 @@ set PACKAGE=%2
set PACKAGENAME=%3
if "%VERSION%"=="" goto error
if "%PACKAGE%"=="" goto error
if "%PACKAGENAME%"=="" set PACKAGENAME=qgis-dev
if "%PACKAGENAME%"=="" set PACKAGENAME=qgis

path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.8\bin
set PYTHONPATH=
Expand Down Expand Up @@ -100,6 +100,7 @@ if errorlevel 1 goto error

set LIB=%LIB%;%OSGEO4W_ROOT%\lib
set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include
set GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION%

cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
Expand All @@ -117,7 +118,6 @@ cmake -G "Visual Studio 9 2008" ^
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python27/include ^
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python27/libs/python27.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python27/sip.exe ^
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION% ^
-D QT_BINARY_DIR=%O4W_ROOT%/bin ^
-D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^
-D QT_HEADERS_DIR=%O4W_ROOT%/include/qt4 ^
Expand Down

0 comments on commit 74ace4a

Please sign in to comment.