Skip to content

Commit

Permalink
add extra env checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenzzer committed Oct 25, 2024
1 parent 9ecf6c2 commit 6872d64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class SMConfig(object):
self.mms_root = builder.options.mms_path
else:
self.mms_root = ResolveEnvPath('MMSOURCE112', 'mmsource-1.12')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE', 'metamod-source')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source')
if not self.mms_root:
Expand Down
4 changes: 4 additions & 0 deletions public/sample_ext/AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ class ExtensionConfig(object):
self.mms_root = builder.options.mms_path
else:
self.mms_root = ResolveEnvPath('MMSOURCE112', 'mmsource-1.12')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE', 'metamod-source')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source')
if not self.mms_root:
Expand All @@ -131,6 +133,8 @@ class ExtensionConfig(object):
self.sm_root = builder.options.sm_path
else:
self.sm_root = ResolveEnvPath('SOURCEMOD112', 'sourcemod-1.12')
if not self.sm_root:
self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod')
if not self.sm_root:
self.sm_root = ResolveEnvPath('SOURCEMOD_DEV', 'sourcemod')
if not self.sm_root:
Expand Down
4 changes: 4 additions & 0 deletions public/sample_ext_nosdk/AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class ExtensionConfig(object):
self.mms_root = builder.options.mms_path
else:
self.mms_root = ResolveEnvPath('MMSOURCE112', 'mmsource-1.12')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE', 'metamod-source')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source')
if not self.mms_root:
Expand All @@ -86,6 +88,8 @@ class ExtensionConfig(object):
self.sm_root = builder.options.sm_path
else:
self.sm_root = ResolveEnvPath('SOURCEMOD112', 'sourcemod-1.12')
if not self.sm_root:
self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod')
if not self.sm_root:
self.sm_root = ResolveEnvPath('SOURCEMOD_DEV', 'sourcemod')
if not self.sm_root:
Expand Down

0 comments on commit 6872d64

Please sign in to comment.