Skip to content

Commit

Permalink
osgeo4w: remove pyc on install and uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 23, 2017
1 parent 115ede6 commit 702d4cc
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ms-windows/osgeo4w/package.cmd
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/postinstall-desktop.bat
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions ms-windows/osgeo4w/postinstall-dev.bat
Expand Up @@ -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"
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/postinstall-grass-plugin-common.bat
@@ -0,0 +1 @@
del /s /q "%OSGEO4W_ROOT%\apps\@package@\grass\*.pyc"
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/preremove-desktop.bat
Expand Up @@ -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"
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/preremove-dev.bat
Expand Up @@ -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"
1 change: 1 addition & 0 deletions ms-windows/osgeo4w/preremove-grass-plugin-common.bat
@@ -0,0 +1 @@
del /s /q "%OSGEO4W_ROOT%\apps\@package@\grass\*.pyc"

0 comments on commit 702d4cc

Please sign in to comment.