diff --git a/support/buildbot/startbuild.pl b/support/buildbot/startbuild.pl index 5c500e9..f54bb7b 100755 --- a/support/buildbot/startbuild.pl +++ b/support/buildbot/startbuild.pl @@ -12,10 +12,11 @@ require 'helpers.pm'; chdir('..'); chdir('..'); -Build('loader', '', 'server', 'full'); -Build('core-legacy', '', 'metamod.1.ep1', ''); -Build('core', 'OrangeBox', 'metamod.2.ep2', ''); -Build('core', 'Left4Dead', 'metamod.2.l4d', ''); +# Folder .vcproj Engine Binary Suffix type +Build('loader', 'mm_loader', '', 'server', 'full'); +Build('core-legacy', 'mm_core-legacy', '', 'metamod.1.ep1', ''); +Build('core', 'mm_core', 'OrangeBox', 'metamod.2.ep2', ''); +Build('core', 'mm_core', 'Left4Dead', 'metamod.2.l4d', ''); #Structure our output folder mkdir('OUTPUT'); @@ -43,7 +44,7 @@ sub Copy sub Build { - my ($srcdir, $objdir, $binary, $suffix) = (@_); + my ($srcdir, $vcproj, $objdir, $binary, $suffix) = (@_); if ($^O eq "linux") { @@ -57,6 +58,45 @@ sub Build } BuildLinux($srcdir, $objdir, $binary); } + else + { + $binary .= '.dll'; + BuildWindows($srcdir, $vcproj, $objdir, $binary); + } +} + +sub BuildWindows +{ + my ($srcdir, $vcproj, $build, $binary) = (@)); + my ($dir, $file, $param, $vcbuilder, $cmd); + + $dir = getcwd(); + chdir($srcdir); + + $param = "Release"; + if ($build eq "Orange Box") + { + $param = "Release - Orange Box"; + } + elsif ($build eq "Left4Dead") + { + $param = "Release - Left 4 Dead"; + } + + print "Clean building $srcdir...\n"; + $vcbuilder = $ENV{'VC9BUILDER'}; + $cmd = "\"$vcbuilder\" /rebuild \"$vcproj.vcproj\" \"$param\""; + print "$cmd\n"; + system($cmd); + CheckFailure(); + + $file = "$param\\$binary"; + + die "Output library not found: $file\n" if (!-f $file); + + chdir($dir); + + push(@LIBRARIES, "$srcdir\\$file"); } sub BuildLinux