[GRASS-SVN] r61951 - grass/trunk/mswindows

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 14 11:23:45 PDT 2014


Author: hellik
Date: 2014-09-14 11:23:45 -0700 (Sun, 14 Sep 2014)
New Revision: 61951

Modified:
   grass/trunk/mswindows/GRASS-Installer.nsi.tmpl
Log:
nsis: Clean downloaded MS runtime files  by .onInstSuccess

Modified: grass/trunk/mswindows/GRASS-Installer.nsi.tmpl
===================================================================
--- grass/trunk/mswindows/GRASS-Installer.nsi.tmpl	2014-09-14 16:38:22 UTC (rev 61950)
+++ grass/trunk/mswindows/GRASS-Installer.nsi.tmpl	2014-09-14 18:23:45 UTC (rev 61951)
@@ -60,6 +60,7 @@
 !include "MUI2.nsh"
 !include "LogicLib.nsh"
 !include "FileAssociation.nsh"
+!include "Sections.nsh"
 
 ;----------------------------------------------------------------------------------------------------------------------------
 
@@ -942,10 +943,6 @@
 	ExecWait '"$TEMP\$ORIGINAL_UNTAR_FOLDER\bin\vcredist_2008_x86.exe" /q'	
 	ExecWait '"$TEMP\$ORIGINAL_UNTAR_FOLDER\bin\vcredist_2010_x86.exe" /q'
 	CopyFiles "$TEMP\$ORIGINAL_UNTAR_FOLDER\bin\*.dll" "$INSTALL_DIR\extrabin"
-	Delete "$TEMP\$ARCHIVE_NAME"
-	RMDir /r "$TEMP\$ORIGINAL_UNTAR_FOLDER"
-	;the following doesn't work. Maybe because the installer is still running?
-	RMDir "$TEMP\$ORIGINAL_UNTAR_FOLDER"
 	Goto end
 	
 	download_failed:
@@ -1069,7 +1066,18 @@
 SectionEnd
 
 ;--------------------------------------------------------------------------
+;Clean downloaded MS runtime files  by .onInstSuccess
 
+Function .onInstSuccess
+	${If} ${SectionIsSelected} ${SecMSRuntime}
+		Delete "$TEMP\$ARCHIVE_NAME"
+		RMDir /r "$TEMP\$ORIGINAL_UNTAR_FOLDER"
+		RMDir "$TEMP\$ORIGINAL_UNTAR_FOLDER"	
+	${EndIf}
+FunctionEnd
+
+;--------------------------------------------------------------------------
+
 ;Uninstaller Section
 
 Section "Uninstall"



More information about the grass-commit mailing list