Bootstrap performs all steps up to executing builer now.
authorDavid Anderson <dvander@alliedmods.net>
Sat Sep 06 09:12:21 2008 +0000 (2008-09-06)
changeset 2256de422b59bdfc
parent 2255 fbd5031ee601
child 2257 4c8e3bfa65d8
Bootstrap performs all steps up to executing builer now.
Builder sends error code on failure now.
tools/buildbot/bootstrap.pl
tools/builder/Main.cs
     1.1 --- a/tools/buildbot/bootstrap.pl	Sat Sep 06 08:35:27 2008 +0000
     1.2 +++ b/tools/buildbot/bootstrap.pl	Sat Sep 06 09:12:21 2008 +0000
     1.3 @@ -23,3 +23,37 @@
     1.4  
     1.5  die "Unable to build builder tool!\n" unless -e 'builder.exe';
     1.6  
     1.7 +#Go back to main source dir.
     1.8 +chdir(Build::PathFormat('../..'));
     1.9 +
    1.10 +#Get the source path.
    1.11 +my ($root) = getcwd();
    1.12 +
    1.13 +#Create output folder if it doesn't exist.
    1.14 +if (!(-d 'OUTPUT')) {
    1.15 +    mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
    1.16 +}
    1.17 +
    1.18 +#Write the configuration file.
    1.19 +open(CONF, '>build.cfg') or die("Failed to write build.cfg: $!\n");
    1.20 +print CONF "OutputBase = " . Build::PathFormat($root . '/OUTPUT') . "\n";
    1.21 +print CONF "SourceBase = $root\n";
    1.22 +if ($^O eq "linux") 
    1.23 +{
    1.24 +    print CONF "BuilderPath = /usr/bin/make\n";
    1.25 +}
    1.26 +else
    1.27 +{
    1.28 +    print CONF "BuilderPath = " . $ENV{'MSVC8'} . "\n";
    1.29 +}
    1.30 +close(CONF);
    1.31 +
    1.32 +#Do the annoying revision bumping.
    1.33 +#Linux needs some help here.
    1.34 +if ($^O eq "linux")
    1.35 +{
    1.36 +    Build::Command("flip -u modules.versions");
    1.37 +    Build::Command("flip -u tools/versionchanger.pl");
    1.38 +    Build::Command("chmod +x tools/versionchanger.pl");
    1.39 +}
    1.40 +Build::Command("tools/versionchanger.pl");
     2.1 --- a/tools/builder/Main.cs	Sat Sep 06 08:35:27 2008 +0000
     2.2 +++ b/tools/builder/Main.cs	Sat Sep 06 09:12:21 2008 +0000
     2.3 @@ -44,6 +44,7 @@
     2.4  			catch (System.Exception e) 
     2.5  			{
     2.6  				Console.WriteLine("Build failed: " + e.Message);
     2.7 +                Environment.Exit(1);
     2.8  			}
     2.9  		}
    2.10  	}