Skip to content
Permalink
Browse files

osgeo4w: include python wrapper batch

  • Loading branch information
jef-n committed Apr 10, 2015
1 parent 1f58f33 commit 6386dc6e14b0f1710cd2656d291e6d3844c48829
@@ -13,6 +13,9 @@ REM * the Free Software Foundation; either version 2 of the License, or *
REM * (at your option) any later version. *
REM * *
REM ***************************************************************************

setlocal enabledelayedexpansion

set VERSION=%1
set PACKAGE=%2
set PACKAGENAME=%3
@@ -225,13 +228,19 @@ if errorlevel 1 (echo creation of designer template failed & goto error)
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' qgis.reg.tmpl >%PKGDIR%\bin\qgis.reg.tmpl
if errorlevel 1 (echo creation of registry template & goto error)

set batches=
for %%g IN (%GRASS_VERSIONS%) do (
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' qgis.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-g%%g.bat.tmpl
if errorlevel 1 (echo creation of desktop template failed & goto error)
set batches=!batches! bin/%PACKAGENAME%-g%%g.bat.tmpl

sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' -e 's/@grassversion@/%%g/g' browser.bat.tmpl >%OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser-g%%g.bat.tmpl
if errorlevel 1 (echo creation of browser template & goto error)
set batches=!batches! bin/%PACKAGENAME%-browser-g%%g.bat.tmpl
)

sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' python.bat.tmpl >%OSGEO4W_ROOT%\bin\python-%PACKAGENAME%.bat.tmpl
if errorlevel 1 (echo creation of python wrapper failed & goto error)

REM sed -e 's/%OSGEO4W_ROOT:\=\\\\\\\\%/@osgeo4w@/' %PKGDIR%\python\qgis\qgisconfig.py >%PKGDIR%\python\qgis\qgisconfig.py.tmpl
REM if errorlevel 1 (echo creation of qgisconfig.py.tmpl failed & goto error)
@@ -266,9 +275,9 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
apps/%PACKAGENAME% ^
bin/%PACKAGENAME%-bin.exe ^
bin/%PACKAGENAME%-browser-bin.exe ^
bin/%PACKAGENAME%.bat.tmpl ^
bin/%PACKAGENAME%-browser.bat.tmpl ^
%batches% ^
bin/designer-%PACKAGENAME%.bat.tmpl ^
bin/python-%PACKAGENAME%.bat.tmpl ^
etc/postinstall/%PACKAGENAME%.bat ^
etc/preremove/%PACKAGENAME%.bat
if errorlevel 1 (echo tar failed & goto error)
@@ -292,3 +301,5 @@ if exist %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 del %PACKAGENAME%-%VERSION%-%

:end
echo FINISHED: %DATE% %TIME%

endlocal
@@ -1,4 +1,5 @@
textreplace -std -t bin\designer-@package@.bat
textreplace -std -t bin\python-@package@.bat

for %%g in (@grassversions@) do (
textreplace -std -t bin\@package@-g%%g.bat
@@ -11,5 +11,6 @@ del "%OSGEO4W_STARTMENU%\Qt Designer with QGIS @version@ custom widgets (Nightly
del "%ALLUSERSPROFILE%\Desktop\Qt Designer with QGIS @version@ custom widgets (Nightly).lnk"

del "%OSGEO4W_ROOT%"\bin\designer-@package@.bat
del "%OSGEO4W_ROOT%"\bin\python-@package@.bat
del "%OSGEO4W_ROOT%"\apps\@package@\python\qgis\qgisconfig.py
del "%OSGEO4W_ROOT%"\apps\@package@\bin\qgis.reg
@@ -0,0 +1,12 @@
@echo off
call "%~dp0\o4w_env.bat"
@echo off
path %OSGEO4W_ROOT%\apps\@package@\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\@package@\qtplugins;%OSGEO4W_ROOT%\apps\qt4\plugins
set PYTHONPATH=%OSGEO4W_ROOT%\apps\@package@\python;%PYTHONPATH%
"%OSGEO4W_ROOT%"\bin\python.exe %*

0 comments on commit 6386dc6

Please sign in to comment.
You can’t perform that action at this time.