pull up r19368 from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 2 Apr 2007 20:46:00 +0000 (20:46 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 2 Apr 2007 20:46:00 +0000 (20:46 +0000)
 r19368@cathode-dark-space:  kpkoch | 2007-03-31 18:31:33 -0400
 Target_Version: 1.6.1
 Ticket: 5490
 Tags: pullup

 Add signing in staging area before building installers.

ticket: 5490

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19384 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/build/bkw.pl

index 5a2f7230cc06dd4f29731cb4da2035ce09939b00..55d60dfe86e03df5216de2f9ad40ed9e82f25678 100644 (file)
@@ -463,18 +463,25 @@ print Dumper($prunes);
         \r
         # The build results are copied to a staging area, where the packager expects to find them.\r
         #  We put the staging area in the fixed area .../pismere/staging.\r
-        my $prepackage    = $config->{Stages}->{PrePackage};\r
-        my $staging_area = "$wd\\staging";\r
+        my $prepackage  = $config->{Stages}->{PrePackage};\r
+        my $staging     = "$wd\\staging";\r
         chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";\r
         if ($verbose) {print "Info -- chdir to $wd\n";}\r
-        (-e $staging_area) or mkdir($staging_area);\r
+        (-e $staging) or mkdir($staging);\r
         \r
         # Force Where From and To are relative to:\r
         $prepackage->{CopyList}->{Config}->{From}->{root}   = "$wd\\athena";\r
         $prepackage->{CopyList}->{Config}->{To}->{root}     = "$wd\\staging";\r
         copyFiles($prepackage->{CopyList}, $config);        ## Copy any files [this step takes a while]\r
 \r
-        chdir("staging\\install\\wix") or die "Fatal -- Couldn't cd to $wd\\staging\\install\\wix";\r
+        # Sign files:\r
+        chdir($staging) or die "Fatal -- couldn't chdir to $staging\n";\r
+        print "Info -- chdir to ".`cd`."\n"     if ($verbose);\r
+        if ($switches[0]->{sign}->{value}) {\r
+            signFiles($config->{Stages}->{PostPackage}->{Config}->{Signing}, $config);\r
+            }\r
+            \r
+        chdir("$staging\\install\\wix") or die "Fatal -- Couldn't cd to $staging\\install\\wix";\r
         # Correct errors in files.wxi:\r
         !system("sed 's/WorkingDirectory=\"\\[dirbin\\]\"/WorkingDirectory=\"dirbin\"/g' files.wxi > a.tmp") or die "Fatal -- Couldn't modify files.wxi.";\r
         !system("mv a.tmp files.wxi") or die "Fatal -- Couldn't update files.wxi.";\r