local $tmpfile = "site-local.sed" ;\r
system("del $tmpfile");\r
# Basic substitutions:\r
+ local $dblback_wd = $wd;\r
+ $dblback_wd =~ s/\\/\\\\/g;\r
+ !system("echo s/%BUILDDIR%/$dblback_wd/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
local $dblback_staging = "$wd\\staging";\r
- $dblback_staging =~ s/\\/\\\\/g;\r
- !system("echo s/%TARGETDIR%/$dblback_staging/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
+ $dblback_staging =~ s/\\/\\\\/g;\r
+ !system("echo s/%TARGETDIR%/$dblback_staging/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
local $dblback_sample = "$wd\\staging\\sample";\r
- $dblback_sample =~ s/\\/\\\\/g;\r
+ $dblback_sample =~ s/\\/\\\\/g;\r
!system("echo s/%CONFIGDIR-WIX%/$dblback_sample/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
!system("echo s/%CONFIGDIR-NSI%/$dblback_staging/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
!system("echo s/%VERSION_MAJOR%/$config->{Versions}->{'VER_PROD_MAJOR_STR'}/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
!system("echo s/%VERSION_MINOR%/$config->{Versions}->{'VER_PROD_MINOR_STR'}/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
!system("echo s/%VERSION_PATCH%/$config->{Versions}->{'VER_PROD_REV_STR'}/ >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
# Strip out some defines so they can be replaced: [used for site-local.nsi]\r
- !system("echo /\^!define\.\*RELEASE\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
- !system("echo /\^!define\.\*DEBUG\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
- !system("echo /\^!define\.\*BETA\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
+ !system("echo /\^!define\.\*RELEASE\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \r
+ !system("echo /\^!define\.\*DEBUG\.\*\$/d >> $tmpfile") or die "Fatal -- Couldn't modify $tmpfile."; \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("sed -f $tmpfile site-local-tagged.wxi > 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
local $tmpfile = "site-local.sed" ;\r
- !system("sed -f ..\\wix\\$tmpfile site-local-tagged.nsi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi.";\r
+ !system("sed -f ..\\wix\\$tmpfile site-local-tagged.nsi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi.";\r
# Add DEBUG or RELEASE:\r
if ($switches[0]->{debug}->{value}) { ## debug build\r
- !system("echo !define DEBUG >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
+ !system("echo !define DEBUG >> b.tmp") or die "Fatal -- Couldn't modify b.tmp."; \r
}\r
else { ## release build\r
- !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
+ !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
# Add BETA if present:\r
if ( exists $config->{Versions}->{'BETA_STR'}) {\r
!system("echo !define BETA $config->{Versions}->{'BETA_STR'} >> 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 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
\r
if ($verbose) {print "Info -- *** End prepackage.\n";}\r
\r