From 6872d6485f108572c829569c963f3e4cc4210b12 Mon Sep 17 00:00:00 2001 From: Kenzzer Date: Fri, 25 Oct 2024 18:48:45 +0200 Subject: [PATCH] add extra env checks --- AMBuildScript | 2 ++ public/sample_ext/AMBuildScript | 4 ++++ public/sample_ext_nosdk/AMBuildScript | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/AMBuildScript b/AMBuildScript index 50af518b5a..6a5a00ea73 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -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: diff --git a/public/sample_ext/AMBuildScript b/public/sample_ext/AMBuildScript index e6122cffbd..271d109a02 100644 --- a/public/sample_ext/AMBuildScript +++ b/public/sample_ext/AMBuildScript @@ -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: @@ -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: diff --git a/public/sample_ext_nosdk/AMBuildScript b/public/sample_ext_nosdk/AMBuildScript index e794984715..29440b1097 100644 --- a/public/sample_ext_nosdk/AMBuildScript +++ b/public/sample_ext_nosdk/AMBuildScript @@ -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: @@ -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: