mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-16 22:42:31 +03:00
Adapt build automation to new branch (WIP)
This commit is contained in:
parent
62331158d5
commit
14b5256b27
@ -18,14 +18,6 @@ on:
|
|||||||
options:
|
options:
|
||||||
- Release
|
- Release
|
||||||
- Debug
|
- Debug
|
||||||
branch:
|
|
||||||
description: 'Which Source 2013 engine branch to compile for'
|
|
||||||
default: 'sp'
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- sp
|
|
||||||
- mp
|
|
||||||
game:
|
game:
|
||||||
description: 'Name of the game to build (if relevant)'
|
description: 'Name of the game to build (if relevant)'
|
||||||
default: 'episodic'
|
default: 'episodic'
|
||||||
@ -34,6 +26,8 @@ on:
|
|||||||
options:
|
options:
|
||||||
- episodic
|
- episodic
|
||||||
- hl2
|
- hl2
|
||||||
|
- hl2mp
|
||||||
|
- tf
|
||||||
project-group:
|
project-group:
|
||||||
description: 'Which group of projects to compile'
|
description: 'Which group of projects to compile'
|
||||||
required: true
|
required: true
|
||||||
@ -63,7 +57,6 @@ jobs:
|
|||||||
uses: ./.github/workflows/mapbase_build-base.yml
|
uses: ./.github/workflows/mapbase_build-base.yml
|
||||||
with:
|
with:
|
||||||
configuration: '${{ github.event.inputs.configuration }}'
|
configuration: '${{ github.event.inputs.configuration }}'
|
||||||
branch: '${{ github.event.inputs.branch }}'
|
|
||||||
game: '${{ github.event.inputs.game }}'
|
game: '${{ github.event.inputs.game }}'
|
||||||
project-group: '${{ github.event.inputs.project-group }}'
|
project-group: '${{ github.event.inputs.project-group }}'
|
||||||
solution-name: '${{ github.event.inputs.solution-name }}'
|
solution-name: '${{ github.event.inputs.solution-name }}'
|
||||||
|
77
.github/workflows/mapbase_build-base.yml
vendored
77
.github/workflows/mapbase_build-base.yml
vendored
@ -21,11 +21,6 @@ on:
|
|||||||
default: 'Release'
|
default: 'Release'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
branch:
|
|
||||||
description: 'Which Source 2013 engine branch to compile for'
|
|
||||||
default: 'sp'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
game:
|
game:
|
||||||
description: 'The name of the game to build (if relevant)'
|
description: 'The name of the game to build (if relevant)'
|
||||||
default: 'episodic'
|
default: 'episodic'
|
||||||
@ -52,38 +47,34 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.13'
|
||||||
|
|
||||||
- name: Add MSBuild to PATH
|
- name: Add MSBuild to PATH
|
||||||
uses: compnerd/gha-setup-vsdevenv@v6
|
uses: compnerd/gha-setup-vsdevenv@v6
|
||||||
|
|
||||||
- name: Enable VS2022
|
|
||||||
working-directory: '${{inputs.branch}}/src/vpc_scripts'
|
|
||||||
shell: bash
|
|
||||||
run: sed -i 's/^\($Conditional[ ]\+VS2022[ ]\+\).*/\1"1"/' newer_vs_toolsets.vpc
|
|
||||||
|
|
||||||
- name: Pick game
|
- name: Pick game
|
||||||
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
|
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
|
||||||
working-directory: '${{inputs.branch}}/src'
|
working-directory: 'src'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sed -i 's/\/hl2 \/episodic/\/${{inputs.game}}/' create${{inputs.project-group}}projects.bat
|
run: sed -i 's/\/hl2mp \/tf/\/${{inputs.game}}/' create${{inputs.project-group}}projects.bat
|
||||||
|
|
||||||
- name: Create project files
|
- name: Create project files
|
||||||
working-directory: '${{inputs.branch}}/src'
|
working-directory: 'src'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
# https://github.com/ValveSoftware/source-sdk-2013/issues/72
|
|
||||||
run: |
|
run: |
|
||||||
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" /v DefaultProjectExtension /t REG_SZ /d vcproj /f
|
|
||||||
create${{inputs.project-group}}projects.bat
|
create${{inputs.project-group}}projects.bat
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
#if: steps.filter.outputs.game == 'true'
|
#if: steps.filter.outputs.game == 'true'
|
||||||
working-directory: '${{inputs.branch}}/src'
|
working-directory: 'src'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
devenv ${{inputs.solution-name}}.sln /upgrade
|
devenv ${{inputs.solution-name}}.sln /upgrade
|
||||||
msbuild -m -t:Rebuild -p:Configuration=${{inputs.configuration}};Platform=x86 ${{inputs.solution-name}}.sln
|
msbuild -m -t:Rebuild -p:Configuration=${{inputs.configuration}};Platform=win64 ${{inputs.solution-name}}.sln
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
@ -93,7 +84,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: '${{inputs.project-group}}_${{inputs.game}}_win32_${{ inputs.configuration }}'
|
name: '${{inputs.project-group}}_${{inputs.game}}_win32_${{ inputs.configuration }}'
|
||||||
path: |
|
path: |
|
||||||
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.dll
|
game/mod_${{inputs.game}}/bin/*.dll
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Publish map tools
|
- name: Publish map tools
|
||||||
@ -102,8 +93,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: '${{inputs.project-group}}_win32_${{ inputs.configuration }}'
|
name: '${{inputs.project-group}}_win32_${{ inputs.configuration }}'
|
||||||
path: |
|
path: |
|
||||||
${{inputs.branch}}/game/bin/*.exe
|
game/bin/*.exe
|
||||||
${{inputs.branch}}/game/bin/*.dll
|
game/bin/*.dll
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Publish everything
|
- name: Publish everything
|
||||||
@ -112,8 +103,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: 'everything_win32_${{ inputs.configuration }}'
|
name: 'everything_win32_${{ inputs.configuration }}'
|
||||||
path: |
|
path: |
|
||||||
${{inputs.branch}}/game/bin
|
game/bin
|
||||||
${{inputs.branch}}/game/mod_*/bin
|
game/mod_*/bin
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build_ubuntu:
|
build_ubuntu:
|
||||||
@ -124,36 +115,32 @@ jobs:
|
|||||||
config: ${{ inputs.configuration }}
|
config: ${{ inputs.configuration }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install GCC/G++ multilib
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install gcc-multilib g++-multilib
|
sudo apt-get -y install podman python3
|
||||||
|
|
||||||
- name: Pick game
|
- name: Pick game
|
||||||
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
|
if: inputs.project-group == 'game' || inputs.project-group == 'shaders'
|
||||||
working-directory: '${{inputs.branch}}/src'
|
working-directory: 'src'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sed -i 's/\/hl2 \/episodic/\/${{inputs.game}}/' create${{inputs.project-group}}projects
|
run: sed -i 's/\/hl2mp \/tf/\/${{inputs.game}}/' build${{inputs.project-group}}projects
|
||||||
|
|
||||||
- name: Set configuration
|
- name: Set configuration
|
||||||
working-directory: '${{inputs.branch}}/src'
|
working-directory: 'src'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
config=${{inputs.configuration}}
|
config=${{inputs.configuration}}
|
||||||
export CFG=${config,,}
|
export CFG=${config,,}
|
||||||
echo "config=${CFG}" >> $GITHUB_ENV
|
echo "config=${CFG}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create project files
|
|
||||||
working-directory: '${{inputs.branch}}/src'
|
|
||||||
run: ./create${{inputs.project-group}}projects
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: '${{inputs.branch}}/src'
|
working-directory: 'src'
|
||||||
run: make CFG=${{env.config}} -f ${{inputs.solution-name}}.mak
|
run: ./build${{inputs.project-group}}projects ${config,,}
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
@ -163,8 +150,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: '${{inputs.project-group}}_${{inputs.game}}_linux32_${{ inputs.configuration }}'
|
name: '${{inputs.project-group}}_${{inputs.game}}_linux32_${{ inputs.configuration }}'
|
||||||
path: |
|
path: |
|
||||||
${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.so
|
game/mod_${{inputs.game}}/bin/*.so
|
||||||
!${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*_srv.so
|
!game/mod_${{inputs.game}}/bin/*_srv.so
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
#- name: Publish map tools
|
#- name: Publish map tools
|
||||||
@ -173,11 +160,11 @@ jobs:
|
|||||||
# with:
|
# with:
|
||||||
# name: '${{inputs.project-group}}_linux32_${{ inputs.configuration }}'
|
# name: '${{inputs.project-group}}_linux32_${{ inputs.configuration }}'
|
||||||
# path: |
|
# path: |
|
||||||
# ${{inputs.branch}}/game/bin/vbsp
|
# game/bin/vbsp
|
||||||
# ${{inputs.branch}}/game/bin/vvis
|
# game/bin/vvis
|
||||||
# ${{inputs.branch}}/game/bin/vvis_dll.so
|
# game/bin/vvis_dll.so
|
||||||
# ${{inputs.branch}}/game/bin/vrad
|
# game/bin/vrad
|
||||||
# ${{inputs.branch}}/game/bin/vrad_dll.so
|
# game/bin/vrad_dll.so
|
||||||
# if-no-files-found: error
|
# if-no-files-found: error
|
||||||
|
|
||||||
# For now, don't publish the .dbg files even though we publish .pdb files on Windows
|
# For now, don't publish the .dbg files even though we publish .pdb files on Windows
|
||||||
@ -188,8 +175,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: 'everything_linux32_${{ inputs.configuration }}'
|
name: 'everything_linux32_${{ inputs.configuration }}'
|
||||||
path: |
|
path: |
|
||||||
${{inputs.branch}}/game/bin/*.so
|
game/bin/*.so
|
||||||
!${{inputs.branch}}/game/bin/*_srv.so
|
!game/bin/*_srv.so
|
||||||
${{inputs.branch}}/game/mod_*/bin/*.so
|
game/mod_*/bin/*.so
|
||||||
!${{inputs.branch}}/game/mod_*/bin/*_srv.so
|
!game/mod_*/bin/*_srv.so
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
@ -14,14 +14,14 @@ on:
|
|||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/mapbase_build-base.yml'
|
- '.github/workflows/mapbase_build-base.yml'
|
||||||
- '.github/workflows/mapbase_build-sp-rel-games.yml'
|
- '.github/workflows/mapbase_build-games.yml'
|
||||||
- 'sp/src/vpc_scripts/**'
|
- 'src/vpc_scripts/**'
|
||||||
- 'sp/src/game/**'
|
- 'src/game/**'
|
||||||
- 'sp/src/mathlib/**'
|
- 'src/mathlib/**'
|
||||||
- 'sp/src/responserules/runtime/**'
|
- 'src/responserules/runtime/**'
|
||||||
- 'sp/src/tier1/**'
|
- 'src/tier1/**'
|
||||||
- 'sp/src/vgui2/vgui_controls/**'
|
- 'src/vgui2/vgui_controls/**'
|
||||||
- 'sp/src/vscript/**'
|
- 'src/vscript/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
games:
|
games:
|
||||||
@ -31,7 +31,6 @@ jobs:
|
|||||||
uses: ./.github/workflows/mapbase_build-base.yml
|
uses: ./.github/workflows/mapbase_build-base.yml
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
branch: 'sp'
|
|
||||||
game: 'episodic' # Change this if your mod is not using HL2/Episodic game projects
|
game: 'episodic' # Change this if your mod is not using HL2/Episodic game projects
|
||||||
project-group: 'game'
|
project-group: 'game'
|
||||||
solution-name: 'games'
|
solution-name: 'games'
|
@ -13,17 +13,17 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/mapbase_build-sp-rel-maptools.yml'
|
- '.github/workflows/mapbase_build-maptools.yml'
|
||||||
- 'sp/src/vpc_scripts/**'
|
- 'src/vpc_scripts/**'
|
||||||
- 'sp/src/utils/vbsp/**'
|
- 'src/utils/vbsp/**'
|
||||||
- 'sp/src/utils/vvis/**'
|
- 'src/utils/vvis/**'
|
||||||
- 'sp/src/utils/vvis_launcher/**'
|
- 'src/utils/vvis_launcher/**'
|
||||||
- 'sp/src/utils/vrad/**'
|
- 'src/utils/vrad/**'
|
||||||
- 'sp/src/utils/vrad_launcher/**'
|
- 'src/utils/vrad_launcher/**'
|
||||||
- 'sp/src/mathlib/**'
|
- 'src/mathlib/**'
|
||||||
- 'sp/src/tier1/**'
|
- 'src/tier1/**'
|
||||||
- 'sp/src/vgui2/vgui_controls/**'
|
- 'src/vgui2/vgui_controls/**'
|
||||||
- 'sp/src/vscript/**'
|
- 'src/vscript/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
maptools:
|
maptools:
|
||||||
@ -33,6 +33,5 @@ jobs:
|
|||||||
uses: ./.github/workflows/mapbase_build-base.yml
|
uses: ./.github/workflows/mapbase_build-base.yml
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
branch: 'sp'
|
|
||||||
project-group: 'maptools'
|
project-group: 'maptools'
|
||||||
solution-name: 'maptools'
|
solution-name: 'maptools'
|
1
.github/workflows/mapbase_build-master.yml
vendored
1
.github/workflows/mapbase_build-master.yml
vendored
@ -25,7 +25,6 @@ jobs:
|
|||||||
uses: ./.github/workflows/mapbase_build-base.yml
|
uses: ./.github/workflows/mapbase_build-base.yml
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
branch: 'sp'
|
|
||||||
project-group: 'all'
|
project-group: 'all'
|
||||||
solution-name: 'everything'
|
solution-name: 'everything'
|
||||||
build-on-linux: true # Disable this if you don't want to compile for Linux
|
build-on-linux: true # Disable this if you don't want to compile for Linux
|
||||||
|
@ -13,10 +13,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/mapbase_build-sp-rel-shaders.yml'
|
- '.github/workflows/mapbase_build-shaders.yml'
|
||||||
- 'sp/src/vpc_scripts/**'
|
- 'src/vpc_scripts/**'
|
||||||
- 'sp/src/materialsystem/**'
|
- 'src/materialsystem/**'
|
||||||
- 'sp/src/mathlib/**'
|
- 'src/mathlib/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shaders:
|
shaders:
|
@ -24,7 +24,7 @@ fi
|
|||||||
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
solution_out="_vpc_/ninja/sdk_everything_$VPC_NINJA_BUILD_MODE"
|
||||||
|
|
||||||
if [[ ! -e "$solution_out.ninja" ]]; then
|
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||||
devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +everything /mksln "$solution_out"
|
devtools/bin/vpc /hl2mp /tf /hl2 /episodic /linux64 /ninja /define:SOURCESDK +everything /mksln "$solution_out"
|
||||||
|
|
||||||
# Generate compile commands.
|
# Generate compile commands.
|
||||||
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
ninja -f "$solution_out.ninja" -t compdb > compile_commands.json
|
||||||
|
38
src/buildgameprojects
Executable file
38
src/buildgameprojects
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/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_everything_$VPC_NINJA_BUILD_MODE"
|
||||||
|
|
||||||
|
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||||
|
devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +game /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
|
||||||
|
fi
|
||||||
|
|
||||||
|
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||||
|
|
||||||
|
popd
|
38
src/buildgameprojects_hl2
Executable file
38
src/buildgameprojects_hl2
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/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_everything_$VPC_NINJA_BUILD_MODE"
|
||||||
|
|
||||||
|
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||||
|
devtools/bin/vpc /hl2 /episodic /linux64 /ninja /define:SOURCESDK +game /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
|
||||||
|
fi
|
||||||
|
|
||||||
|
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||||
|
|
||||||
|
popd
|
38
src/buildshadersprojects
Executable file
38
src/buildshadersprojects
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/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_everything_$VPC_NINJA_BUILD_MODE"
|
||||||
|
|
||||||
|
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||||
|
devtools/bin/vpc /hl2mp /tf /linux64 /ninja /define:SOURCESDK +shaders /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
|
||||||
|
fi
|
||||||
|
|
||||||
|
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||||
|
|
||||||
|
popd
|
38
src/buildshadersprojects_hl2
Executable file
38
src/buildshadersprojects_hl2
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/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_everything_$VPC_NINJA_BUILD_MODE"
|
||||||
|
|
||||||
|
if [[ ! -e "$solution_out.ninja" ]]; then
|
||||||
|
devtools/bin/vpc /hl2 /episodic /linux64 /ninja /define:SOURCESDK +shaders /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
|
||||||
|
fi
|
||||||
|
|
||||||
|
ninja -f "$solution_out.ninja" -j$(nproc)
|
||||||
|
|
||||||
|
popd
|
@ -1 +1 @@
|
|||||||
devtools\bin\vpc.exe /hl2mp /tf /define:SOURCESDK +everything /mksln everything.sln
|
devtools\bin\vpc.exe /hl2mp /tf /hl2 /episodic /define:SOURCESDK +everything /mksln everything.sln
|
||||||
|
2
src/creategameprojects.bat
Normal file
2
src/creategameprojects.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
devtools\bin\vpc.exe /hl2mp /tf /define:SOURCESDK +game /mksln games.sln
|
||||||
|
pause
|
2
src/creategameprojects_hl2.bat
Normal file
2
src/creategameprojects_hl2.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
devtools\bin\vpc.exe /hl2 /define:SOURCESDK +game +shaders /mksln games.sln
|
||||||
|
pause
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
pushd `dirname $0`
|
|
||||||
devtools/bin/vpc /hl2 /episodic +maptools /mksln maptools
|
|
||||||
popd
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
pushd `dirname $0`
|
|
||||||
devtools/bin/vpc /hl2 /episodic +shaders /mksln shaders
|
|
||||||
popd
|
|
@ -1 +1 @@
|
|||||||
devtools\bin\vpc.exe /hl2 /episodic +shaders /mksln shaders.sln
|
devtools\bin\vpc.exe /hl2mp /tf +shaders /mksln shaders.sln
|
||||||
|
1
src/createshadersprojects_hl2.bat
Normal file
1
src/createshadersprojects_hl2.bat
Normal file
@ -0,0 +1 @@
|
|||||||
|
devtools\bin\vpc.exe /hl2 /episodic +shaders /mksln shaders.sln
|
Loading…
x
Reference in New Issue
Block a user