From 748ff6133c2775f81429b8cf202b04c5cdbe8592 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Fri, 17 Jun 2022 11:00:30 +0500 Subject: [PATCH 1/7] cmake: fix broken link. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe344cdc..489b84de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,7 +96,7 @@ if(64BIT AND CMAKE_SIZEOF_VOID_P EQUAL 4) endif() # Xash3D FWGS Library Naming Scheme compliance -# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/library-naming.md +# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/extensions/library-naming.md include(LibraryNaming) if(CMAKE_SIZEOF_VOID_P EQUAL 8) From ecd846d48e9f78a395113a06dc17baaf393eb8b8 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 18 Jun 2022 06:34:15 +0500 Subject: [PATCH 2/7] Remove submodule vgui-dev. --- .gitmodules | 3 --- vgui-dev | 1 - 2 files changed, 4 deletions(-) delete mode 160000 vgui-dev diff --git a/.gitmodules b/.gitmodules index 25dfc145..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "vgui-dev"] - path = vgui-dev - url = https://github.com/FWGS/vgui-dev diff --git a/vgui-dev b/vgui-dev deleted file mode 160000 index 93573075..00000000 --- a/vgui-dev +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 93573075afe885618ea15831e72d44bdacd65bfb From eeeff1aa34dd9260e714dcefcc0590693c40a258 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 18 Jun 2022 06:36:40 +0500 Subject: [PATCH 3/7] Add vgui_support as submodule. --- .gitmodules | 3 +++ vgui_support | 1 + 2 files changed, 4 insertions(+) create mode 160000 vgui_support diff --git a/.gitmodules b/.gitmodules index e69de29b..9510c702 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vgui_support"] + path = vgui_support + url = https://github.com/FWGS/vgui_support diff --git a/vgui_support b/vgui_support new file mode 160000 index 00000000..99108598 --- /dev/null +++ b/vgui_support @@ -0,0 +1 @@ +Subproject commit 991085982209a1b8eefabae04d842004d4f4fe4f From b0b68d5755438b05a4ebce58768e5d96d2bd161c Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 18 Jun 2022 06:42:42 +0500 Subject: [PATCH 4/7] cmake: update vgui path. --- cl_dll/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 6486cc9d..4c4474ea 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -156,8 +156,8 @@ include_directories (. hl/ ../dlls ../dlls/wpn_shared ../common ../engine ../pm_ if (USE_VGUI) SET(CMAKE_SKIP_RPATH TRUE) - link_directories(${CMAKE_SOURCE_DIR}/vgui-dev/lib) - include_directories(../vgui-dev/include) + link_directories(${CMAKE_SOURCE_DIR}/vgui_support/vgui-dev/lib) + include_directories(../vgui_support/vgui-dev/include) else() include_directories(../utils/false_vgui/include) endif() @@ -178,11 +178,11 @@ endif() if (USE_VGUI) if (WIN32) add_library(vgui SHARED IMPORTED) - set_property(TARGET vgui PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/vgui-dev/lib/win32_vc6/vgui.dll") - set_property(TARGET vgui PROPERTY IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/vgui-dev/lib/win32_vc6/vgui.lib") + set_property(TARGET vgui PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/vgui_support/vgui-dev/lib/win32_vc6/vgui.dll") + set_property(TARGET vgui PROPERTY IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/vgui_support/vgui-dev/lib/win32_vc6/vgui.lib") target_link_libraries(${CLDLL_LIBRARY} vgui) elseif(APPLE) - target_link_libraries(${CLDLL_LIBRARY} "-Wl,--no-undefined -L${CMAKE_SOURCE_DIR}/vgui-dev/lib vgui.dylib") + target_link_libraries(${CLDLL_LIBRARY} "-Wl,--no-undefined -L${CMAKE_SOURCE_DIR}/vgui_support/vgui-dev/lib vgui.dylib") else() target_link_libraries(${CLDLL_LIBRARY} :vgui.so) endif() From 7276284f8e646f8fca63d7d66c17117bf2d2330c Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 18 Jun 2022 06:55:40 +0500 Subject: [PATCH 5/7] github actions: update vgui path. --- .github/workflows/.github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.github.yml b/.github/workflows/.github.yml index 796110fa..2795f59e 100644 --- a/.github/workflows/.github.yml +++ b/.github/workflows/.github.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - submodules: true + submodules: recursive - name: Checkout steam-runtime if: startsWith(matrix.os, 'ubuntu') @@ -64,7 +64,7 @@ jobs: if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc') run: | schroot --chroot steamrt_scout_i386 -- cmake -B build-vgui -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DGOLDSOURCE_SUPPORT=ON -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="$PWD/dist-vgui" - cp vgui-dev/lib/vgui.so build-vgui/cl_dll + cp vgui_support/vgui-dev/lib/vgui.so build-vgui/cl_dll schroot --chroot steamrt_scout_i386 -- cmake --build build-vgui --target all schroot --chroot steamrt_scout_i386 -- cmake --build build-vgui --target install From b933d1438468ab490915528aa136641a8a6957f2 Mon Sep 17 00:00:00 2001 From: Jesse Buhagiar Date: Sun, 2 Jan 2022 00:10:53 +1100 Subject: [PATCH 6/7] Build: Add SerenityOS to list of compatible systems This is required by the build system to spit out a library with the correct name/platform. --- public/build.h | 4 ++++ scripts/waifulib/library_naming.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/public/build.h b/public/build.h index 3692cf17..5b6bcc36 100644 --- a/public/build.h +++ b/public/build.h @@ -75,6 +75,7 @@ For more information, please refer to #undef XASH_RISCV_DOUBLEFP #undef XASH_RISCV_SINGLEFP #undef XASH_RISCV_SOFTFP +#undef XASH_SERENITY #undef XASH_WIN32 #undef XASH_WIN64 #undef XASH_X86 @@ -126,6 +127,9 @@ For more information, please refer to #elif defined __HAIKU__ #define XASH_HAIKU 1 #define XASH_POSIX 1 +#elif defined __serenity__ + #define XASH_SERENITY 1 + #define XASH_POSIX 1 #else #error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug" #endif diff --git a/scripts/waifulib/library_naming.py b/scripts/waifulib/library_naming.py index a3929067..44ade2fd 100644 --- a/scripts/waifulib/library_naming.py +++ b/scripts/waifulib/library_naming.py @@ -57,6 +57,7 @@ DEFINES = [ 'XASH_RISCV_DOUBLEFP', 'XASH_RISCV_SINGLEFP', 'XASH_RISCV_SOFTFP', +'XASH_SERENITY', 'XASH_WIN32', 'XASH_WIN64', 'XASH_X86', @@ -89,6 +90,8 @@ def configure(conf): buildos = "dos4gw" # unused, just in case elif conf.env.XASH_HAIKU: buildos = "haiku" + elif conf.env.XASH_SERENITY: + buildos = "serenityos" else: conf.fatal("Place your operating system name in build.h and library_naming.py!\n" "If this is a mistake, try to fix conditions above and report a bug") From 4aba145f9ee2760a5473a4401277881fef950a9d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 20 Jun 2022 00:18:38 +0300 Subject: [PATCH 7/7] cmake: add missing definitions for SerenityOS and DOS4GW --- cmake/LibraryNaming.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/LibraryNaming.cmake b/cmake/LibraryNaming.cmake index ca6fb42e..c97c92f7 100644 --- a/cmake/LibraryNaming.cmake +++ b/cmake/LibraryNaming.cmake @@ -38,6 +38,7 @@ check_symbol_exists(XASH_RISCV "build.h" XASH_RISCV) check_symbol_exists(XASH_RISCV_DOUBLEFP "build.h" XASH_RISCV_DOUBLEFP) check_symbol_exists(XASH_RISCV_SINGLEFP "build.h" XASH_RISCV_SINGLEFP) check_symbol_exists(XASH_RISCV_SOFTFP "build.h" XASH_RISCV_SOFTFP) +check_symbol_exists(XASH_SERENITY "build.h" XASH_SERENITY) check_symbol_exists(XASH_WIN32 "build.h" XASH_WIN32) check_symbol_exists(XASH_WIN64 "build.h" XASH_WIN64) check_symbol_exists(XASH_X86 "build.h" XASH_X86) @@ -54,10 +55,14 @@ elseif(XASH_NETBSD) set(BUILDOS "netbsd") elseif(XASH_OPENBSD) set(BUILDOS "openbsd") -elseif(XASH_HAIKU) - set(BUILDOS "haiku") elseif(XASH_EMSCRIPTEN) set(BUILDOS "emscripten") +elseif(XASH_DOS4GW) + set(BUILDOS "DOS4GW") +elseif(XASH_HAIKU) + set(BUILDOS "haiku") +elseif(XASH_SERENITY) + set(BUILDOS "serenityos") else() message(SEND_ERROR "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug") endif()