Skip to content
Permalink
Browse files
osgeo4w packaging update
git-svn-id: http://svn.osgeo.org/qgis/trunk@11684 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 20, 2009
1 parent 28da2c5 commit 2a80fa53dd5d252b3009fdc6d18b980d3139a6f2
@@ -1,7 +1,6 @@
@echo off
set GRASS_VERSION=6.4.0svn
set SVNVERSION=c:/cygwin/bin/svnversion
set PACKAGENAME=qgis-dev

set BUILDDIR=%CD%\build
REM set BUILDDIR=%TEMP%\qgis_unstable
@@ -12,8 +11,10 @@ if not exist "%BUILDDIR%" goto error

set VERSION=%1
set PACKAGE=%2
set PACKAGENAME=%3
if "%VERSION%"=="" goto error
if "%PACKAGE%"=="" goto error
if "%PACKAGENAME%"=="" set PACKAGENAME=qgis-dev

path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.6\bin
set PYTHONPATH=
@@ -127,10 +128,10 @@ if errorlevel 1 goto error
echo PACKAGE: %DATE% %TIME%>>%LOG% 2>&1

cd ..
copy postinstall.bat %OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
copy preremove.bat %OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
copy %PACKAGENAME%.bat.tmpl %OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl
copy qgis-dev.reg.tmpl %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis-dev.reg.tmpl
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' postinstall.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%.bat
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' preremove.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%.bat
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%.bat.tmpl
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.reg.tmpl >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.reg.tmpl

sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py >%OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py.tmpl
if errorlevel 1 goto error
@@ -1,11 +1,11 @@
textreplace -std -t bin\qgis-dev.bat
textreplace -std -t apps\qgis-dev\python\qgis\qgisconfig.py
textreplace -std -t bin\@package@.bat
textreplace -std -t apps\@package@\python\qgis\qgisconfig.py

mkdir "%OSGEO4W_STARTMENU%"
xxmklink "%OSGEO4W_STARTMENU%\Quantum GIS (trunk).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev.bat" " " \ "Quantum GIS - Desktop GIS (trunk)" 1 "%OSGEO4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
xxmklink "%ALLUSERSPROFILE%\Desktop\Quantum GIS (trunk).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev.bat" " " \ "Quantum GIS - Desktop GIS (trunk)" 1 "%OSGEO4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
xxmklink "%OSGEO4W_STARTMENU%\Quantum GIS (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"
xxmklink "%ALLUSERSPROFILE%\Desktop\Quantum GIS (@version@).lnk" "%OSGEO4W_ROOT%\bin\@package@.bat" " " \ "Quantum GIS - Desktop GIS (@version@)" 1 "%OSGEO4W_ROOT%\apps\@package@\icons\QGIS.ico"

set O4W_ROOT=%OSGEO4W_ROOT%
set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\%
textreplace -std -t "%O4W_ROOT%\apps\qgis-dev\bin\qgis-dev.reg"
"%WINDIR%\regedit" /s "%O4W_ROOT%\apps\qgis-dev\bin\qgis-dev.reg"
textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
"%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
@@ -1,4 +1,4 @@
del "%OSGEO4W_STARTMENU%\Quantum GIS (trunk).lnk"
del "%ALLUSERSPROFILE%\Desktop\Quantum GIS (trunk).lnk"
del "%OSGEO4W_ROOT%"\bin\qgis-dev.bat
del "%OSGEO4W_ROOT%"\apps\qgis-dev\python\qgis\qgisconfig.py
del "%OSGEO4W_STARTMENU%\Quantum GIS (@version@).lnk"
del "%ALLUSERSPROFILE%\Desktop\Quantum GIS (@version@).lnk"
del "%OSGEO4W_ROOT%"\bin\@package@.bat
del "%OSGEO4W_ROOT%"\apps\@package@\python\qgis\qgisconfig.py
@@ -5,4 +5,4 @@ call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
call "%OSGEO4W_ROOT%"\bin\gdal16.bat
@echo off
path %PATH%;%GISBASE%\bin
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\qgis-dev\bin\qgis.exe %*
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\@package@\bin\qgis.exe %*
@@ -4,15 +4,15 @@ Windows Registry Editor Version 5.00
@="Quantum GIS Project"

[HKEY_CLASSES_ROOT\Quantum GIS Project\DefaultIcon]
@="@osgeo4w@\\apps\\qgis-dev\\icons\\qgis.ico"
@="@osgeo4w@\\apps\\@package@\\icons\\qgis.ico"

[HKEY_CLASSES_ROOT\Quantum GIS Project\Shell]

[HKEY_CLASSES_ROOT\Quantum GIS Project\Shell\open]
@=""

[HKEY_CLASSES_ROOT\Quantum GIS Project\Shell\open\command]
@="\"@osgeo4w@\\bin\\qgis-dev.bat\" \"%1\""
@="\"@osgeo4w@\\bin\\@package@.bat\" \"%1\""

[HKEY_CLASSES_ROOT\.qgs]
@="Quantum GIS Project"

0 comments on commit 2a80fa5

Please sign in to comment.