forked from ValveSoftware/source-sdk-2013
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Dedicated server build #13
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| "GameInfo" | ||
| { | ||
| game "Team Comtress 2" | ||
| type multiplayer_only | ||
| nomodels 1 | ||
| nohimodel 1 | ||
| nocrosshair 0 | ||
| hidden_maps | ||
| { | ||
| "test_speakers" 1 | ||
| "test_hardware" 1 | ||
| } | ||
| nodegraph 0 | ||
| GameData "tf.fgd" | ||
| AdditionalLocalization "tf" | ||
| InstancePath "maps/instances/" | ||
| advcrosshair 1 | ||
| supportsvr 0 | ||
| ReplayRequired 1 | ||
|
|
||
| DependsOnAppID 440 | ||
|
|
||
| FileSystem | ||
| { | ||
| SteamAppId 243750 | ||
|
|
||
| SearchPaths | ||
| { | ||
| // First, mount all user customizations. This will search for VPKs and subfolders | ||
| // and mount them in alphabetical order. The easiest way to distribute a mod is to | ||
| // pack up the custom content into a VPK. To "install" a mod, just drop it in this | ||
| // folder. | ||
| // | ||
| // Note that this folder is scanned only when the game is booted. | ||
| game+mod+custom_mod tc2/custom/* | ||
| // Enable this if you want to load your TF custom content. | ||
| //game+mod |appid_440|tf/custom/* | ||
|
|
||
| // Now search loose files. We'll set the directory containing the gameinfo.txt file | ||
| // as the first "mod" search path (after any user customizations). This is also the one | ||
| // that's used when writing to the "mod" path. | ||
| mod+mod_write |all_source_engine_paths|tc2 | ||
| game+game_write |all_source_engine_paths|tc2 | ||
| default_write_path |all_source_engine_paths|tc2 | ||
| gamebin |all_source_engine_paths|tc2/bin | ||
|
|
||
| // We search VPK files before ordinary folders, because most files will be found in | ||
| // VPK and we can avoid making thousands of file system calls to attempt to open files | ||
| // in folders where they don't exist. (Searching a VPK is much faster than making an operating | ||
| // system call.) | ||
| game_lv |all_source_engine_paths|tf/tf2_lv.vpk | ||
| game+mod |all_source_engine_paths|tf/tf2_textures.vpk | ||
| game+mod |all_source_engine_paths|tf/tf2_sound_vo_english.vpk | ||
| game+mod |all_source_engine_paths|tf/tf2_sound_misc.vpk | ||
| game+mod+vgui |all_source_engine_paths|tf/tf2_misc.vpk | ||
| game |all_source_engine_paths|hl2/hl2_textures.vpk | ||
| game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk | ||
| game |all_source_engine_paths|hl2/hl2_sound_misc.vpk | ||
| game+vgui |all_source_engine_paths|hl2/hl2_misc.vpk | ||
| platform+vgui |all_source_engine_paths|platform/platform_misc.vpk | ||
|
|
||
| // Last, mount in shared HL2 and TF2 loose files | ||
| // game |all_source_engine_paths|tf | ||
| // game |all_source_engine_paths|hl2 | ||
| // platform |all_source_engine_paths|platform | ||
|
|
||
|
|
||
| // Random files downloaded from gameservers go into a seperate directory, so | ||
| // that it's easy to keep those files segregated from the official game files | ||
| // or customizations intentially installed by the user. | ||
| // | ||
| // This directory is searched LAST. If you visit a server and download | ||
| // a custom model, etc, we don't want that file to override the default | ||
| // game file indefinitely (after you have left the server). Servers CAN have | ||
| // custom content that overrides the default game files, it just needs to be | ||
| // packed up in the .bsp file so that it will be mounted as a map search pack. | ||
| // The map search pack is mounted at the top of the search path list, | ||
| // but only while you are connected that server and on that map. | ||
| game+download tc2/download | ||
| } | ||
| } | ||
| ToolsEnvironment | ||
| { | ||
| "Engine" "Source" | ||
| "UseVPLATFORM" "1" | ||
| "PythonVersion" "2.7" | ||
| "PythonHomeDisable" "1" | ||
| } | ||
| } |
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,55 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| script=$(readlink -f -- "$0") | ||
| pushd "$(dirname -- "$script")" > /dev/null | ||
|
|
||
| source sdk_container | ||
| run_in_sniper "$@" | ||
|
|
||
| if [ $# -eq 0 ]; then | ||
| export VPC_NINJA_BUILD_MODE="release" | ||
| else | ||
| if [[ "$1" == "debug" ]]; then | ||
| export VPC_NINJA_BUILD_MODE="debug" | ||
| elif [[ "$1" == "release" ]]; then | ||
| export VPC_NINJA_BUILD_MODE="release" | ||
| else | ||
| echo "Usage: $0 [debug|release]" | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| solution_out="_vpc_/ninja/sdk_server_$VPC_NINJA_BUILD_MODE" | ||
|
|
||
| if [[ ! -e "$solution_out.ninja" ]]; then | ||
| devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +dedicated /mksln "$solution_out" | ||
|
|
||
| # Generate compile commands. | ||
| ninja -f "$solution_out.ninja" -t compdb > compile_commands.json | ||
|
|
||
| # Remove some unsupported clang commands. | ||
| sed -i 's/-fpredictive-commoning//g; s/-fvar-tracking-assignments//g' compile_commands.json | ||
| sed -i 's|/my_mod/src|.|g' compile_commands.json | ||
|
|
||
| # Reflect changes done in compile_commands.json for easier diagnostics | ||
| sed -i 's|-D_DLL_EXT=\.so|-D_DLL_EXT=_srv.so|g' compile_commands.json | ||
| sed -i 's|-D_EXTERNAL_DLL_EXT=\.so|-D_EXTERNAL_DLL_EXT=_srv.so|g' compile_commands.json | ||
| sed -i 's|server\.so|server_srv.so|g' compile_commands.json | ||
| sed -i 's|lvstdlib|lvstdlib_srv|g' compile_commands.json | ||
| sed -i 's|ltier0|ltier0_srv|g' compile_commands.json | ||
|
|
||
| sed -i 's|-D_DLL_EXT=\.so|-D_DLL_EXT=_srv.so|g' "$solution_out.ninja" | ||
| sed -i 's|-D_EXTERNAL_DLL_EXT=\.so|-D_EXTERNAL_DLL_EXT=_srv.so|g' "$solution_out.ninja" | ||
| sed -i 's|server\.so|server_srv.so|g' "$solution_out.ninja" | ||
| sed -i 's|libtier0\.so|libtier0_srv.so|g' "$solution_out.ninja" | ||
| sed -i 's|libvstdlib\.so|libvstdlib_srv.so|g' "$solution_out.ninja" | ||
| sed -i 's|lvstdlib|lvstdlib_srv|g' "$solution_out.ninja" | ||
| sed -i 's|ltier0|ltier0_srv|g' "$solution_out.ninja" | ||
|
|
||
| fi | ||
|
|
||
| ninja -f "$solution_out.ninja" -j$(nproc) | ||
|
|
||
| popd | ||
Binary file not shown.
Binary file not shown.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels really hacky, is it possible to instead use the proper
/dedicatedoption for VPC?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darn i guess that would be easier just to copy every
.afile in the /lib/common and /lib/public to have suffix_srv.astill to run server properly, from testing now it's neccessary to have server libraries for libtier0 and libvstdlib otherwise random things start to break like ClientCommandKeyValues.