-
Notifications
You must be signed in to change notification settings - Fork 24
Launch Linux and Windows through a launcher, with SDK dependency #2019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DESTROYGIRL
merged 21 commits into
NeotokyoRebuild:master
from
sunmachine:linux-build-fix
Jul 19, 2026
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
78a1f24
Create a new launcher target for Linux.
sunmachine ef5f7ec
Fix launcher build on Linux and stage the standalone install layout
sunmachine df74497
Ignore the Linux launcher binary and its runtime steam_appid.txt
sunmachine 756ef86
windows build for launcher main
DESTROYGIRL 3977f72
Update .gitignore
DESTROYGIRL e514b06
Default the launcher appid to NT;RE's
sunmachine 73c8cef
Add NEO_INSTALL_LAUNCHER to package the launcher
sunmachine 1203e67
Stop treating the SDK Base install as the game root
sunmachine 2434134
Load the engine in-process on Linux instead of exec'ing hl2.sh
sunmachine 2d80e90
Work around the engine's case-mangled SDK mount path on Linux
sunmachine 31230ac
Terminate the executable path read from /proc/self/exe
sunmachine a508dad
Honor -wait_for_debugger in the Linux launcher
sunmachine 62a126c
Wrap launcher divergence from the SDK in NEO guards
sunmachine b91a9b9
Let the engine surface the missing-SDK install flow
sunmachine c79f7a3
Guard the launcher staging copies per-OS
sunmachine fa05a5a
Drop the stale Windows-flow warning
sunmachine ccdf5d5
Tidy launcher CMake indentation and paths
sunmachine a92d919
Scope the fopen guard to tier1 on Windows
sunmachine e2eb409
Build and upload the launcher package in CI
sunmachine c3ef868
Split and ship the launcher debug information
sunmachine 4e267dd
Derive split-debug names from target prefix and suffix
sunmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # Steam mod launcher. Runs the game from the mod's own install directory | ||
| # using the mod's shipped engine binaries; the Source SDK Base 2013 MP | ||
| # install is only an asset dependency, mounted through gameinfo.txt. | ||
| if(OS_LINUX) | ||
| find_package(SDL2 REQUIRED) | ||
| endif() | ||
|
|
||
| set(LAUNCHER_SOURCES main.cpp) | ||
|
|
||
| if(OS_WINDOWS) | ||
| list(APPEND LAUNCHER_SOURCES launcher_main_mod_neo.rc) | ||
| endif() | ||
|
|
||
| add_executable(launcher_main | ||
| ${LAUNCHER_SOURCES} | ||
| ) | ||
|
|
||
| # GetExecutableModName derives the default -game dir from the executable name | ||
| # by stripping from the last underscore: neo_linux64 -> -game neo. The suffix | ||
| # also avoids colliding with the game/neo directory at the install root. | ||
| if(OS_LINUX) | ||
| set_target_properties(launcher_main | ||
| PROPERTIES | ||
| OUTPUT_NAME neo_linux64 | ||
| ) | ||
| elseif(OS_WINDOWS) | ||
| set_target_properties(launcher_main | ||
| PROPERTIES | ||
| OUTPUT_NAME neo_win64 | ||
| WIN32_EXECUTABLE TRUE | ||
| ) | ||
| endif() | ||
|
|
||
| if(NEO_USE_SEPARATE_BUILD_INFO) | ||
| split_debug_information(TARGET launcher_main) | ||
| endif() | ||
|
|
||
| target_include_directories(launcher_main | ||
| PRIVATE | ||
| ${CMAKE_SOURCE_DIR}/public | ||
| ${CMAKE_SOURCE_DIR}/common | ||
| ) | ||
|
|
||
| if(OS_LINUX) | ||
| target_link_libraries(launcher_main | ||
| PRIVATE | ||
| SDL2::SDL2 | ||
| ${CMAKE_DL_LIBS} | ||
| ) | ||
|
|
||
| # main.cpp defines __wrap_fopen/__wrap_fopen64 which reference __real_fopen/__real_fopen64 | ||
| target_link_options(launcher_main | ||
| PRIVATE | ||
| -Wl,--wrap=fopen | ||
| -Wl,--wrap=fopen64 | ||
| ) | ||
| endif() | ||
|
|
||
| if(NEO_MOD_APPID) | ||
| target_compile_definitions(launcher_main | ||
| PRIVATE | ||
| MOD_LAUNCHER | ||
| MOD_APPID=${NEO_MOD_APPID} | ||
| ) | ||
| endif() | ||
|
|
||
| if(NEO_COPY_LIBRARIES) | ||
| # Stage the standalone-install layout: launcher at the install root next to | ||
| # neo/, and the steam_api lib where the launcher dlopens it (game/bin, the | ||
| # engine binary dir). | ||
| add_custom_command(TARGET launcher_main POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
| $<TARGET_FILE:launcher_main> | ||
| ${CMAKE_SOURCE_DIR}/../game/ | ||
| VERBATIM | ||
| ) | ||
| # The repo only carries the Linux steam_api runtime; on Windows | ||
| # lib/public/x64 has the import lib, and the launcher loads | ||
| # bin/x64/steam_api64.dll from a Source SDK Base / depot install. | ||
| if(OS_LINUX) | ||
| add_custom_command(TARGET launcher_main POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E make_directory | ||
| ${CMAKE_SOURCE_DIR}/../game/bin/linux64/ | ||
| COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
| ${CMAKE_SOURCE_DIR}/lib/public/linux64/libsteam_api.so | ||
| ${CMAKE_SOURCE_DIR}/../game/bin/linux64/ | ||
| VERBATIM | ||
| ) | ||
| endif() | ||
| endif() | ||
|
sunmachine marked this conversation as resolved.
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.