summaryrefslogtreecommitdiffstats
path: root/src/windows/build
diff options
context:
space:
mode:
authorKevin Koch <kpkoch@mit.edu>2007-03-05 22:34:25 +0000
committerKevin Koch <kpkoch@mit.edu>2007-03-05 22:34:25 +0000
commit2267663d932a47cabf1614d4a8d5838797b53335 (patch)
tree8dfa1edfdf756a8a909d536b8afbe36c25d51bd2 /src/windows/build
parent3295ccd5a4ac57484f3b504cea4ac41c1242b908 (diff)
downloadkrb5-2267663d932a47cabf1614d4a8d5838797b53335.tar.gz
krb5-2267663d932a47cabf1614d4a8d5838797b53335.tar.xz
krb5-2267663d932a47cabf1614d4a8d5838797b53335.zip
Train build script to use repository sources, omit sample configuration. [wix area.]
Add control of the repository access step, fetch all sources from the repository. Track in documentation. Eliminate unhelpful output during pre-package step. The next step is to fetch only krb5/src/windows/build and run the entire build. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19207 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/build')
-rw-r--r--src/windows/build/BKWconfig.xml9
-rw-r--r--src/windows/build/bkw-automation.html37
-rw-r--r--src/windows/build/bkw.pl364
3 files changed, 242 insertions, 168 deletions
diff --git a/src/windows/build/BKWconfig.xml b/src/windows/build/BKWconfig.xml
index 17b88af85c..61e5ee59d2 100644
--- a/src/windows/build/BKWconfig.xml
+++ b/src/windows/build/BKWconfig.xml
@@ -5,8 +5,8 @@
<!-- The most changeable parameters can be specified on the command line.
Less changeable params are in section Config, below. -->
<Tags>
- <cvs value="2.6.5 build 1234"/>
-<!-- <svn value="http://anonsvn.mit.edu/foo/bar"/> -->
+ <cvs value=""/>
+<!-- <svn value=""/> -->
</Tags>
<Directories>
<!-- Sources will be checked out of repositories into <src>. The structure
@@ -20,7 +20,8 @@
</Directories>
<Options>
<debug value="0" />
- <log value="1" path="bkw_pl.log" />
+ <logfile value="1" path="bkw.pl.log" />
+ <repository value="skip" />
<clean value="0" />
<nomake value="0" />
<nopackage value="0" />
@@ -30,7 +31,7 @@
</CommandLine>
<Config>
<CVSROOT name=":kserver:cvs.mit.edu:/cvs/pismere" />
- <SVNURL name="" />
+ <SVNURL name="svn+ssh://svn.mit.edu/" />
</Config>
<Stages>
<FetchSources></FetchSources>
diff --git a/src/windows/build/bkw-automation.html b/src/windows/build/bkw-automation.html
index 6bad28bb4d..d7ca7a0c3a 100644
--- a/src/windows/build/bkw-automation.html
+++ b/src/windows/build/bkw-automation.html
@@ -112,7 +112,42 @@
<TT>/vverbose&nbsp;&nbsp;&nbsp;&nbsp; very verbose output</TT><BR>
<TT>/config path&nbsp; Path to config file</TT><BR>
<TT>/logfile path Where to write output. If omitted, ...</TT><BR>
- <TT>Other:</TT><BR>
+ <TT>/srcdir dir&nbsp;&nbsp; Source directory to use. Should contain
+ <BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>pismere/athena.
+ If cvstag or svntag is null,
+ <BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ the directory should be prepopulated.
+ <BR>
+ </TT><TT>/outdir dir&nbsp;&nbsp; Directory to be created where build results will
+ go
+ <BR>
+ /repository checkout | co \ What repository action to take.
+ <BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </TT><TT>update&nbsp;&nbsp;
+ | up | Options are to checkout, update or<BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ / take no action [skip].
+ <BR>
+ /cvstag tag&nbsp;&nbsp; \ For whichever of these tags is specified,
+ <BR>
+ </TT><TT>/svntag url&nbsp;&nbsp; / the repository action will be done into srcdir
+ <BR>
+ /debug Do debug make instead of release make
+ <BR>
+ /nomake Skip make step
+ <BR>
+ /nopackage Skip packaging step
+ <BR>
+ /clean Build clean target
+ <BR>
+ /verbose Debug mode - verbose output
+ <BR>
+ /config path Path to config file
+ <BR>
+ /logfile path Where to write output. If omitted, ...<BR>
+ </TT><TT>Other:</TT><BR>
<TT>NMAKE-options any options you want to pass to NMAKE, which can be:</TT><BR>
<TT>(note: /nologo is always used)</TT><BR>
<TT>[ nmake options follow ]</TT></P>
diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl
index 60ada43c3b..900d4ca44c 100644
--- a/src/windows/build/bkw.pl
+++ b/src/windows/build/bkw.pl
@@ -5,18 +5,16 @@ use FindBin;
use File::Spec;
use File::Basename;
use lib "$FindBin::Bin/build/lib";
-#use Logger;
+use ActivePerl::PPM::Logger;
use Getopt::Long;
use Cwd;
use XML::Simple;
use Data::Dumper;
-use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
-
-# my $zip = Zip->new();
my $BAIL;
$0 = fileparse($0);
-my $OPT = { logfile => 'bkw.pl.log' };
+my $OPT = {foo => 'bar'};
+
my $MAKE = 'NMAKE';
sub get_info
@@ -41,10 +39,13 @@ Usage: $0 (-f --config) config-file [options] NMAKE-options
/srcdir dir Source directory to use. Should contain
pismere/athena. If cvstag or svntag is null,
the directory should be prepopulated.
- /cvstag tag \\ For whichever of these tags is specified,
- /svntag url / a checkout will be done into srcdir
- /debug Do debug make instead of release make
/outdir dir Directory to be created where build results will go
+ /repository checkout | co \\ What repository action to take.
+ update | up ) Options are to checkout, update or
+ skip / take no action [skip].
+ /cvstag tag \\ For whichever of these tags is specified,
+ /svntag tag / the repository action will be done into srcdir
+ /debug Do debug make instead of release make
/nomake Skip make step
/nopackage Skip packaging step
/clean Build clean target
@@ -95,6 +96,7 @@ sub main {
'debug|d',
'config|f:s',
'logfile|l:s',
+ 'repository:s',
'clean',
'verbose',
'vverbose',
@@ -167,17 +169,19 @@ sub main {
@prepackage = $config->{Stages}->{PrePackage};
@files = $config->{Stages}->{PrePackage}->{CopyList}->{Files};
- # Update the config with overrides from the command line:
- $tags[0]->{cvs}->{value} = $OPT->{cvstag} if exists $OPT->{cvstag};
- $tags[0]->{svn}->{value} = $OPT->{svnurl} if exists $OPT->{svnurl};
- $paths[0]->{src}->{path} = $OPT->{srcdir} if exists $OPT->{srcdir};
- $paths[0]->{out}->{path} = $OPT->{outdir} if exists $OPT->{outdir};
- $switches[0]->{debug}->{value} = $OPT->{debug} if exists $OPT->{debug};
- $switches[0]->{clean}->{value} = 1 if exists $OPT->{clean};
- $switches[0]->{nomake}->{value} = 1 if exists $OPT->{nomake};
- $switches[0]->{nopackage}->{value} = 1 if exists $OPT->{nopackage};
- $switches[0]->{verbose}->{value} = $OPT->{verbose} if exists $OPT->{verbose};
- $switches[0]->{vverbose}->{value} = $OPT->{verbose} if exists $OPT->{vverbose};
+ # Update the configuration with overrides from the command line:
+ $tags[0]->{cvs}->{value} = $OPT->{cvstag} if exists $OPT->{cvstag};
+ $tags[0]->{svn}->{value} = $OPT->{svnurl} if exists $OPT->{svnurl};
+ $paths[0]->{src}->{path} = $OPT->{srcdir} if exists $OPT->{srcdir};
+ $paths[0]->{out}->{path} = $OPT->{outdir} if exists $OPT->{outdir};
+ $switches[0]->{debug}->{value} = $OPT->{debug} if exists $OPT->{debug};
+ $switches[0]->{clean}->{value} = 1 if exists $OPT->{clean};
+ $switches[0]->{logfile}->{value} = 1 if exists $OPT->{logfile};
+ $switches[0]->{repository}->{value} = $OPT->{repository} if exists $OPT->{repository};
+ $switches[0]->{nomake}->{value} = 1 if exists $OPT->{nomake};
+ $switches[0]->{nopackage}->{value} = 1 if exists $OPT->{nopackage};
+ $switches[0]->{verbose}->{value} = $OPT->{verbose} if exists $OPT->{verbose};
+ $switches[0]->{vverbose}->{value} = $OPT->{verbose} if exists $OPT->{vverbose};
if (exists $OPT->{logfile}) {
$switches[0]->{log}->{path} = $OPT->{logfile};
$switches[0]->{log}->{value} = 1;
@@ -213,41 +217,66 @@ sub main {
##-- Assemble configuration from config file and command line.
# Begin logging:
-# my $l;
-# if ($OPT->{logfile}) {
+ my $l;
+ if ($OPT->{logfile}) {
# $l = new Logger $OPT->{logfile} or die "Fatal -- Can't create Logger.";
# $l->start;
-# }
-
-if (!$switches[0]->{nomake}->{value}) {
- if ($verbose) {print "Info -- *** Begin fetching sources.\n";}
-
- my ($wd, $result);
- $wd = $paths[0]->{src}->{path};
- chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";
- if ($verbose) {print "Info -- chdir to $wd\n";}
-
- #if (! -d "pismere") {print "Warning -- can't find pismere in $wd. It will be created.\n";}
- #if (! -d "pismere\\athena") {print "Warning -- can't find pismere\\athena in $wd. It will be created.\n";}
-
- if ($tags[0]->{cvs}->{value}) {
- # Set up cvs environment variables:
- print "Warning -- cvs checkout skipped for now.\n";
- # system("cvs checkout krb") or die "Fatal -- checkout of cvs source failed; return code $?\n";
}
- else {print "Info -- cvs tag not specified; no cvs sources will be checked out.\n";}
+
+##++ Begin repository action:
+ my $sw = $switches[0]->{repository}->{value};
+ my $rverb;
+ if ($sw =~ /skip/i) {print "Info -- Skipping repository access.\n";}
+ elsif ($sw =~ /update/i) {$rverb = "update";}
+ elsif ($sw =~ /up/i) {$rverb = "update";}
+ elsif ($sw =~ /checkout/i) {$rverb = "checkout";}
+ elsif ($sw =~ /co/i) {$rverb = "checkout";}
+ else {
+ print "Fatal -- invalid /repository value.\n";
+ usage();
+ die;
+ }
+
+ my $wd = $paths[0]->{src}->{path}."\\pismere";
- if ($tags[0]->{svn}->{value}) {
- # Set up svn environment variables:
- print "Warning -- svn checkout skipped for now.\n";
- # system("svn checkout krb") or die "Fatal -- checkout of svn source failed; return code $?\n";
+ if ($rverb) {
+ if ($verbose) {print "Info -- *** Begin fetching sources.\n";}
+
+ my $krb5dir = $wd."\\athena\\auth\\krb5";
+
+ # If we are fetching into a new directory, the directory structure won't exist and many cd commands will fail.
+ # Use an xcopy to create the directory paths we will need:
+ !system("echo tempfile > kpk.tmp") or die "Fatal -- Couldn't creqte a simple temp file.\n";
+ !system("echo F | xcopy /y kpk.tmp $krb5dir") or die "Fatal -- Couldn't create path $krb5dir\n";
+ !system("del kpk.tmp") or die "Fatal -- Couldn't clean up temporary file.\n";
+
+ chdir("$wd") or die "Fatal -- couldn't chdir to $wd\n";
+ if ($verbose) {print "Info -- chdir to $wd\n";}
+
+ #if (! -d "pismere") {print "Warning -- can't find pismere in $wd. It will be created.\n";}
+ if (! -d "athena") {print "Warning -- can't find pismere\\athena in $wd. It will be created.\n";}
+
+ # [TODO] Set up cvs environment variables:
+ my $cvscmd = "cvs $rverb ";
+ if ($tags[0]->{cvs}->{value}) {$cvscmd .= $tags[0]->{cvs}->{value};}
+ !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n";
+
+ # [TODO] Set up svn environment variables:
+ chdir("$krb5dir") or die "Fatal -- couldn't chdir to $krb5dir\n";
+ if ($verbose) {print "Info -- chdir to $krb5dir\n";}
+ my $svncmd = "svn $rverb ";
+ if ($tags[0]->{svn}->{value}) {$svncmd .= $tags[0]->{svn}->{value};}
+ !system($svncmd) or die "Fatal -- command \"$svncmd\" failed; return code $?\n";
+
+ if ($verbose) {print "Info -- *** End fetching sources.\n";}
}
- else {print "Info -- svn tag not specified; no svn sources will be checked out.\n";}
-
- if ($verbose) {print "Info -- *** End fetching sources.\n";}
+##-- End repository action.
if ($verbose) {print "Info -- *** Begin preparing for build.\n";}
-
+ $wd = $paths[0]->{src}->{path};
+ chdir("$wd") or die "Fatal -- couldn't chdir to $wd\n";
+ if ($verbose) {print "Info -- chdir to $wd\n";}
+
my ($path, $destpath);
# Copy athena\scripts\site\graft\krb5\Makefile.src to athena\auth\krb5:
@@ -267,135 +296,145 @@ if (!$switches[0]->{nomake}->{value}) {
if ($verbose) {print "Info -- *** End preparing for build.\n";}
- my ($buildtarget, $buildtext);
- if ($switches[0]->{clean}->{value}) {
- $buildtarget = "clean" ;
- $buildtext = " clean."
- }
- else {
- $buildtarget = "" ;
- $buildtext = "."
- }
- if ($verbose) {print "Info -- *** Begin build".$buildtext."\n";}
-
- chdir("pismere/athena") or die "Fatal -- couldn't chdir to source directory $wd\\pismere\\athena\n";
- if ($verbose) {print "Info -- chdir to $wd\\pismere\\athena\n";}
- !system("perl ../scripts/build.pl --softdirs $buildtarget") or die "Fatal -- build $buildtarget failed.";
+ if (!$switches[0]->{nomake}->{value}) {
+ my ($buildtarget, $buildtext);
+ if ($switches[0]->{clean}->{value}) {
+ $buildtarget = "clean" ;
+ $buildtext = " clean."
+ }
+ else {
+ $buildtarget = "" ;
+ $buildtext = "."
+ }
+ if ($verbose) {print "Info -- *** Begin build".$buildtext."\n";}
- chdir("..") or die "Fatal -- couldn't chdir to $wd\\pismere.";
- if ($switches[0]->{clean}->{value}) {
- if (-d "staging") {
- !system("rm -rf staging") or die "Fatal -- Couldn't remove pismere/staging.";
+ chdir("pismere/athena") or die "Fatal -- couldn't chdir to source directory $wd\\pismere\\athena\n";
+ if ($verbose) {print "Info -- chdir to $wd\\pismere\\athena\n";}
+ !system("perl ../scripts/build.pl --softdirs $buildtarget") or die "Fatal -- build $buildtarget failed.";
+
+ chdir("..") or die "Fatal -- couldn't chdir to $wd\\pismere.";
+ if ($switches[0]->{clean}->{value}) {
+ if (-d "staging") {
+ !system("rm -rf staging") or die "Fatal -- Couldn't remove pismere/staging.";
+ }
}
- }
-
- if ($verbose) {print "Info -- *** End build".$buildtext."\n";}
- } ## End make conditional.
-if (!$switches[0]->{nopackage}->{value}) {
- if ($verbose) {print "Info -- *** Begin prepackage.\n";}
+ if ($verbose) {print "Info -- *** End build".$buildtext."\n";}
+ } ## End make conditional.
- # The build results are copied to a staging area, where the packager expects to find them.
- # We put the staging area in the fixed area .../pismere/staging.
- $wd = $paths[0]->{src}->{path}."\\pismere";
- my $staging_area = "$wd\\staging";
- chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";
- if ($verbose) {print "Info -- chdir to $wd\n";}
- (-e $staging_area) or makeDir($staging_area);
+ if (!$switches[0]->{nopackage}->{value}) {
+ if ($verbose) {print "Info -- *** Begin prepackage.\n";}
+
+ # The build results are copied to a staging area, where the packager expects to find them.
+ # We put the staging area in the fixed area .../pismere/staging.
+ $wd = $paths[0]->{src}->{path}."\\pismere";
+ my $staging_area = "$wd\\staging";
+ chdir($wd) or die "Fatal -- couldn't chdir to $wd\n";
+ if ($verbose) {print "Info -- chdir to $wd\n";}
+ (-e $staging_area) or makeDir($staging_area);
+
+ my $src = $paths[0]->{src}->{path};
+ my $CopyList = $prepackage[0]->{CopyList};
+
+ # A path can contain a variable part, which will be handled here. If the variable part is
+ # the Always or BuildDependent tag, then the variable will be changed to the
+ # build-type-dependent PathFragment.
+ # If the variable part is the IgnoreTag, then the file will not be copied.
+ my ($PathFragment, $BuildDependentTag, $IgnoreTag);
- my $src = $paths[0]->{src}->{path};
- my $CopyList = $prepackage[0]->{CopyList};
+ my $AlwaysTag = $CopyList->{Config}->{AlwaysTag}->{value};
+ if ($switches[0]->{debug}->{value}) { ## Debug build tags:
+ $PathFragment = $CopyList->{Config}->{DebugArea}->{value};
+ $BuildDependentTag = $CopyList->{Config}->{DebugTag}->{value};
+ $IgnoreTag = $CopyList->{Config}->{ReleaseTag}->{value};
+ }
+ else { ## Release build tags:
+ $PathFragment = $CopyList->{Config}->{ReleaseArea}->{value};
+ $BuildDependentTag = $CopyList->{Config}->{ReleaseTag}->{value};
+ $IgnoreTag = $CopyList->{Config}->{DebugTag}->{value};
+ }
- # A path can contain a variable part, which will be handled here. If the variable part is
- # the Always or BuildDependent tag, then the variable will be changed to the
- # build-type-dependent PathFragment.
- # If the variable part is the IgnoreTag, then the file will not be copied.
- my ($PathFragment, $BuildDependentTag, $IgnoreTag);
-
- my $AlwaysTag = $CopyList->{Config}->{AlwaysTag}->{value};
- if ($switches[0]->{debug}->{value}) { ## Debug build tags:
- $PathFragment = $CopyList->{Config}->{DebugArea}->{value};
- $BuildDependentTag = $CopyList->{Config}->{DebugTag}->{value};
- $IgnoreTag = $CopyList->{Config}->{ReleaseTag}->{value};
- }
- else { ## Release build tags:
- $PathFragment = $CopyList->{Config}->{ReleaseArea}->{value};
- $BuildDependentTag = $CopyList->{Config}->{ReleaseTag}->{value};
- $IgnoreTag = $CopyList->{Config}->{DebugTag}->{value};
- }
-
- # Copy all the files in the CopyList:
- $i = 0;
- my $nfiles = 0;
- while ($files[0]->{File}[$i]) {
- my ($name, $newname, $from, $to, $ignore);
- $name = $files[0]->{File}->[$i]->{name};
- if (exists $files[0]->{File}->[$i]->{newname}) {$newname = $files[0]->{File}->[$i]->{newname};}
- else {$newname = $name;}
- if ($name) {
- $ignore = 0;
- $from = "$src\\pismere\\athena\\$files[0]->{File}->[$i]->{from}\\$name";
- $to = "$src\\pismere\\staging\\$files[0]->{File}->[$i]->{to}\\$newname";
- if (index($from.$to, $IgnoreTag) <0) { ## Test for IgnoreTag
- # Apply PathTag substitutions:
- $from =~ s/$AlwaysTag/$PathFragment/g;
- $to =~ s/$AlwaysTag/$PathFragment/g;
- $from =~ s/$BuildDependentTag/$PathFragment/g;
- $to =~ s/$BuildDependentTag/$PathFragment/g;
- # We use xcopy instead of copy because it will create directories for us:
- if (system("echo F | xcopy /D /F /Y $from $to 2>NUL") != 0) {
- # xcopy failed.
- if (!exists $files[0]->{File}->[$i]->{notrequired}) {
- ( -e $from) or die "Fatal -- can't find $from";
- die "Fatal -- Copy of $from to $to failed";
+ # Copy all the files in the CopyList:
+ $i = 0;
+ my $nfiles = 0;
+ my $bOldDot = 1;
+ my $bDot = 0;
+ while ($files[0]->{File}[$i]) {
+ my ($name, $newname, $from, $to, $ignore);
+ $name = $files[0]->{File}->[$i]->{name};
+ if (exists $files[0]->{File}->[$i]->{newname}) {$newname = $files[0]->{File}->[$i]->{newname};}
+ else {$newname = $name;}
+ if ($name) {
+ $ignore = 0;
+ $from = "$src\\pismere\\athena\\$files[0]->{File}->[$i]->{from}\\$name";
+ $to = "$src\\pismere\\staging\\$files[0]->{File}->[$i]->{to}\\$newname";
+ if (index($from.$to, $IgnoreTag) <0) { ## Test for IgnoreTag
+ # Apply PathTag substitutions:
+ $from =~ s/$AlwaysTag/$PathFragment/g;
+ $to =~ s/$AlwaysTag/$PathFragment/g;
+ $from =~ s/$BuildDependentTag/$PathFragment/g;
+ $to =~ s/$BuildDependentTag/$PathFragment/g;
+ # We use xcopy instead of copy because it will create directories for us:
+ if (system("echo F | xcopy /D /F /Y $from $to > a.tmp 2>NUL") != 0) {
+ # xcopy failed.
+ if (!exists $files[0]->{File}->[$i]->{notrequired}) {
+ ( -e $from) or die "Fatal -- can't find $from";
+ die "Fatal -- Copy of $from to $to failed";
+ }
+ }
+ else { ## To show progress when files aren't copied, print a string of dots.
+ open(MYINPUTFILE, "<a.tmp");
+ my(@lines) = <MYINPUTFILE>;
+ foreach $line (@lines) {
+ $bDot = ($line =~ /^0/);
+ }
+ close(MYINPUTFILE);
+ if (!$bDot && $bOldDot) {print "\n";}
+ if ($bDot) {print ".";}
+ else {print "$from copied to $to\n";}
+ $bOldDot = $bDot;
}
}
- else {$nfiles++;}
}
+ $i++;
}
- $i++;
- }
+ if ($bDot) {print "\n";}
+
+# # Copy the extras:
+# print "Info -- Absent a way of scripting unzip, the instructions require manually unzipping into\n";
+# print " the target area $src\\pismere\\staging.\n";
+# # my $extradir = $paths[0]->{extras}->{path};
+# # !system("xcopy /d/f/y/s $src\\pismere\\athena\\$extradir\\* $src\\pismere\\staging") or die "Fatal -- Couldn't copy extras from $src\\pismere\\athena\\$extradir";
+
+ chdir("staging\\install\\wix") or die "Fatal -- Couldn't cd to $wd\\staging\\install\\wix";
- # Copy the extras:
- print "Info -- Absent a way of scripting unzip, the instructions require manually unzipping into\n";
- print " the target area $src\\pismere\\staging.\n";
- # my $extradir = $paths[0]->{extras}->{path};
- # !system("xcopy /d/f/y/s $src\\pismere\\athena\\$extradir\\* $src\\pismere\\staging") or die "Fatal -- Couldn't copy extras from $src\\pismere\\athena\\$extradir";
+ # Correct errors in files.wxi:
+ !system("sed 's/WorkingDirectory=\"\\[dirbin\\]\"/WorkingDirectory=\"dirbin\"/g' files.wxi > a.tmp") or die "Fatal -- Couldn't modify files.wxi.";
+ !system("copy /y a.tmp files.wxi") or die "Fatal -- Couldn't update files.wxi.";
+ !system("del a.tmp") or print "Warning -- Couldn't clean up temporary file $wd\\staging\\installer\\wix\\a.tmp.\n";
+
+ # Update paths in site-local.wxi:
+ my $dblback_originalDir = $originalDir;
+ $dblback_originalDir =~ s/\\/\\\\/g;
+ !system("sed -f $dblback_originalDir\\site-local.sed site-local.wxi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi.";
+ my $hexback_wd = $wd;
+ $hexback_wd =~ s/\\/\\\\\\\\\\\\/g;
+ !system("sed 's/%%TARGETDIR%%/$hexback_wd\\\\\\staging\\\\\\/' b.tmp > c.tmp") or die "Fatal -- Couldn't modify site-local.wxi temporary file.";
+ !system("sed 's/%%CONFIGDIR%%/$hexback_wd\\\\\\staging\\\\\\sample\\\\\\/' c.tmp > d.tmp") or die "Fatal -- Couldn't modify site-local.wxi temporary file.";
+ !system("copy /y d.tmp site-local.wxi") or die "Fatal -- Couldn't replace site-local.wxi.";
- chdir("staging\\install\\wix") or die "Fatal -- Couldn't cd to $wd\\staging\\install\\wix";
+ # Copy krb.conf from ...\athena\auth\krb5\src\config-files to pismere\staging\samples\krb5.ini:
+ !system("echo F | xcopy /D $wd\\athena\\auth\\krb5\\src\\config-files\\krb5.conf $wd\\staging\\sample\\krb5.ini")
+ or die "Fatal -- Couldn't update $wd\\staging\\sample\\krb5.ini.";
- # Correct errors in files.wxi:
- !system("sed 's/WorkingDirectory=\"\\[dirbin\\]\"/WorkingDirectory=\"dirbin\"/g' files.wxi > a.tmp") or die "Fatal -- Couldn't modify files.wxi.";
- !system("copy /y a.tmp files.wxi") or die "Fatal -- Couldn't update files.wxi.";
- !system("del a.tmp") or print "Warning -- Couldn't clean up temporary file $wd\\staging\\installer\\wix\\a.tmp.\n";
+ if ($verbose) {print "Info -- *** End prepackage.\n";}
- # Update paths in site-local.wxi:
- my $dblback_originalDir = $originalDir;
- $dblback_originalDir =~ s/\\/\\\\/g;
- !system("sed -f $dblback_originalDir\\site-local.sed site-local.wxi > b.tmp") or die "Fatal -- Couldn't modify site-local.wxi.";
- my $hexback_wd = $wd;
- $hexback_wd =~ s/\\/\\\\\\\\\\\\/g;
- !system("sed 's/%%TARGETDIR%%/$hexback_wd\\\\\\staging\\\\\\/' b.tmp > c.tmp") or die "Fatal -- Couldn't modify site-local.wxi temporary file.";
- !system("sed 's/%%CONFIGDIR%%/$hexback_wd\\\\\\staging\\\\\\sample\\\\\\/' c.tmp > d.tmp") or die "Fatal -- Couldn't modify site-local.wxi temporary file.";
- !system("copy /y d.tmp site-local.wxi") or die "Fatal -- Couldn't replace site-local.wxi.";
-
- # Copy krb.conf from ...\athena\auth\krb5\src\config-files to pismere\staging\samples\krb5.ini:
- !system("echo F | xcopy /D $wd\\athena\\auth\\krb5\\src\\config-files\\krb5.conf $wd\\staging\\sample\\krb5.ini")
- or die "Fatal -- Couldn't update $wd\\staging\\sample\\krb5.ini.";
-
- # Sam said to leave these files out, but it is faster to copy them now
- # than to figure out how to modify the wix configs to ignore them:
- !system("echo F | xcopy /D $wd\\staging\\kfw-2.5-extra\\sample-config\\*.con $wd\\staging\\sample")
- or die "Fatal -- Couldn't copy $wd\\staging\\kfw-2.5-extra\\sample-config\\*.con.";
-
- if ($verbose) {print "Info -- *** End prepackage.\n";}
+ # Make the msi:
+ !system("nmake") or die "Fatal -- Couldn't make kfw.msi.";
- # Make the msi:
- !system("nmake") or die "Fatal -- Couldn't make kfw.msi.";
-
- if ($verbose) {print "Info -- *** Begin package.\n";}
- if ($verbose) {print "Info -- *** End package.\n";}
- } ## End package conditional.
+ if ($verbose) {print "Info -- *** Begin package.\n";}
+ if ($verbose) {print "Info -- *** End package.\n";}
+ } ## End package conditional.
#End logging:
# if (!$OPT->{nolog}) {
@@ -403,10 +442,9 @@ if (!$switches[0]->{nopackage}->{value}) {
# }
return $errorState;
-}
+ } ## End subroutine main.
$SIG{'INT'} = \&handler;
$SIG{'QUIT'} = \&handler;
-##exit (0);
exit(main()); \ No newline at end of file