From 375e91c1d22c5cc2a9107bbc804cbc17794421d4 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 13 Feb 2013 01:22:40 -0600 Subject: [PATCH] Fixed buildbot Perl scripts for Mac OS X build (bug 5601, r=dvander). --- support/buildbot/bootstrap.pl | 8 +++++--- support/buildbot/package.pl | 10 +++++++--- support/buildbot/startbuild.pl | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/support/buildbot/bootstrap.pl b/support/buildbot/bootstrap.pl index 5c9c847b..e464c34b 100755 --- a/support/buildbot/bootstrap.pl +++ b/support/buildbot/bootstrap.pl @@ -14,7 +14,7 @@ chdir(Build::PathFormat('../..')); #Do the annoying revision bumping. #Linux needs some help here. -if ($^O eq "linux") +if ($^O eq "linux" || $^O eq "darwin") { Build::Command("flip -u modules.versions"); Build::Command("flip -u support/versionchanger.pl"); @@ -26,7 +26,7 @@ my $DEVENV = "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe"; #Build the amxmodx builder tool. chdir('installer/builder'); -if ($^O eq "linux") { +if ($^O eq "linux" || $^O eq "darwin") { Build::Command("make"); } else { Build::Command("\"$DEVENV\" builder.csproj /p:Configuration=Release /t:Rebuild"); @@ -45,13 +45,15 @@ Build::Command("mkdir " . Build::PathFormat('../OUTPUT')); open(DIRECTIONS, '>installer/builder/directions.info'); if ($^O eq "linux") { print DIRECTIONS "compress = /bin/tar\n"; +} elsif ($^O eq "darwin") { + print DIRECTIONS "compress = /usr/bin/zip\n"; } else { print DIRECTIONS "compress = C:\\WINDOWS\\zip.exe\n"; } print DIRECTIONS "source = " . Cwd::abs_path('.') . "\n"; print DIRECTIONS "makeopts = \n"; print DIRECTIONS "output = " . Cwd::abs_path('../OUTPUT') . "\n"; -if ($^O eq "linux") { +if ($^O eq "linux" || $^O eq "darwin") { print DIRECTIONS "devenv = /usr/bin/make\n"; } else { print DIRECTIONS "devenv = $DEVENV\n"; diff --git a/support/buildbot/package.pl b/support/buildbot/package.pl index 52c9e6be..874b81de 100755 --- a/support/buildbot/package.pl +++ b/support/buildbot/package.pl @@ -33,8 +33,9 @@ $version .= '-hg' . Build::HgRevNum('.'); #Switch to the output folder. chdir(Build::PathFormat('../../../OUTPUT')); -my (@packages); +my (@packages,@mac_exclude); @packages = ('base', 'cstrike', 'dod', 'esf', 'ns', 'tfc', 'ts'); +@mac_exclude = ('esf', 'ns', 'ts'); my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/); $ftp_path .= "/$major.$minor"; @@ -58,9 +59,12 @@ my ($i); for ($i = 0; $i <= $#packages; $i++) { my ($filename); if ($^O eq "linux") { - $filename = "amxmodx-$version-" . $packages[$i] . ".tar.gz"; + $filename = "amxmodx-$version-" . $packages[$i] . "-linux.tar.gz"; + } elsif ($^O eq "darwin") { + next if ($packages[$i] ~~ @mac_exclude); + $filename = "amxmodx-$version-" . $packages[$i] . "-mac.zip"; } else { - $filename = "amxmodx-$version-" . $packages[$i] . ".zip"; + $filename = "amxmodx-$version-" . $packages[$i] . "-windows.zip"; } print "Uploading $filename...\n"; $ftp->put($filename) diff --git a/support/buildbot/startbuild.pl b/support/buildbot/startbuild.pl index 5f53be73..255d2369 100755 --- a/support/buildbot/startbuild.pl +++ b/support/buildbot/startbuild.pl @@ -10,7 +10,7 @@ require 'helpers.pm'; chdir('../../installer/builder'); my $output; -if ($^O eq "linux") { +if ($^O eq "linux" || $^O eq "darwin") { $output = `mono builder.exe directions.info`; } else { $output = `builder.exe directions.info`;