sm-ext-dhooks2/buildbot/bootstrap.pl

42 lines
914 B
Perl
Raw Normal View History

2013-09-01 17:11:38 +02:00
#!/usr/bin/perl
# vim: set ts=2 sw=2 tw=99 noet:
use strict;
use Cwd;
use File::Basename;
use File::Path;
my ($myself, $path) = fileparse($0);
chdir($path);
require 'helpers.pm';
#Go back above build dir
chdir(Build::PathFormat('../..'));
#Get the source path.
our ($root) = getcwd();
2015-03-26 22:25:08 +01:00
#update and configure shiz
if ($^O eq "darwin") {
$ENV{'SOURCEMOD17'} = '/Users/builds/slaves/common/sourcemod-1.7';
}
2013-09-01 17:11:38 +02:00
rmtree('OUTPUT');
mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
chdir('OUTPUT');
my ($result);
#configure AMBuild
if ($^O eq "linux") {
2014-08-19 19:23:06 +02:00
$result = `CC=clang CXX=clang python ../build/configure.py --enable-optimize`;
2013-09-01 17:11:38 +02:00
} elsif ($^O eq "darwin") {
2014-08-19 19:23:06 +02:00
$result = `CC=clang CXX=clang python ../build/configure.py --enable-optimize`;
2013-09-01 17:11:38 +02:00
} else {
2013-09-01 19:02:53 +02:00
$result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`;
2013-09-01 17:11:38 +02:00
}
print "$result\n";
if ($? != 0) {
die('Could not configure!');
}