Skip to content
Permalink
Browse files

osgeo4w: remove pyc on install and uninstall

  • Loading branch information
jef-n committed Feb 23, 2017
1 parent 115ede6 commit 702d4cc1747ee9c35537748329253b716d3718a0
@@ -289,6 +289,11 @@ for %%g IN (%GRASS_VERSIONS%) do (
set packages=!packages! "-grass-plugin!w!"
)

sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' preremove-grass-plugin-common.bat >%OSGEO4W_ROOT%\etc\preremove\%PACKAGENAME%-grass-plugin-common.bat
if errorlevel 1 (echo creation of grass common preremove failed & goto error)
sed -e 's/@package@/%PACKAGENAME%/g' -e 's/@version@/%VERSION%/g' postinstall-grass-plugin-common.bat >%OSGEO4W_ROOT%\etc\postinstall\%PACKAGENAME%-grass-plugin-common.bat
if errorlevel 1 (echo creation of grass common postinstall failed & goto error)

touch exclude

for %%i in (%packages%) do (
@@ -415,7 +420,9 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-grass-plugin-common
--exclude "apps/%PACKAGENAME%/grass/modules/qgis.v.in7.exe" ^
--exclude "apps/%PACKAGENAME%/grass/bin/qgis.g.browser6.exe" ^
--exclude "apps/%PACKAGENAME%/grass/bin/qgis.g.browser7.exe" ^
"apps/%PACKAGENAME%/grass"
"apps/%PACKAGENAME%/grass" ^
"etc/postinstall/%PACKAGENAME%-grass-plugin-common.bat" ^
"etc/preremove/%PACKAGENAME%-grass-plugin-common.bat"
if errorlevel 1 (echo tar grass-plugin failed & goto error)

for %%g IN (%GRASS_VERSIONS%) do (
@@ -20,3 +20,4 @@ if not %OSGEO4W_DESKTOP_LINKS%==0 nircmd shortcut "%O4W_ROOT%\bin\nircmd.exe" "%
set OSGEO4W_ROOT=%OSGEO4W_ROOT:\=\\%
textreplace -std -t "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
nircmd elevate "%WINDIR%\regedit" /s "%O4W_ROOT%\apps\@package@\bin\qgis.reg"
del /s /q "%OSGEO4W_ROOT%\apps\@package@\python\*.pyc"
@@ -32,3 +32,5 @@ call qt5_env.bat
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
"%OSGEO4W_ROOT%\apps\@package@\crssync"

del /s /q "%OSGEO4W_ROOT%\apps\@package@\*.pyc"
@@ -0,0 +1 @@
del /s /q "%OSGEO4W_ROOT%\apps\@package@\grass\*.pyc"
@@ -12,3 +12,4 @@ del "%OSGEO4W_ROOT%\bin\@package@-bin.env"
del "%OSGEO4W_ROOT%\bin\@package@-designer.bat"
del "%OSGEO4W_ROOT%\apps\@package@\python\qgis\qgisconfig.py"
del "%OSGEO4W_ROOT%\apps\@package@\bin\qgis.reg"
del /s /q "%OSGEO4W_ROOT%\apps\@package@\python\*.pyc"
@@ -19,3 +19,4 @@ del "%OSGEO4W_ROOT%\bin\@package@-designer.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"
del /s /q "%OSGEO4W_ROOT%\apps\@package@\*.pyc"
@@ -0,0 +1 @@
del /s /q "%OSGEO4W_ROOT%\apps\@package@\grass\*.pyc"

0 comments on commit 702d4cc

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