Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<YOUR_LOCATION>/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 `<YOUR_LOCATION>/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 `<YOUR_LOCATION>/ntrebuild`.

#### Extracting NT;RE and editing gameinfo.txt
1. Extract the latest release of NT;RE into `<YOUR_LOCATION>/ntrebuild`, so you will have a directory `<YOUR_LOCATION>/ntrebuild/neo` with a `gameinfo.txt` inside.
Expand Down
31 changes: 19 additions & 12 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,26 @@ 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)
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
Expand All @@ -159,8 +165,8 @@ add_compile_definitions(
)

if(OS_WINDOWS)
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}")

set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue")

Expand Down Expand Up @@ -379,8 +385,9 @@ 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_RELATIVE_PATH "lib/public/${PLATSUBDIR}")
set(LIBPUBLIC "${CMAKE_SOURCE_DIR}/${LIBPUBLIC_RELATIVE_PATH}")
set(LIBCOMMON "${CMAKE_SOURCE_DIR}/lib/common/${PLATSUBDIR}")

add_compile_definitions(
LINUX
Expand Down Expand Up @@ -498,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()
Expand Down Expand Up @@ -548,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()
Expand Down
16 changes: 13 additions & 3 deletions src/cmake/FindTier0.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
if(OS_WINDOWS)
set(TIER0_LIBRARY_FIND_PATH "${LIBPUBLIC}")
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
Expand Down
14 changes: 12 additions & 2 deletions src/cmake/FindVSTDLib.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
if(OS_WINDOWS)
set(VSTDLIB_LIBRARY_FIND_PATH "${LIBPUBLIC}")
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
Expand Down
Loading