From ec92892162b882ad9da6ab587ed727b3e682aeb6 Mon Sep 17 00:00:00 2001 From: Orsell <34631691+OrsellGit@users.noreply.github.com> Date: Thu, 18 Jun 2026 00:37:09 -0700 Subject: [PATCH 1/2] fix: Changed how the VBSP and VRAD compilers check their filename to determine behavior. --- src/compiler_launch.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/compiler_launch.py b/src/compiler_launch.py index 01777ff9e..5d595d39d 100644 --- a/src/compiler_launch.py +++ b/src/compiler_launch.py @@ -16,13 +16,15 @@ # Sourcecode-launch - check first sys arg. app_name = sys.argv.pop(1).casefold() -app_name = app_name.removesuffix('_osx').removesuffix('_linux').removesuffix('.exe') - if 'original' in app_name: - sys.exit('Original compilers replaced, verify game files in Steam!') + sys.exit('Original compilers were replaced! Please verify game files in Steam!') + +if not app_name.startswith(('vbsp', 'vrad')): + sys.exit(f'Invalid application name: "{app_name}"! Filename must start with "vbsp" or "vrad" to set application behavior.') -if app_name not in ('vbsp', 'vrad'): - sys.exit(f'Unknown application name "{app_name}"!') +# Remove the latter half of the app_name after the initial valid application behavior checks have been done. +app_name = app_name.split(".")[0] +app_name = app_name.split("_")[0] if app_name == 'vrad' and '--errorserver' in sys.argv: app_name = 'error_server' @@ -38,14 +40,15 @@ if app_name == 'vbsp': import vbsp func = vbsp.main -elif app_name == 'error_server': - import error_server - func = error_server.main elif app_name == 'vrad': import vrad func = vrad.main +elif app_name == 'error_server': + import error_server + func = error_server.main else: - raise AssertionError(app_name) + # Something broke with the earlier checks if the program got here. + sys.exit(f'Unable to set application behavior for "{app_name}"!') from trio_debug import Tracer tracer = Tracer() if utils.CODE_DEV_MODE else None From 9ce68a1599236b3f2ac84f4ac960670c660b8ad1 Mon Sep 17 00:00:00 2001 From: Orsell <34631691+OrsellGit@users.noreply.github.com> Date: Thu, 18 Jun 2026 18:52:56 -0700 Subject: [PATCH 2/2] revert: Reverted modified line adding back assertion. --- src/compiler_launch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler_launch.py b/src/compiler_launch.py index 5d595d39d..75d544f47 100644 --- a/src/compiler_launch.py +++ b/src/compiler_launch.py @@ -47,8 +47,7 @@ import error_server func = error_server.main else: - # Something broke with the earlier checks if the program got here. - sys.exit(f'Unable to set application behavior for "{app_name}"!') + raise AssertionError(app_name) from trio_debug import Tracer tracer = Tracer() if utils.CODE_DEV_MODE else None