[QGIS Commit] r14719 - trunk/qgis/ms-windows/osgeo4w

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Nov 19 19:30:01 EST 2010


Author: jef
Date: 2010-11-19 16:30:01 -0800 (Fri, 19 Nov 2010)
New Revision: 14719

Modified:
   trunk/qgis/ms-windows/osgeo4w/creatensis.pl
Log:
creatensis.pl: creating the postinstall/preremove batchs is cheap

Modified: trunk/qgis/ms-windows/osgeo4w/creatensis.pl
===================================================================
--- trunk/qgis/ms-windows/osgeo4w/creatensis.pl	2010-11-19 22:12:29 UTC (rev 14718)
+++ trunk/qgis/ms-windows/osgeo4w/creatensis.pl	2010-11-20 00:30:01 UTC (rev 14719)
@@ -118,64 +118,60 @@
 # Create postinstall.bat
 #
 
-unless(-f "../Installer-Files/postinstall.bat") {
-	open F, ">../Installer-Files/postinstall.bat";
+open F, ">../Installer-Files/postinstall.bat";
 
-	print F "\@echo off\r\n";
-	print F "del postinstall.log>>postinstall.log\r\n";
-	print F "echo OSGEO4W_ROOT=%OSGEO4W_ROOT%>>postinstall.log 2>&1\r\n";
-	print F "echo OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%>>postinstall.log 2>&1\r\n";
-	print F "set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT:\\=/%\r\n";
-	print F "if \"%OSGEO4W_ROOT_MSYS:~1,1%\"==\":\" set OSGEO4W_ROOT_MSYS=/%OSGEO4W_ROOT_MSYS:~0,1%/%OSGEO4W_ROOT_MSYS:~3%\r\n";
-	print F "echo OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%>>postinstall.log 2>&1\r\n";
-	print F "PATH %OSGEO4W_ROOT%\\bin;%PATH%>>postinstall.log 2>&1\r\n";
-	print F "cd %OSGEO4W_ROOT%>>postinstall.log 2>&1\r\n";
+print F "\@echo off\r\n";
+print F "del postinstall.log>>postinstall.log\r\n";
+print F "echo OSGEO4W_ROOT=%OSGEO4W_ROOT%>>postinstall.log 2>&1\r\n";
+print F "echo OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%>>postinstall.log 2>&1\r\n";
+print F "set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT:\\=/%\r\n";
+print F "if \"%OSGEO4W_ROOT_MSYS:~1,1%\"==\":\" set OSGEO4W_ROOT_MSYS=/%OSGEO4W_ROOT_MSYS:~0,1%/%OSGEO4W_ROOT_MSYS:~3%\r\n";
+print F "echo OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%>>postinstall.log 2>&1\r\n";
+print F "PATH %OSGEO4W_ROOT%\\bin;%PATH%>>postinstall.log 2>&1\r\n";
+print F "cd %OSGEO4W_ROOT%>>postinstall.log 2>&1\r\n";
 
-	chdir "unpacked";
-	for my $p (<etc/postinstall/*.bat>) {
-		$p =~ s/\//\\/g;
-		my($dir,$file) = $p =~ /^(.+)\\([^\\]+)$/;
+chdir "unpacked";
+for my $p (<etc/postinstall/*.bat>) {
+	$p =~ s/\//\\/g;
+	my($dir,$file) = $p =~ /^(.+)\\([^\\]+)$/;
 
-		print F "echo Running postinstall $file...\r\n";
-		print F "%COMSPEC% /c $p>>postinstall.log 2>&1\r\n";
-		print F "ren $p $file.done>>postinstall.log 2>&1\r\n";
-	}
-	chdir "..";
-
-	print F "ren postinstall.bat postinstall.bat.done\r\n";
-
-	close F;
+	print F "echo Running postinstall $file...\r\n";
+	print F "%COMSPEC% /c $p>>postinstall.log 2>&1\r\n";
+	print F "ren $p $file.done>>postinstall.log 2>&1\r\n";
 }
+chdir "..";
 
-unless(-f "../Installer-Files/preremove.bat") {
-	open F, ">../Installer-Files/preremove.bat";
+print F "ren postinstall.bat postinstall.bat.done\r\n";
 
-	print F "\@echo off\r\n";
-	print F "del preremove.log>>preremove.log\r\n";
-	print F "echo OSGEO4W_ROOT=%OSGEO4W_ROOT%>>preremove.log 2>&1\r\n";
-	print F "echo OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%>>preremove.log 2>&1\r\n";
-	print F "set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT:\\=/%\r\n";
-	print F "if \"%OSGEO4W_ROOT_MSYS:~1,1%\"==\":\" set OSGEO4W_ROOT_MSYS=/%OSGEO4W_ROOT_MSYS:~0,1%/%OSGEO4W_ROOT_MSYS:~3%\r\n";
-	print F "echo OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%>>preremove.log 2>&1\r\n";
-	print F "PATH %OSGEO4W_ROOT%\\bin;%PATH%>>preremove.log 2>&1\r\n";
-	print F "cd %OSGEO4W_ROOT%>>preremove.log 2>&1\r\n";
+close F;
 
-	chdir "unpacked";
-	for my $p (<etc/preremove/*.bat>) {
-		$p =~ s/\//\\/g;
-		my($dir,$file) = $p =~ /^(.+)\\([^\\]+)$/;
+open F, ">../Installer-Files/preremove.bat";
 
-		print F "echo Running preremove $file...\r\n";
-		print F "%COMSPEC% /c $p>>preremove.log 2>&1\r\n";
-		print F "ren $p $file.done>>preremove.log 2>&1\r\n";
-	}
-	chdir "..";
+print F "\@echo off\r\n";
+print F "del preremove.log>>preremove.log\r\n";
+print F "echo OSGEO4W_ROOT=%OSGEO4W_ROOT%>>preremove.log 2>&1\r\n";
+print F "echo OSGEO4W_STARTMENU=%OSGEO4W_STARTMENU%>>preremove.log 2>&1\r\n";
+print F "set OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT:\\=/%\r\n";
+print F "if \"%OSGEO4W_ROOT_MSYS:~1,1%\"==\":\" set OSGEO4W_ROOT_MSYS=/%OSGEO4W_ROOT_MSYS:~0,1%/%OSGEO4W_ROOT_MSYS:~3%\r\n";
+print F "echo OSGEO4W_ROOT_MSYS=%OSGEO4W_ROOT_MSYS%>>preremove.log 2>&1\r\n";
+print F "PATH %OSGEO4W_ROOT%\\bin;%PATH%>>preremove.log 2>&1\r\n";
+print F "cd %OSGEO4W_ROOT%>>preremove.log 2>&1\r\n";
 
-	print F "ren preremove.bat preremove.bat.done\r\n";
+chdir "unpacked";
+for my $p (<etc/preremove/*.bat>) {
+	$p =~ s/\//\\/g;
+	my($dir,$file) = $p =~ /^(.+)\\([^\\]+)$/;
 
-	close F;
+	print F "echo Running preremove $file...\r\n";
+	print F "%COMSPEC% /c $p>>preremove.log 2>&1\r\n";
+	print F "ren $p $file.done>>preremove.log 2>&1\r\n";
 }
+chdir "..";
 
+print F "ren preremove.bat preremove.bat.done\r\n";
+
+close F;
+
 my($major, $minor, $patch, $release, $revision);
 
 open F, "../../CMakeLists.txt";



More information about the QGIS-commit mailing list