Browse Source

Build with GoldSource input by default on Windows and Linux (#264)

hlfixed
Roman Chistokhodov 2 years ago committed by GitHub
parent
commit
c8c2841ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      .github/workflows/.github.yml
  2. 3
      CMakeLists.txt
  3. 2
      appveyor.yml

21
.github/workflows/.github.yml

@ -49,21 +49,16 @@ jobs:
./steam-runtime/setup_chroot.sh --i386 --tarball ./com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz ./steam-runtime/setup_chroot.sh --i386 --tarball ./com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
sudo sed -i 's/groups=sudo/groups=adm/g' /etc/schroot/chroot.d/steamrt_scout_i386.conf sudo sed -i 's/groups=sudo/groups=adm/g' /etc/schroot/chroot.d/steamrt_scout_i386.conf
- name: Build with xash3d-fwgs input - name: Build on Linux
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: | run: |
schroot --chroot steamrt_scout_i386 -- cmake -B build-fwgs -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" schroot --chroot steamrt_scout_i386 -- cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DCMAKE_INSTALL_PREFIX="$PWD/dist"
schroot --chroot steamrt_scout_i386 -- cmake --build build-fwgs --target all
- name: Build with goldsource input
if: startsWith(matrix.os, 'ubuntu')
run: |
schroot --chroot steamrt_scout_i386 -- cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="$PWD/dist"
schroot --chroot steamrt_scout_i386 -- cmake --build build --target all schroot --chroot steamrt_scout_i386 -- cmake --build build --target all
schroot --chroot steamrt_scout_i386 -- cmake --build build --target install schroot --chroot steamrt_scout_i386 -- cmake --build build --target install
- name: Build with goldsource input and vgui - name: Build on Linux with vgui
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc')
run: | 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" schroot --chroot steamrt_scout_i386 -- cmake -B build-vgui -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="$PWD/dist-vgui"
cp vgui_support/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 all
schroot --chroot steamrt_scout_i386 -- cmake --build build-vgui --target install schroot --chroot steamrt_scout_i386 -- cmake --build build-vgui --target install
@ -78,15 +73,15 @@ jobs:
- name: Add msbuild to PATH - name: Add msbuild to PATH
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1.0.2 uses: microsoft/setup-msbuild@v1.0.2
- name: Build with msvc - name: Build on Windows
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
run: | run: |
cmake -G "Visual Studio 16 2019" -A Win32 -B build -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="dist" cmake -G "Visual Studio 16 2019" -A Win32 -B build -DCMAKE_INSTALL_PREFIX="dist"
msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj
- name: Build with msvc and vgui - name: Build on Windows with vgui
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
run: | run: |
cmake -G "Visual Studio 16 2019" -A Win32 -B build -DGOLDSOURCE_SUPPORT=ON -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="dist-vgui" cmake -G "Visual Studio 16 2019" -A Win32 -B build -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="dist-vgui"
msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj
- name: Extract branch name - name: Extract branch name

3
CMakeLists.txt

@ -45,7 +45,6 @@ option(USE_NOVGUI_SCOREBOARD "Prefer non-VGUI Scoreboard when USE_VGUI is enable
option(USE_VOICEMGR "Enable VOICE MANAGER." OFF) option(USE_VOICEMGR "Enable VOICE MANAGER." OFF)
option(BUILD_CLIENT "Build client dll" ON) option(BUILD_CLIENT "Build client dll" ON)
option(BUILD_SERVER "Build server dll" ON) option(BUILD_SERVER "Build server dll" ON)
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" OFF)
if (CMAKE_SIZEOF_VOID_P EQUAL 4 OR if (CMAKE_SIZEOF_VOID_P EQUAL 4 OR
((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") ((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
@ -53,8 +52,10 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 4 OR
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64"
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64"))) OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")))
option(64BIT "Disable auto -m32 appending to compiler flags" OFF) option(64BIT "Disable auto -m32 appending to compiler flags" OFF)
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" ON)
else() else()
option(64BIT "Disable auto -m32 appending to compiler flags" ON) option(64BIT "Disable auto -m32 appending to compiler flags" ON)
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" OFF)
endif() endif()
option(BARNACLE_FIX_VISIBILITY "Enable barnacle tongue length fix" OFF) option(BARNACLE_FIX_VISIBILITY "Enable barnacle tongue length fix" OFF)

2
appveyor.yml

@ -20,7 +20,7 @@ configuration:
before_build: before_build:
- git submodule update --init --recursive - git submodule update --init --recursive
- cmake -G "%GENERATOR_NAME%" -B build -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="dist" - cmake -G "%GENERATOR_NAME%" -B build -DCMAKE_INSTALL_PREFIX="dist"
artifacts: artifacts:
- path: dist - path: dist

Loading…
Cancel
Save