From 2b6b6310519979f80c32665b8868d53854c4b986 Mon Sep 17 00:00:00 2001 From: Masterkatze Date: Sat, 4 Apr 2026 02:21:58 +0300 Subject: [PATCH 1/5] Fix missing shared library dedicated suffix (_srv) on Linux --- src/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6abe6bf95..5cf560e77c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -138,12 +138,18 @@ endif () set(STEAM_RUNTIME_PATH /usr) set(CRYPTOPPDIR steamrt_sniper64) +if (NEO_DEDICATED AND OS_LINUX) + set(SRV_SUFFIX "_srv") +else() + set(SRV_SUFFIX "") +endif() + add_compile_definitions( # SDK2013CE # Cut out since 2025-02-18 TF2 SDK Update NEO GLOWS_ENABLE - _DLL_EXT=${CMAKE_SHARED_LIBRARY_SUFFIX} - _EXTERNAL_DLL_EXT=${CMAKE_SHARED_LIBRARY_SUFFIX} + _DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX} + _EXTERNAL_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX} _GLIBCXX_USE_CXX11_ABI=0 FRAME_POINTER_OMISSION_DISABLED SOURCE1=1 From 2c2d996e76a564d269915f8561f86a79f6f58f80 Mon Sep 17 00:00:00 2001 From: Masterkatze Date: Sat, 4 Apr 2026 19:56:12 +0300 Subject: [PATCH 2/5] Move directory separator --- src/CMakeLists.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5cf560e77c..02c2f355de 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -130,9 +130,9 @@ if(NEO_RAD_TELEMETRY_DISABLED) endif() if (OS_LINUX) - set(PLATSUBDIR "/linux64") + set(PLATSUBDIR "linux64") elseif (OS_WINDOWS) - set(PLATSUBDIR "/x64") + set(PLATSUBDIR "x64") endif () set(STEAM_RUNTIME_PATH /usr) @@ -165,8 +165,9 @@ add_compile_definitions( ) if(OS_WINDOWS) - set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/lib/public${PLATSUBDIR}") - set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common${PLATSUBDIR}") + set(LIBPUBLIC_RELATIVE_PATH "lib/public/${PLATSUBDIR}") + set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/${LIBPUBLIC_RELATIVE}") + set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common/${PLATSUBDIR}") set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue") @@ -385,8 +386,8 @@ if(OS_LINUX OR OS_MACOS) endif() if(OS_LINUX) - set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/lib/public${PLATSUBDIR}") - set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common${PLATSUBDIR}") + set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/lib/public/${PLATSUBDIR}") + set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common/${PLATSUBDIR}") add_compile_definitions( LINUX @@ -504,8 +505,8 @@ if(NEO_INSTALL_LIBRARIES) else() install( TARGETS server - LIBRARY DESTINATION "${LIBRARY_INSTALL_PATH}${PLATSUBDIR}" - RUNTIME DESTINATION "${LIBRARY_INSTALL_PATH}${PLATSUBDIR}" + LIBRARY DESTINATION "${LIBRARY_INSTALL_PATH}/${PLATSUBDIR}" + RUNTIME DESTINATION "${LIBRARY_INSTALL_PATH}/${PLATSUBDIR}" ) endif() else() @@ -554,8 +555,8 @@ if(NEO_INSTALL_LIBRARIES) else() install( TARGETS client game_shader_dx9 server - LIBRARY DESTINATION "${LIBRARY_INSTALL_PATH}${PLATSUBDIR}" - RUNTIME DESTINATION "${LIBRARY_INSTALL_PATH}${PLATSUBDIR}" + LIBRARY DESTINATION "${LIBRARY_INSTALL_PATH}/${PLATSUBDIR}" + RUNTIME DESTINATION "${LIBRARY_INSTALL_PATH}/${PLATSUBDIR}" ) endif() endif() From cbbeed54abea896be71dec886469b9662c5b97af Mon Sep 17 00:00:00 2001 From: Masterkatze Date: Sat, 4 Apr 2026 19:57:11 +0300 Subject: [PATCH 3/5] Copy vstdlib and tier0 libraries with _srv prefix for dedicated server build --- src/cmake/FindTier0.cmake | 15 ++++++++++++--- src/cmake/FindVSTDLib.cmake | 13 +++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/cmake/FindTier0.cmake b/src/cmake/FindTier0.cmake index 8f24ce0b2d..60601e263d 100644 --- a/src/cmake/FindTier0.cmake +++ b/src/cmake/FindTier0.cmake @@ -1,14 +1,23 @@ if(OS_WINDOWS) set(TIER0_LIBRARY_NAME tier0.lib) -elseif(OS_LINUX) - set(TIER0_LIBRARY_NAME libtier0.so) +elseif(OS_LINUX) + if (NEO_DEDICATED) + set(TIER0_LIBRARY_FIND_PATH "${CMAKE_BINARY_DIR}/${LIBPUBLIC_RELATIVE_PATH}") + set(TIER0_LIBRARY_NAME libtier0_srv.so) + + file(MAKE_DIRECTORY "${TIER0_LIBRARY_FIND_PATH}") + file(COPY_FILE "${LIBPUBLIC}/libtier0.so" "${TIER0_LIBRARY_FIND_PATH}/${TIER0_LIBRARY_NAME}") + else() + set(TIER0_LIBRARY_FIND_PATH "${LIBPUBLIC}") + set(TIER0_LIBRARY_NAME libtier0.so) + endif() elseif(OS_MACOS) set(TIER0_LIBRARY_NAME libtier0.dylib) endif() find_file(TIER0_LIBRARY NAMES ${TIER0_LIBRARY_NAME} - PATHS "${LIBPUBLIC}" + PATHS "${TIER0_LIBRARY_FIND_PATH}" NO_CACHE NO_DEFAULT_PATH REQUIRED diff --git a/src/cmake/FindVSTDLib.cmake b/src/cmake/FindVSTDLib.cmake index 378240328d..597ae5501f 100644 --- a/src/cmake/FindVSTDLib.cmake +++ b/src/cmake/FindVSTDLib.cmake @@ -1,14 +1,23 @@ if(OS_WINDOWS) set(VSTDLIB_LIBRARY_NAME vstdlib.lib) elseif(OS_LINUX) - set(VSTDLIB_LIBRARY_NAME libvstdlib.so) + if (NEO_DEDICATED) + set(VSTDLIB_LIBRARY_FIND_PATH "${CMAKE_BINARY_DIR}/${LIBPUBLIC_RELATIVE_PATH}") + set(VSTDLIB_LIBRARY_NAME libvstdlib_srv.so) + + file(MAKE_DIRECTORY "${VSTDLIB_LIBRARY_FIND_PATH}") + file(COPY_FILE "${LIBPUBLIC}/libvstdlib.so" "${VSTDLIB_LIBRARY_FIND_PATH}/${VSTDLIB_LIBRARY_NAME}") + else() + set(VSTDLIB_LIBRARY_FIND_PATH "${LIBPUBLIC}") + set(VSTDLIB_LIBRARY_NAME libvstdlib.so) + endif() elseif(OS_MACOS) set(VSTDLIB_LIBRARY_NAME libvstdlib.dylib) endif() find_library(VSTDLIB_LIBRARY NAMES ${VSTDLIB_LIBRARY_NAME} - PATHS "${LIBPUBLIC}" + PATHS "${VSTDLIB_LIBRARY_FIND_PATH}" NO_CACHE NO_DEFAULT_PATH REQUIRED From 95e261bd760af36d44a0dd750f694a19230cef92 Mon Sep 17 00:00:00 2001 From: Masterkatze Date: Sat, 4 Apr 2026 20:11:25 +0300 Subject: [PATCH 4/5] Update instructions --- README.md | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 8115d6b346..20a0e36772 100644 --- a/README.md +++ b/README.md @@ -204,29 +204,15 @@ These instructions have been written for and tested on Debian 12 and Arch for Li Once they're fetched, place them in the `/ntrebuild` directory. #### Linux-only additional instructions -1. **Linux only:** Make a symlink so that Src2013 dedicated server can see SteamCMD's binaries: +Make a symlink so that Src2013 dedicated server can see SteamCMD's binaries: + +(NOTE: I'm NOT sure if this is how it is on other systems other than Debian 12, so please, check first if you have `~/.steam/sdk64` before running these! If you have Desktop Steam installed, then you should have this directory, but it doesn't seem to be the case with SteamCMD, which is why we need to do this.) +``` +ln -s ~/.steam/steam/steamcmd/linux64 ~/.steam/sdk64 +``` + +**Note:** Making `_srv` symlinks (`ln -s libtier0_srv.so libtier0.so` for example) is not necessary. - (NOTE: I'm NOT sure if this is how it is on other systems other than Debian 12, so please, check first if you have `~/.steam/sdk64` before running these! If you have Desktop Steam installed, then you should have this directory, but it doesn't seem to be the case with SteamCMD, which is why we need to do this.) - ``` - ln -s ~/.steam/steam/steamcmd/linux64 ~/.steam/sdk64 - ``` -2. **Linux only:** Change directory into `/ntrebuild/bin/linux64` then run these commands to make symlinks for needed files: - ``` - ln -s datacache_srv.so datacache.so; - ln -s dedicated_srv.so dedicated.so; - ln -s engine_srv.so engine.so; - ln -s libtier0_srv.so libtier0.so; - ln -s libvstdlib_srv.so libvstdlib.so; - ln -s materialsystem_srv.so materialsystem.so; - ln -s replay_srv.so replay.so; - ln -s scenefilecache_srv.so scenefilecache.so; - ln -s shaderapiempty_srv.so shaderapiempty.so; - ln -s soundemittersystem_srv.so soundemittersystem.so; - ln -s studiorender_srv.so studiorender.so; - ln -s vphysics_srv.so vphysics.so; - ln -s vscript_srv.so vscript.so; - ``` -3. `cd` up directories twice, so that you are in `/ntrebuild`. #### Extracting NT;RE and editing gameinfo.txt 1. Extract the latest release of NT;RE into `/ntrebuild`, so you will have a directory `/ntrebuild/neo` with a `gameinfo.txt` inside. From e6da040a6ee2e39b2540b624c144ae49179db791 Mon Sep 17 00:00:00 2001 From: Masterkatze Date: Sat, 4 Apr 2026 22:22:53 +0300 Subject: [PATCH 5/5] Fix typo --- src/CMakeLists.txt | 6 +++--- src/cmake/FindTier0.cmake | 1 + src/cmake/FindVSTDLib.cmake | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 02c2f355de..b49b2fd07f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -165,8 +165,7 @@ add_compile_definitions( ) if(OS_WINDOWS) - set(LIBPUBLIC_RELATIVE_PATH "lib/public/${PLATSUBDIR}") - set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/${LIBPUBLIC_RELATIVE}") + set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/lib/public/${PLATSUBDIR}") set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common/${PLATSUBDIR}") set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue") @@ -386,7 +385,8 @@ if(OS_LINUX OR OS_MACOS) endif() if(OS_LINUX) - set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/lib/public/${PLATSUBDIR}") + set(LIBPUBLIC_RELATIVE_PATH "lib/public/${PLATSUBDIR}") + set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/${LIBPUBLIC_RELATIVE_PATH}") set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common/${PLATSUBDIR}") add_compile_definitions( diff --git a/src/cmake/FindTier0.cmake b/src/cmake/FindTier0.cmake index 60601e263d..6da95a07f0 100644 --- a/src/cmake/FindTier0.cmake +++ b/src/cmake/FindTier0.cmake @@ -1,4 +1,5 @@ if(OS_WINDOWS) + set(TIER0_LIBRARY_FIND_PATH "${LIBPUBLIC}") set(TIER0_LIBRARY_NAME tier0.lib) elseif(OS_LINUX) if (NEO_DEDICATED) diff --git a/src/cmake/FindVSTDLib.cmake b/src/cmake/FindVSTDLib.cmake index 597ae5501f..da03e490b5 100644 --- a/src/cmake/FindVSTDLib.cmake +++ b/src/cmake/FindVSTDLib.cmake @@ -1,4 +1,5 @@ if(OS_WINDOWS) + set(VSTDLIB_LIBRARY_FIND_PATH "${LIBPUBLIC}") set(VSTDLIB_LIBRARY_NAME vstdlib.lib) elseif(OS_LINUX) if (NEO_DEDICATED)