Skip to content

Fix silent SDK asset mounting failure in standalone Linux installs#2019

Draft
sunmachine wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunmachine:linux-build-fix
Draft

Fix silent SDK asset mounting failure in standalone Linux installs#2019
sunmachine wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunmachine:linux-build-fix

Conversation

@sunmachine

@sunmachine sunmachine commented Jul 14, 2026

Copy link
Copy Markdown
ntre_linux_from_binary.mp4

Path Dump 💩

ingame-path-dump.txt

Fix

Standalone Linux installs of NT;RE (own appid + mod launcher, not sourcemods/)
silently fail to mount all Source SDK Base content: missing menus, materials,
and sounds with no error. Windows and sourcemods/ installs are unaffected,
which is why dev setups never see it.

The engine resolves the relative SDK search paths in gameinfo.txt against
the SDK_EXEC_DIR env var, falling back to an argv[0]/CWD guess. The launcher
sets that variable on Windows but never on Linux, and under a real Steam
launch the guess lands in a directory with no SDK content. Missing relative
search paths mount nothing, silently. The fix is one line in the launcher's
Linux startup code, mirroring what Windows already does:

setenv( "SDK_EXEC_DIR", szGameInstallDir, 1 );

Since the team ships Valve's prebuilt launcher (which has the same bug,
apparently lmao), this PR also adds an opt-in CMake target to build the fixed
launcher from source:

cmake --preset linux-release -DNEO_BUILD_LAUNCHER=ON

It's OFF by default, Linux-only, and produces game/neo_linux64. The
_linux64 suffix keeps the default -game neo behavior while avoiding a
filename collision with the game/neo/ directory.

Verified on Linux under Steam Linux Runtime 3.0 (sniper), launched both from
a terminal and as a Steam library entry. With the fix, path shows SDK
content rooted where it belongs:

".../Source SDK Base 2013 Multiplayer/" "BASE_PATH"
"GAME" (VPK) .../Source SDK Base 2013 Multiplayer/hl2mp/hl2mp_pak.vpk

and a full bot match ran with no missing assets. sourcemods/ and -game
launches still work as before.

CI

Nothing needs to change right now. I think the CI never sets
NEO_BUILD_LAUNCHER so this PR's change is still invisible to the workflows.
If we want it compile-checked, adding -DNEO_BUILD_LAUNCHER=ON to the Linux
configure step is enough (CI already uses the same sniper image). Getting it
into release artifacts takes a bit more wiring, and I am too tired at time of
writing to fully dig into the release steps here, so I'll save that for
tomorrow in a follow-up commit or another PR.

Screenshotties

Screenshot 2026-07-13 at 22 35 01 Screenshot 2026-07-13 at 22 34 50

Rename the launcher binary to neo_linux64: Linux cannot have both the
executable and the game/neo mod directory under the same name at the
install root, and GetExecutableModName strips the _linux64 suffix so
the default -game dir is still neo.

Add src/common to the include path and include tier1/strtools.h before
steam_api.h, since our patched matchmakingtypes.h uses V_strcpy_safe.

When NEO_COPY_LIBRARIES is on, also stage libsteam_api.so into
game/bin/linux64/ where the launcher dlopens it.
@sunzenshen sunzenshen requested a review from a team July 14, 2026 03:38
Comment thread src/CMakeLists.txt
option(NEO_ENABLE_CPACK "Enable CPack" OFF)
option(NEO_USE_MEM_DEBUG "Enable USE_MEM_DEBUG defines" OFF)
option(NEO_GENERATE_GAMEDATA "Generate SourceMod gamedata" ${NEO_DEDICATED})
option(NEO_BUILD_LAUNCHER "Build the Steam mod launcher" OFF) # NOTE Linux only

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why OFF by default?

@sunmachine sunmachine marked this pull request as draft July 15, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants