Permalink
Browse files

Add search paths for HL2SDKs.

  • Loading branch information...
dvander committed May 27, 2014
1 parent 09d1f56 commit 1cad4b34cf0c0e362901bd2a5be704dc8580b652
Showing with 33 additions and 11 deletions.
  1. +4 −1 AMBuildScript
  2. +11 −9 configure.py
  3. +18 −1 support/buildbot/bootstrap.pl
View
@@ -84,7 +84,10 @@ class MMSConfig(object):
for sdk_name in PossibleSDKs:
sdk = PossibleSDKs[sdk_name]
if builder.target_platform in sdk.platform:
sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder)
if builder.options.hl2sdk_root:
sdk_path = os.path.join(builder.options.hl2sdk_root, sdk.folder)
else:
sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder)
if sdk_path is None:
if use_all or sdk_name in sdk_list:
raise Exception('Could not find a valid path for {0}'.format(sdk.envvar))
View
@@ -1,19 +1,21 @@
# vim: set sts=2 ts=8 sw=2 tw=99 et:
import sys
try:
from ambuild2 import run
from ambuild2 import run
except:
try:
import ambuild
sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
except:
sys.stderr.write('AMBuild must be installed to build this project.\n')
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
sys.exit(1)
try:
import ambuild
sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n')
sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n')
except:
sys.stderr.write('AMBuild must be installed to build this project.\n')
sys.stderr.write('http://www.alliedmods.net/ambuild\n')
sys.exit(1)
run = run.PrepareBuild(sourcePath=sys.path[0])
run.default_build_folder = 'obj-' + run.target_platform
run.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
help='Root search folder for HL2SDKs')
run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
help='Enable debugging symbols')
run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
@@ -26,8 +26,25 @@
chdir('OUTPUT');
my ($result, $argn);
$argn = $#ARGV + 1;
print "Attempting to reconfigure...\n";
my $conf_args = '--enable-optimize --no-color --symbol-files';
my @conf_argv = (
'--enable-optimize',
'--no-color',
'--symbol-files'
);
if ($^O =~ /darwin/) {
push(@conf_argv, '--hl2sdk-root=/Volumes/hgshare');
} elsif ($^O =~ /linux/) {
push(@conf_argv, '--hl2sdk-root=/hgshare');
} elsif ($^O =~ /MSWin/) {
push(@conf_argv, '--hl2sdk-root=H:\\');
}
my $conf_args = join(' ', @conf_argv);
if ($argn > 0 && $^O !~ /MSWin/) {
$result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py $conf_args`;
} else {

0 comments on commit 1cad4b3

Please sign in to comment.