Only copy install/[wix|nsi] areas into install builder temp areas.
authorKevin Koch <kpkoch@mit.edu>
Fri, 13 Apr 2007 03:00:21 +0000 (03:00 +0000)
committerKevin Koch <kpkoch@mit.edu>
Fri, 13 Apr 2007 03:00:21 +0000 (03:00 +0000)
Write site-local files to those temp areas.  Now tagged files stay in the staging area and are incorporated into the installers.  The substituted files are only in the installer build temp areas.

Target_Version: 1.6.1
Ticket: 5521
Tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19451 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/build/bkw.pl

index 7230c29c19c1bbdb024aa1ad2942a0f12a983f16..e935b3213f329793d6c9b8b92ce6f59a10078f01 100644 (file)
@@ -546,6 +546,12 @@ sub main {
             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
@@ -575,19 +581,17 @@ sub main {
         !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
@@ -596,40 +600,35 @@ sub main {
             !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