signFiles($config->{Stages}->{PostPackage}->{Config}->{Signing}, $config);\r
}\r
\r
+ # Create working directories for building the installers:\r
+ if (-d "$wd\\buildwix") {!system("rm -rf $wd\\buildwix/*") or die "Fatal -- Couldn't clean $wd\\buildwix."} \r
+ !system("echo D | xcopy /s $wd\\staging\\install\\wix\\*.* $wd\\buildwix") or die "Fatal -- Couldn't create $wd\\buildwix.";\r
+ if (-d "$wd\\buildnsi") {!system("rm -rf $wd\\buildnsi/*") or die "Fatal -- Couldn't clean $wd\\buildnsi."} \r
+ !system("echo D | xcopy /s $wd\\staging\\install\\nsis\\*.* $wd\\buildnsi") or die "Fatal -- Couldn't create $wd\\buildnsi.";\r
+\r
chdir("$staging\\install\\wix") or die "Fatal -- Couldn't cd to $staging\\install\\wix";\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
# Correct errors in files.wxi:\r
!system("echo /\^!define\.\*BETA\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
\r
# Run the script on site-local.wxi:\r
- !system("sed -f $tmpfile site-local-tagged.wxi > site-local.wxi") or die "Fatal -- Couldn't modify site-local.wxi.";\r
- !system("rm site-local-tagged.wxi") or die "Fatal -- Couldn't remove site-local-tagged.wsi.";\r
+ !system("sed -f $tmpfile site-local-tagged.wxi > $wd\\buildwix\\site-local.wxi") or die "Fatal -- Couldn't modify site-local.wxi.";\r
\r
# Now update site-local.nsi:\r
chdir "..\\nsis";\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
!system("sed -f ..\\wix\\$tmpfile site-local-tagged.nsi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi.";\r
- !system("rm site-local-tagged.nsi") or die "Fatal -- Couldn't remove site-local-tagged.nsi.";\r
# Add DEBUG or RELEASE:\r
if ($odr->{debug}->{def}) { ## debug build\r
!system("echo !define DEBUG >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
}\r
- else { ## release build\r
+ else { ## release build\r
if (!exists $config->{Versions}->{'BETA_STR'}) {!system("echo !define RELEASE >> b.tmp") or die "Fatal -- Couldn't modify b.tmp.";}\r
!system("echo !define NO_DEBUG >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
}\r
!system("echo !define BETA $config->{Versions}->{'BETA_STR'} >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
!system("echo !define NOT_RELEASE >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
}\r
- !system("mv -f b.tmp site-local.nsi") or die "Fatal -- Couldn't replace site-local.nsi.";\r
+ !system("mv -f b.tmp $wd\\buildnsi\\site-local.nsi") or die "Fatal -- Couldn't replace site-local.nsi.";\r
\r
# Run the script on nsi-includes-tagged.nsi:\r
- !system("sed -f ..\\wix\\$tmpfile nsi-includes-tagged.nsi > nsi-includes.nsi") or die "Fatal -- Couldn't modify nsi-includes.nsi.";\r
- !system("rm nsi-includes-tagged.nsi") or die "Fatal -- Couldn't remove nsi-includes-tagged.nsi.";\r
+ !system("sed -f ..\\wix\\$tmpfile nsi-includes-tagged.nsi > $wd\\buildnsi\\nsi-includes.nsi") or die "Fatal -- Couldn't modify nsi-includes.nsi.";\r
!system("rm ..\\wix\\$tmpfile") or die "Fatal -- Couldn't remove $tmpfile.";\r
\r
if ($verbose) {print "Info -- *** End prepackage.\n";}\r
\r
if ($verbose) {print "Info -- *** Begin package.\n";}\r
# Make the msi:\r
- if (-d "$wd\\buildwix") {!system("rm -rf $wd\\buildwix/*") or die "Fatal -- Couldn't clean $wd\\buildwix."} \r
- !system("echo D | xcopy /s $wd\\staging\\*.* $wd\\buildwix") or die "Fatal -- Couldn't create $wd\\buildwix.";\r
- chdir("$wd\\buildwix\\install\\wix") or die "Fatal -- Couldn't cd to $wd\\buildwix\\install\\wix";\r
+ chdir("$wd\\buildwix") or die "Fatal -- Couldn't cd to $wd\\buildwix";\r
print "Info -- *** Make .msi:\n" if ($verbose);\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
!system("$MAKE") or die "Error -- msi installer build failed.";\r
\r
- if (-d "$wd\\buildnsi") {!system("rm -rf $wd\\buildnsi/*") or die "Fatal -- Couldn't clean $wd\\buildnsi."} \r
- !system("echo D | xcopy /s $wd\\staging\\*.* $wd\\buildnsi") or die "Fatal -- Couldn't create $wd\\buildnsi.";\r
- chdir("$wd\\buildnsi\\install\\nsis") or die "Fatal -- Couldn't cd to $wd\\buildnsi\\install\\nsis";\r
- print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
+ chdir("$wd\\buildnsi") or die "Fatal -- Couldn't cd to $wd\\buildnsi";\r
print "Info -- *** Make NSIS:\n" if ($verbose);\r
+ print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
!system("cl.exe killer.cpp advapi32.lib") or die "Error -- nsis killer.exe not built.";\r
!system("rename killer.exe Killer.exe") or die "Error -- Couldn't rename killer.exe";\r
!system("makensis kfw.nsi") or die "Error -- executable installer build failed.";\r
\r
- chdir("$wd") or die "Fatal -- Couldn't cd to $wd";\r
+ chdir("$wd") or die "Fatal -- Couldn't cd to $wd";\r
print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- !system("xcopy /s $wd\\buildwix\\*.msi $wd\\staging") or die "Fatal -- Couldn't copy $wd\\buildwix\\*.msi.";\r
- !system("del $wd\\buildnsi\\install\\nsis\\killer.exe") or die "Fatal -- Couldn't clean $wd\\buildnsi\\install\\nsis\\killer.exe.";\r
- !system("xcopy /s $wd\\buildnsi\\install\\nsis\\*.exe $wd\\staging\\install\\nsis") or die "Fatal -- Couldn't copy $wd\\buildnsi\\install\\nsis\\*.exe.";\r
- !system("rm -rf $wd\\buildwix") or die "Fatal -- Couldn't remove $wd\\buildwix.";\r
- !system("rm -rf $wd\\buildnsi") or die "Fatal -- Couldn't remove $wd\\buildnsi.";\r
+ !system("xcopy /s $wd\\buildwix\\*.msi $wd\\staging\\install\\wix") or die "Fatal -- Couldn't copy $wd\\buildwix\\*.msi.";\r
+ !system("del $wd\\buildnsi\\killer.exe") or die "Fatal -- Couldn't clean $wd\\buildnsi\\killer.exe.";\r
+ !system("xcopy /s $wd\\buildnsi\\*.exe $wd\\staging\\install\\nsis") or die "Fatal -- Couldn't copy $wd\\buildnsi\\install\\nsis\\*.exe.";\r
+ !system("rm -rf $wd\\buildwix") or die "Fatal -- Couldn't remove $wd\\buildwix.";\r
+ !system("rm -rf $wd\\buildnsi") or die "Fatal -- Couldn't remove $wd\\buildnsi.";\r
\r
# Begin packaging extra items:\r
zipXML($config->{Stages}->{PostPackage}, $config); ## Make zips.\r