mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-21 14:54:14 +01:00
Add search paths for HL2SDKs.
This commit is contained in:
parent
477cdfa18b
commit
f6d2cdf93d
@ -84,6 +84,9 @@ class MMSConfig(object):
|
||||
for sdk_name in PossibleSDKs:
|
||||
sdk = PossibleSDKs[sdk_name]
|
||||
if builder.target_platform in sdk.platform:
|
||||
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:
|
||||
|
@ -14,6 +14,8 @@ except:
|
||||
|
||||
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 @@ if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) {
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user