Fixed buildbot Perl scripts for Mac OS X build (bug 5601, r=dvander).

This commit is contained in:
Scott Ehlert 2013-02-13 01:22:40 -06:00
parent c387cdeff8
commit 375e91c1d2
3 changed files with 13 additions and 7 deletions

View File

@ -14,7 +14,7 @@ chdir(Build::PathFormat('../..'));
#Do the annoying revision bumping. #Do the annoying revision bumping.
#Linux needs some help here. #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 modules.versions");
Build::Command("flip -u support/versionchanger.pl"); 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. #Build the amxmodx builder tool.
chdir('installer/builder'); chdir('installer/builder');
if ($^O eq "linux") { if ($^O eq "linux" || $^O eq "darwin") {
Build::Command("make"); Build::Command("make");
} else { } else {
Build::Command("\"$DEVENV\" builder.csproj /p:Configuration=Release /t:Rebuild"); 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'); open(DIRECTIONS, '>installer/builder/directions.info');
if ($^O eq "linux") { if ($^O eq "linux") {
print DIRECTIONS "compress = /bin/tar\n"; print DIRECTIONS "compress = /bin/tar\n";
} elsif ($^O eq "darwin") {
print DIRECTIONS "compress = /usr/bin/zip\n";
} else { } else {
print DIRECTIONS "compress = C:\\WINDOWS\\zip.exe\n"; print DIRECTIONS "compress = C:\\WINDOWS\\zip.exe\n";
} }
print DIRECTIONS "source = " . Cwd::abs_path('.') . "\n"; print DIRECTIONS "source = " . Cwd::abs_path('.') . "\n";
print DIRECTIONS "makeopts = \n"; print DIRECTIONS "makeopts = \n";
print DIRECTIONS "output = " . Cwd::abs_path('../OUTPUT') . "\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"; print DIRECTIONS "devenv = /usr/bin/make\n";
} else { } else {
print DIRECTIONS "devenv = $DEVENV\n"; print DIRECTIONS "devenv = $DEVENV\n";

View File

@ -33,8 +33,9 @@ $version .= '-hg' . Build::HgRevNum('.');
#Switch to the output folder. #Switch to the output folder.
chdir(Build::PathFormat('../../../OUTPUT')); chdir(Build::PathFormat('../../../OUTPUT'));
my (@packages); my (@packages,@mac_exclude);
@packages = ('base', 'cstrike', 'dod', 'esf', 'ns', 'tfc', 'ts'); @packages = ('base', 'cstrike', 'dod', 'esf', 'ns', 'tfc', 'ts');
@mac_exclude = ('esf', 'ns', 'ts');
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/); my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
$ftp_path .= "/$major.$minor"; $ftp_path .= "/$major.$minor";
@ -58,9 +59,12 @@ my ($i);
for ($i = 0; $i <= $#packages; $i++) { for ($i = 0; $i <= $#packages; $i++) {
my ($filename); my ($filename);
if ($^O eq "linux") { 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 { } else {
$filename = "amxmodx-$version-" . $packages[$i] . ".zip"; $filename = "amxmodx-$version-" . $packages[$i] . "-windows.zip";
} }
print "Uploading $filename...\n"; print "Uploading $filename...\n";
$ftp->put($filename) $ftp->put($filename)

View File

@ -10,7 +10,7 @@ require 'helpers.pm';
chdir('../../installer/builder'); chdir('../../installer/builder');
my $output; my $output;
if ($^O eq "linux") { if ($^O eq "linux" || $^O eq "darwin") {
$output = `mono builder.exe directions.info`; $output = `mono builder.exe directions.info`;
} else { } else {
$output = `builder.exe directions.info`; $output = `builder.exe directions.info`;