Merge pull request #31 from Sak32009/dev

varied fixes and improvements
This commit is contained in:
Detanup01 2024-08-26 07:39:01 +02:00 committed by GitHub
commit b0d92a48c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 986 additions and 932 deletions

20
.editorconfig Normal file
View File

@ -0,0 +1,20 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
[*.py]
indent_size = 4
[*.h]
indent_size = 4
[*.cpp]
indent_size = 4

View File

@ -1,4 +1,4 @@
name: Build emu (Linux) name: "Build emu (Linux)"
on: on:
workflow_call: workflow_call:
@ -7,26 +7,26 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
PREMAKE_ACTION: gmake2 PREMAKE_ACTION: "gmake2"
DEPS_CACHE_KEY: emu-deps-linux DEPS_CACHE_KEY: "emu-deps-linux"
DEPS_CACHE_DIR: build/deps/linux DEPS_CACHE_DIR: "build/deps/linux"
PACKAGE_BASE_DIR: "build/package/linux" PACKAGE_BASE_DIR: "build/package/linux"
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
deps: deps:
name: Restore or build deps name: "Restore or build deps"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-deps-linux.yml uses: "./.github/workflows/emu-deps-linux.yml"
builds-matrix-linux: builds-matrix-linux:
name: build name: "build"
needs: [ deps ] needs: ["deps"]
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
continue-on-error: true continue-on-error: true
@ -34,61 +34,63 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
prj: [ prj: [
# regular api # regular api
'api_regular', 'steamclient_regular', "api_regular",
# api + client (experimental) "steamclient_regular",
'api_experimental', 'steamclient_experimental', # api + client (experimental)
# tools "api_experimental",
'tool_lobby_connect', 'tool_generate_interfaces', "steamclient_experimental",
] # tools
arch: [ 'x64', 'x32', ] "tool_lobby_connect",
cfg: [ 'debug', 'release', ] "tool_generate_interfaces",
]
arch: ["x64", "x32"]
cfg: ["debug", "release"]
steps: steps:
### clone branch # clone branch
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
### deps # deps
- name: Restore deps - name: "Restore deps"
id: emu-deps-cache-step id: "emu-deps-cache-step"
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }} key: "${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}"
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }} path: "${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}"
## extra helpers/tools, these are not built inside the deps build dir # extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party build helpers (common/linux) - name: "Clone third-party build helpers (common/linux)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/common/linux' ref: "third-party/common/linux"
path: "${{env.THIRD_PARTY_BASE_DIR}}/common/linux" path: "${{env.THIRD_PARTY_BASE_DIR}}/common/linux"
- name: Clone third-party build helpers (build/linux) - name: "Clone third-party build helpers (build/linux)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/build/linux' ref: "third-party/build/linux"
path: "${{env.THIRD_PARTY_BASE_DIR}}/build/linux" path: "${{env.THIRD_PARTY_BASE_DIR}}/build/linux"
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" run: sudo chmod -R 777 "${{ github.workspace }}"
### generate project files # generate project files
- name: Generate project files - name: "Generate project files"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
sudo chmod 777 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 sudo chmod 777 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5
./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 --file=premake5.lua --genproto --emubuild=${{ github.sha }} --os=linux gmake2 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 --file=premake5.lua --genproto --emubuild=${{ github.sha }} --os=linux gmake2
## mandatory Linux packages # mandatory Linux packages
- name: Install required packages - name: "Install required packages"
shell: bash shell: "bash"
run: | run: |
sudo apt update -y sudo apt update -y
sudo apt install -y coreutils # echo, printf, etc... sudo apt install -y coreutils # echo, printf, etc...
@ -100,22 +102,22 @@ jobs:
sudo apt install -y libgl-dev # needed for overlay build (header files such as GL/gl.h) sudo apt install -y libgl-dev # needed for overlay build (header files such as GL/gl.h)
# sudo apt install -y binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff # sudo apt install -y binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff
### build target # build target
- name: Build target - name: "Build target"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }}/build/project/gmake2/linux working-directory: "${{ github.workspace }}/build/project/gmake2/linux"
run: | run: |
echo "dry run..." echo "dry run..."
make -n -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }} make -n -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
echo "actual run..." echo "actual run..."
make -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }} make -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
### upload artifact/package to github Actions # upload artifact/package to github Actions
- name: Upload target package - name: "Upload target package"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "emu-linux-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}" name: "emu-linux-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}"
path: "build/linux" path: "build/linux"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 1 retention-days: 1

View File

@ -1,4 +1,4 @@
name: Build emu (Windows) name: "Build emu (Windows)"
on: on:
workflow_call: workflow_call:
@ -7,25 +7,25 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
PREMAKE_ACTION: vs2022 PREMAKE_ACTION: "vs2022"
DEPS_CACHE_KEY: emu-deps-win DEPS_CACHE_KEY: "emu-deps-win"
DEPS_CACHE_DIR: build/deps/win DEPS_CACHE_DIR: "build/deps/win"
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
deps: deps:
name: Restore or build deps name: "Restore or build deps"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-deps-win.yml uses: "./.github/workflows/emu-deps-win.yml"
builds-matrix-win: builds-matrix-win:
name: build name: "build"
needs: [ deps ] needs: ["deps"]
runs-on: windows-2022 runs-on: "windows-2022"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
continue-on-error: true continue-on-error: true
@ -33,78 +33,82 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
prj: [ prj: [
# regular api # regular api
'api_regular', "api_regular",
# (experimental) api + client # (experimental) api + client
'api_experimental', 'steamclient_experimental_stub', "api_experimental",
# client (experimental) + loader + extra dll + gameoverlaylib "steamclient_experimental_stub",
'steamclient_experimental', 'steamclient_experimental_loader', # client (experimental) + loader + extra dll + gameoverlaylib
'steamclient_experimental_extra', 'lib_game_overlay_renderer', "steamclient_experimental",
# tools "steamclient_experimental_loader",
'tool_lobby_connect', 'tool_generate_interfaces', "steamclient_experimental_extra",
] "lib_game_overlay_renderer",
arch: [ 'x64', 'Win32', ] # tools
cfg: [ 'debug', 'release', ] "tool_lobby_connect",
"tool_generate_interfaces",
]
arch: ["x64", "Win32"]
cfg: ["debug", "release"]
steps: steps:
### on Windows Git will auto change line ending to CRLF, not preferable # on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
### ensure we have msbuild # ensure we have msbuild
- name: Add MSBuild to PATH - name: "Add MSBuild to PATH"
uses: microsoft/setup-msbuild@v2 uses: microsoft/setup-msbuild@v2
### clone branch # clone branch
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
### deps # deps
- name: Restore deps - name: "Restore deps"
id: emu-deps-cache-step id: "emu-deps-cache-step"
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }} key: "${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}"
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }} path: "${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}"
## extra helpers/tools, these are not built inside the deps build dir # extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party build helpers (common/win) - name: "Clone third-party build helpers (common/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/common/win' ref: "third-party/common/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/common/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/common/win"
- name: Clone third-party deps (build/win) - name: "Clone third-party deps (build/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/build/win' ref: "third-party/build/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win"
### generate project files # generate project files
- name: Generate project files - name: "Generate project files"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
"${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5.lua --genproto --emubuild=${{ github.sha }} --dosstub --winrsrc --winsign --os=windows vs2022 "${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5.lua --genproto --emubuild=${{ github.sha }} --dosstub --winrsrc --winsign --os=windows vs2022
### build target # build target
- name: Build target - name: "Build target"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }}/build/project/vs2022/win working-directory: "${{ github.workspace }}/build/project/vs2022/win"
run: | run: |
msbuild /nologo /target:${{ matrix.prj }} /m:2 /v:n /p:Configuration=${{ matrix.cfg }},Platform=${{ matrix.arch }} gbe.sln msbuild /nologo /target:${{ matrix.prj }} /m:2 /v:n /p:Configuration=${{ matrix.cfg }},Platform=${{ matrix.arch }} gbe.sln
### upload artifact/package to github Actions # upload artifact/package to github Actions
- name: Upload target package - name: "Upload target package"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "emu-win-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}" name: "emu-win-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}"
path: "build/win" path: "build/win"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 1 retention-days: 1

View File

@ -1,4 +1,4 @@
name: Emu third-party dependencies (Linux) name: "Emu third-party dependencies (Linux)"
on: on:
workflow_call: workflow_call:
@ -7,82 +7,82 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
PREMAKE_ACTION: gmake2 PREMAKE_ACTION: "gmake2"
DEPS_CACHE_KEY: emu-deps-linux DEPS_CACHE_KEY: "emu-deps-linux"
DEPS_CACHE_DIR: build/deps/linux DEPS_CACHE_DIR: "build/deps/linux"
PACKAGE_BASE_DIR: "build/package/linux" PACKAGE_BASE_DIR: "build/package/linux"
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
deps-build: deps-build:
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
steps: steps:
- name: Lookup cache for deps - name: "Lookup cache for deps"
id: emu-deps-cache-step id: "emu-deps-cache-step"
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }} key: "${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}"
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }} path: "${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}"
# we need branch because it has build scripts # we need branch because it has build scripts
- name: Checkout branch - name: "Checkout branch"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Clone third-party deps (common/linux) - name: "Clone third-party deps (common/linux)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/common/linux' ref: "third-party/common/linux"
path: "${{env.THIRD_PARTY_BASE_DIR}}/common/linux" path: "${{env.THIRD_PARTY_BASE_DIR}}/common/linux"
- name: Clone third-party deps (deps/linux) - name: "Clone third-party deps (deps/linux)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/linux' ref: "third-party/deps/linux"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/linux" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/linux"
- name: Clone third-party deps (deps/common) - name: "Clone third-party deps (deps/common)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/common' ref: "third-party/deps/common"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/common" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/common"
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" run: sudo chmod -R 777 "${{ github.workspace }}"
## mandatory Linux packages # mandatory Linux packages
- name: Install required packages - name: "Install required packages"
shell: bash shell: "bash"
run: | run: |
sudo apt update -y sudo apt update -y
sudo apt install -y coreutils # echo, printf, etc... sudo apt install -y coreutils # echo, printf, etc...
sudo apt install -y build-essential sudo apt install -y build-essential
sudo apt install -y gcc-multilib # needed for 32-bit builds sudo apt install -y gcc-multilib # needed for 32-bit builds
sudo apt install -y g++-multilib sudo apt install -y g++-multilib
# sudo apt install -y clang # sudo apt install -y clang
sudo apt install -y libglx-dev # needed for overlay build (header files such as GL/glx.h) sudo apt install -y libglx-dev # needed for overlay build (header files such as GL/glx.h)
sudo apt install -y libgl-dev # needed for overlay build (header files such as GL/gl.h) sudo apt install -y libgl-dev # needed for overlay build (header files such as GL/gl.h)
# sudo apt install -y binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff # sudo apt install -y binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff
- name: Build deps - name: "Build deps"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
export CMAKE_GENERATOR="Unix Makefiles" export CMAKE_GENERATOR="Unix Makefiles"
sudo chmod 777 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 sudo chmod 777 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5
./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=linux gmake2 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=linux gmake2

View File

@ -1,4 +1,4 @@
name: Emu third-party dependencies (Windows) name: "Emu third-party dependencies (Windows)"
on: on:
workflow_call: workflow_call:
@ -7,76 +7,76 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
PREMAKE_ACTION: vs2022 PREMAKE_ACTION: "vs2022"
DEPS_CACHE_KEY: emu-deps-win DEPS_CACHE_KEY: "emu-deps-win"
DEPS_CACHE_DIR: build/deps/win DEPS_CACHE_DIR: "build/deps/win"
PACKAGE_BASE_DIR: "build/package/win" PACKAGE_BASE_DIR: "build/package/win"
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
deps-build: deps-build:
runs-on: windows-2022 runs-on: "windows-2022"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
steps: steps:
# on Windows Git will auto change line ending to CRLF, not preferable # on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
- name: Lookup cache for deps - name: "Lookup cache for deps"
id: emu-deps-cache-step id: "emu-deps-cache-step"
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }} key: "${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}"
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }} path: "${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}"
lookup-only: true # don't restore cache if found lookup-only: true # don't restore cache if found
# we need branch because it has build scripts # we need branch because it has build scripts
- name: Checkout branch - name: "Checkout branch"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Clone third-party deps (common/win) - name: "Clone third-party deps (common/win)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/common/win' ref: "third-party/common/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/common/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/common/win"
- name: Clone third-party deps (deps/win) - name: "Clone third-party deps (deps/win)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/win' ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
- name: Clone third-party deps (deps/common) - name: "Clone third-party deps (deps/common)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/common' ref: "third-party/deps/common"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/common" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/common"
- name: Clone third-party deps (common/win) - name: "Clone third-party deps (common/win)"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/common/win' ref: "third-party/common/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/common/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/common/win"
- name: Build deps - name: "Build deps"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
set "CMAKE_GENERATOR=Visual Studio 17 2022" set "CMAKE_GENERATOR=Visual Studio 17 2022"
"${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=windows vs2022 "${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=windows vs2022

View File

@ -1,30 +1,30 @@
name: Emu PR name: "Emu PR"
on: on:
pull_request: pull_request:
branches: [ "dev" ] branches: ["dev"]
paths-ignore: paths-ignore:
- '**/*.md' - "**/*.md"
- 'dev.notes/**' - "dev.notes/**"
- 'post_build/**' - "post_build/**"
- 'z_original_repo_files/**' - "z_original_repo_files/**"
- 'sdk/*.txt' - "sdk/*.txt"
- 'LICENSE' - "LICENSE"
# tools # tools
- 'tools/generate_emu_config/**' - "tools/generate_emu_config/**"
- 'tools/migrate_gse/**' - "tools/migrate_gse/**"
- 'tools/steamclient_loader/linux/**' # these are just scripts, not built - "tools/steamclient_loader/linux/**" # these are just scripts, not built
permissions: permissions:
contents: write contents: "write"
jobs: jobs:
emu-win-all: emu-win-all:
name: win name: "win"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-build-all-win.yml uses: "./.github/workflows/emu-build-all-win.yml"
emu-linux-all: emu-linux-all:
name: linux name: "linux"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-build-all-linux.yml uses: "./.github/workflows/emu-build-all-linux.yml"

View File

@ -1,4 +1,4 @@
name: Build gen_emu_config script (Linux) name: "Build gen_emu_config script (Linux)"
on: on:
workflow_call: workflow_call:
@ -7,7 +7,7 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}" ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
@ -16,37 +16,37 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
steps: steps:
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
# env # env
- name: Install env - name: "Install env"
shell: bash shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" run: sudo chmod -R 777 "${{ github.workspace }}"
# build # build
- name: Rebuild - name: "Rebuild"
shell: bash shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh
# upload artifact # upload artifact
- name: Upload build package - name: "Upload build package"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "${{ env.ARTIFACT_NAME }}" name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/" path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 1 retention-days: 1

View File

@ -1,4 +1,4 @@
name: Build gen_emu_config script (Windows) name: "Build gen_emu_config script (Windows)"
on: on:
workflow_call: workflow_call:
@ -7,62 +7,62 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
ARTIFACT_NAME: "generate_emu_config-win-${{ github.sha }}" ARTIFACT_NAME: "generate_emu_config-win-${{ github.sha }}"
SCRIPT_BASE_DIR: "tools/generate_emu_config" SCRIPT_BASE_DIR: "tools/generate_emu_config"
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/win" PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/win"
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
build: build:
runs-on: windows-2022 runs-on: "windows-2022"
steps: steps:
- name: Set up Python - name: "Set up Python"
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.12" python-version: "3.12"
### on Windows Git will auto change line ending to CRLF, not preferable ### on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
## extra helpers/tools, these are not built inside the deps build dir ## extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party deps (build/win) - name: "Clone third-party deps (build/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/build/win' ref: "third-party/build/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win"
# env # env
- name: Install env - name: "Install env"
shell: cmd shell: "cmd"
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: recreate_venv_win.bat run: recreate_venv_win.bat
# build # build
- name: Rebuild - name: "Rebuild"
shell: cmd shell: "cmd"
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: rebuild_win.bat run: rebuild_win.bat
# upload artifact # upload artifact
- name: Upload build package - name: "Upload build package"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "${{ env.ARTIFACT_NAME }}" name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/" path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 1 retention-days: 1

View File

@ -1,22 +1,22 @@
name: Gen emu cfg PR name: "Gen emu cfg PR"
on: on:
pull_request: pull_request:
branches: [ "dev" ] branches: ["dev"]
paths: paths:
- '!**/*.md' - "!**/*.md"
- 'tools/generate_emu_config/**' - "tools/generate_emu_config/**"
permissions: permissions:
contents: write contents: "write"
jobs: jobs:
script-win: script-win:
name: Gen emu config win name: "Gen emu config win"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/gen_emu_config-build-win.yml uses: "./.github/workflows/gen_emu_config-build-win.yml"
script-linux: script-linux:
name: Gen emu config linux name: "Gen emu config linux"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/gen_emu_config-build-linux.yml uses: "./.github/workflows/gen_emu_config-build-linux.yml"

View File

@ -1,4 +1,4 @@
name: Build migrate_gse script (Linux) name: "Build migrate_gse script (Linux)"
on: on:
workflow_call: workflow_call:
@ -7,7 +7,7 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
ARTIFACT_NAME: "migrate_gse-linux-${{ github.sha }}" ARTIFACT_NAME: "migrate_gse-linux-${{ github.sha }}"
@ -16,37 +16,37 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
steps: steps:
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" run: sudo chmod -R 777 "${{ github.workspace }}"
# env # env
- name: Install env - name: "Install env"
shell: bash shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
# build # build
- name: Rebuild - name: "Rebuild"
shell: bash shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh
# upload artifact # upload artifact
- name: Upload build package - name: "Upload build package"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "${{ env.ARTIFACT_NAME }}" name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/" path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 1 retention-days: 1

View File

@ -1,4 +1,4 @@
name: Build migrate_gse script (Windows) name: "Build migrate_gse script (Windows)"
on: on:
workflow_call: workflow_call:
@ -7,62 +7,62 @@ on:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
ARTIFACT_NAME: "migrate_gse-win-${{ github.sha }}" ARTIFACT_NAME: "migrate_gse-win-${{ github.sha }}"
SCRIPT_BASE_DIR: "tools/migrate_gse" SCRIPT_BASE_DIR: "tools/migrate_gse"
PACKAGE_BASE_DIR: "tools/migrate_gse/bin/win" PACKAGE_BASE_DIR: "tools/migrate_gse/bin/win"
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
build: build:
runs-on: windows-2022 runs-on: "windows-2022"
steps: steps:
- name: Set up Python 3.10 - name: "Set up Python 3.12"
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.12"
### on Windows Git will auto change line ending to CRLF, not preferable # on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
## extra helpers/tools, these are not built inside the deps build dir # extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party deps (build/win) - name: "Clone third-party deps (build/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/build/win' ref: "third-party/build/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win"
# env # env
- name: Install env - name: "Install env"
shell: cmd shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: recreate_venv_win.bat run: recreate_venv_win.bat
# build # build
- name: Rebuild - name: "Rebuild"
shell: cmd shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}" working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: rebuild_win.bat run: rebuild_win.bat
# upload artifact # upload artifact
- name: Upload build package - name: "Upload build package"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "${{ env.ARTIFACT_NAME }}" name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/" path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 1 retention-days: 1

View File

@ -1,22 +1,22 @@
name: Migrate GSE PR name: "Migrate GSE PR"
on: on:
pull_request: pull_request:
branches: [ "dev" ] branches: ["dev"]
paths: paths:
- '!**/*.md' - "!**/*.md"
- 'tools/migrate_gse/**' - "tools/migrate_gse/**"
permissions: permissions:
contents: write contents: "write"
jobs: jobs:
script-win: script-win:
name: Migrate GSE win name: "Migrate GSE win"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/migrate_gse-build-win.yml uses: "./.github/workflows/migrate_gse-build-win.yml"
script-linux: script-linux:
name: Migrate GSE linux name: "Migrate GSE linux"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/migrate_gse-build-linux.yml uses: "./.github/workflows/migrate_gse-build-linux.yml"

View File

@ -1,430 +1,411 @@
name: Prepare release name: "Prepare release"
on: on:
push: push:
tags: tags:
- release-* - "release-*"
workflow_dispatch: workflow_dispatch:
# allows manual trigger # allows manual trigger
permissions: permissions:
contents: write contents: "write"
env: env:
THIRD_PARTY_BASE_DIR: 'third-party' THIRD_PARTY_BASE_DIR: "third-party"
jobs: jobs:
emu-win-all: emu-win-all:
name: Emu win all name: "Emu win all"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-build-all-win.yml uses: "./.github/workflows/emu-build-all-win.yml"
emu-win-prep: emu-win-prep:
needs: [ emu-win-all ] needs: ["emu-win-all"]
runs-on: windows-2022 runs-on: "windows-2022"
steps: steps:
# on Windows Git will auto change line ending to CRLF, not preferable # on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
# we need branch because it has package scripts # we need branch because it has package scripts
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Clone third-party deps (deps/win) - name: "Clone third-party deps (deps/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/win' ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
## donwload artifacts # download artifacts
- name: Download emu build artifacts (Win) - name: "Download emu build artifacts (Win)"
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: build/win path: "build/win"
pattern: emu-win-*-${{ github.sha }} pattern: "emu-win-*-${{ github.sha }}"
merge-multiple: true merge-multiple: true
### print files # print files
- name: Print files - name: "Print files"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
dir /s /b /a:-d build\win dir /s /b /a:-d build\win
### remove linker files # package (release mode)
### - name: Remove linker files - name: "Package build (release)"
### shell: cmd shell: "cmd"
### working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
### run: |
### del /f /s /q build\win\*.exp,build\win\*.lib
### exit /b 0
### package (release mode)
- name: Package build (release)
shell: cmd
working-directory: ${{ github.workspace }}
run: package_win.bat vs2022\release run: package_win.bat vs2022\release
### package (debug mode) # package (debug mode)
- name: Package build (debug) - name: "Package build (debug)"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: package_win.bat vs2022\debug 1 run: package_win.bat vs2022\debug 1
### release (debug + release modes) if this is a tag push # release (debug + release modes) if this is a tag push
- name: Release - name: "Release"
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: "build/package/win/**/*" files: "build/package/win/**/*"
### upload artifacts/packages if this is a manual run # upload artifacts/packages if this is a manual run
- name: Upload release package - name: "Upload release package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-emu-win-release-${{ github.sha }}" name: "release-emu-win-release-${{ github.sha }}"
path: "build/package/win/vs2022/*release*" path: "build/package/win/vs2022/*release*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 0 compression-level: 0
retention-days: 7 retention-days: 7
- name: Upload debug package
- name: "Upload debug package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-emu-win-debug-${{ github.sha }}" name: "release-emu-win-debug-${{ github.sha }}"
path: "build/package/win/vs2022/*debug*" path: "build/package/win/vs2022/*debug*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 0 compression-level: 0
retention-days: 7 retention-days: 7
emu-linux-all: emu-linux-all:
name: Emu linux all name: "Emu linux all"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-build-all-linux.yml uses: "./.github/workflows/emu-build-all-linux.yml"
emu-linux-prep: emu-linux-prep:
needs: [ emu-linux-all ] needs: ["emu-linux-all"]
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
steps: steps:
# we need branch because it has package scripts # we need branch because it has package scripts
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Clone third-party deps (deps/linux) - name: "Clone third-party deps (deps/linux)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/linux' ref: "third-party/deps/linux"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/linux" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/linux"
## donwload artifacts # download artifacts
- name: Download emu build artifacts (linux) - name: "Download emu build artifacts (linux)"
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: build/linux path: "build/linux"
pattern: emu-linux-*-${{ github.sha }} pattern: "emu-linux-*-${{ github.sha }}"
merge-multiple: true merge-multiple: true
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" && sudo chmod 777 package_linux.sh run: sudo chmod -R 777 "${{ github.workspace }}" && sudo chmod 777 package_linux.sh
### print files # print files
- name: Print files - name: "Print files"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
ls -la build/linux/*/* ls -la build/linux/*/*
### downlaod ubuntu packages # downlaod ubuntu packages
- name: Download required Ubuntu packages - name: "Download required Ubuntu packages"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
sudo apt update || exit 1 sudo apt update || exit 1
sudo apt install tar -y || exit 1 sudo apt install tar -y || exit 1
### package (release mode) # package (release mode)
- name: Package build (release) - name: "Package build (release)"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: ./package_linux.sh gmake2/release run: ./package_linux.sh gmake2/release
### package (debug mode) # package (debug mode)
- name: Package build (debug) - name: "Package build (debug)"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: ./package_linux.sh gmake2/debug 1 run: ./package_linux.sh gmake2/debug 1
### release (debug + release modes) if this is a tag push # release (debug + release modes) if this is a tag push
- name: Release - name: "Release"
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: "build/package/linux/**/*" files: "build/package/linux/**/*"
### upload artifacts/packages if this is a manual run # upload artifacts/packages if this is a manual run
- name: Upload release package - name: "Upload release package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-emu-linux-release-${{ github.sha }}" name: "release-emu-linux-release-${{ github.sha }}"
path: "build/package/linux/gmake2/*release*" path: "build/package/linux/gmake2/*release*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 0 compression-level: 0
retention-days: 7 retention-days: 7
- name: Upload debug package
- name: "Upload debug package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-emu-linux-debug-${{ github.sha }}" name: "release-emu-linux-debug-${{ github.sha }}"
path: "build/package/linux/gmake2/*debug*" path: "build/package/linux/gmake2/*debug*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 0 compression-level: 0
retention-days: 7 retention-days: 7
gen_emu_script-win: gen_emu_script-win:
name: Gen emu config win name: "Gen emu config win"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/gen_emu_config-build-win.yml uses: "./.github/workflows/gen_emu_config-build-win.yml"
gen_emu_script-win-prep: gen_emu_script-win-prep:
needs: [ gen_emu_script-win ] needs: ["gen_emu_script-win"]
runs-on: windows-2022 runs-on: "windows-2022"
steps: steps:
# on Windows Git will auto change line ending to CRLF, not preferable # on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
# we need branch because it has package scripts # we need branch because it has package scripts
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Clone third-party deps (deps/win) - name: "Clone third-party deps (deps/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/win' ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
## donwload artifacts # download artifacts
- name: Download script build artifacts (Win) - name: "Download script build artifacts (Win)"
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: tools/generate_emu_config/bin/win path: "tools/generate_emu_config/bin/win"
pattern: generate_emu_config-win-* pattern: "generate_emu_config-win-*"
merge-multiple: true merge-multiple: true
### package # package
- name: Package script - name: "Package script"
shell: cmd shell: "cmd"
working-directory: "tools/generate_emu_config" working-directory: "tools/generate_emu_config"
run: package_win.bat run: package_win.bat
# release tag # release tag
- name: Release - name: "Release"
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: "tools/generate_emu_config/bin/package/win/**/*" files: "tools/generate_emu_config/bin/package/win/**/*"
### upload artifact/package if this is a manual run # upload artifact/package if this is a manual run
- name: Upload release package - name: "Upload release package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-generate_emu_config-win-${{ github.sha }}" name: "release-generate_emu_config-win-${{ github.sha }}"
path: "tools/generate_emu_config/bin/package/win/**/*" path: "tools/generate_emu_config/bin/package/win/**/*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 7 retention-days: 7
gen_emu_script-linux: gen_emu_script-linux:
name: Gen emu config linux name: "Gen emu config linux"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/gen_emu_config-build-linux.yml uses: "./.github/workflows/gen_emu_config-build-linux.yml"
gen_emu_script-linux-prep: gen_emu_script-linux-prep:
needs: [ gen_emu_script-linux ] needs: ["gen_emu_script-linux"]
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
steps: steps:
# we need branch because it has package scripts # we need branch because it has package scripts
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
## donwload artifacts # download artifacts
- name: Download script build artifacts (linux) - name: "Download script build artifacts (linux)"
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: tools/generate_emu_config/bin/linux path: "tools/generate_emu_config/bin/linux"
pattern: generate_emu_config-linux-* pattern: "generate_emu_config-linux-*"
merge-multiple: true merge-multiple: true
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" run: sudo chmod -R 777 "${{ github.workspace }}"
### package # package
- name: Package script - name: "Package script"
shell: bash shell: "bash"
working-directory: "tools/generate_emu_config" working-directory: "tools/generate_emu_config"
run: sudo chmod 777 package_linux.sh && sudo ./package_linux.sh run: sudo chmod 777 package_linux.sh && sudo ./package_linux.sh
# release tag # release tag
- name: Release - name: "Release"
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: "tools/generate_emu_config/bin/package/linux/**/*" files: "tools/generate_emu_config/bin/package/linux/**/*"
### upload artifact/package if this is a manual run # upload artifact/package if this is a manual run
- name: Upload release package - name: "Upload release package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-generate_emu_config-linux-${{ github.sha }}" name: "release-generate_emu_config-linux-${{ github.sha }}"
path: "tools/generate_emu_config/bin/package/linux/**/*" path: "tools/generate_emu_config/bin/package/linux/**/*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 7 retention-days: 7
migrate_gse_script-win: migrate_gse_script-win:
name: Migrate GSE win name: "Migrate GSE win"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/migrate_gse-build-win.yml uses: "./.github/workflows/migrate_gse-build-win.yml"
migrate_gse_script-win-prep: migrate_gse_script-win-prep:
needs: [ migrate_gse_script-win ] needs: ["migrate_gse_script-win"]
runs-on: windows-2022 runs-on: "windows-2022"
steps: steps:
# on Windows Git will auto change line ending to CRLF, not preferable # on Windows Git will auto change line ending to CRLF, not preferable
- name: Ensure LF line ending - name: "Ensure LF line ending"
shell: cmd shell: "cmd"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: | run: |
git config --local core.autocrlf false git config --local core.autocrlf false
git config --system core.autocrlf false git config --system core.autocrlf false
git config --global core.autocrlf false git config --global core.autocrlf false
# we need branch because it has package scripts # we need branch because it has package scripts
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Clone third-party deps (deps/win) - name: "Clone third-party deps (deps/win)"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: 'third-party/deps/win' ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win" path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
## donwload artifacts # download artifacts
- name: Download script build artifacts (Win) - name: "Download script build artifacts (Win)"
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: tools/migrate_gse/bin/win path: "tools/migrate_gse/bin/win"
pattern: migrate_gse-win-* pattern: "migrate_gse-win-*"
merge-multiple: true merge-multiple: true
### package # package
- name: Package script - name: "Package script"
shell: cmd shell: "cmd"
working-directory: "tools/migrate_gse" working-directory: "tools/migrate_gse"
run: package_win.bat run: package_win.bat
# release tag # release tag
- name: Release - name: "Release"
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: "tools/migrate_gse/bin/package/win/**/*" files: "tools/migrate_gse/bin/package/win/**/*"
### upload artifact/package if this is a manual run # upload artifact/package if this is a manual run
- name: Upload release package - name: "Upload release package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-migrate_gse-win-${{ github.sha }}" name: "release-migrate_gse-win-${{ github.sha }}"
path: "tools/migrate_gse/bin/package/win/**/*" path: "tools/migrate_gse/bin/package/win/**/*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 7 retention-days: 7
migrate_gse_script-linux: migrate_gse_script-linux:
name: Migrate GSE linux name: Migrate GSE linux
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: ./.github/workflows/migrate_gse-build-linux.yml uses: "./.github/workflows/migrate_gse-build-linux.yml"
migrate_gse_script-linux-prep: migrate_gse_script-linux-prep:
needs: [ migrate_gse_script-linux ] needs: ["migrate_gse_script-linux"]
runs-on: ubuntu-24.04 runs-on: "ubuntu-24.04"
steps: steps:
# we need branch because it has package scripts # we need branch because it has package scripts
- name: Checkout branch - name: "Checkout branch"
uses: actions/checkout@v4 uses: actions/checkout@v4
## donwload artifacts # download artifacts
- name: Download script build artifacts (linux) - name: "Download script build artifacts (linux)"
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: tools/migrate_gse/bin/linux path: "tools/migrate_gse/bin/linux"
pattern: migrate_gse-linux-* pattern: "migrate_gse-linux-*"
merge-multiple: true merge-multiple: true
### fix folder permissions! not sure why this fails # fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems # nested subdirs "build/linux/release" cause permission problems
- name: Give all permissions to repo folder - name: "Give all permissions to repo folder"
shell: bash shell: "bash"
working-directory: ${{ github.workspace }} working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}" run: sudo chmod -R 777 "${{ github.workspace }}"
### package # package
- name: Package script - name: "Package script"
shell: bash shell: "bash"
working-directory: "tools/migrate_gse" working-directory: "tools/migrate_gse"
run: sudo chmod 777 package_linux.sh && sudo ./package_linux.sh run: sudo chmod 777 package_linux.sh && sudo ./package_linux.sh
# release tag # release tag
- name: Release - name: "Release"
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v2
with: with:
files: "tools/migrate_gse/bin/package/linux/**/*" files: "tools/migrate_gse/bin/package/linux/**/*"
### upload artifact/package if this is a manual run # upload artifact/package if this is a manual run
- name: Upload release package - name: "Upload release package"
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "release-migrate_gse-linux-${{ github.sha }}" name: "release-migrate_gse-linux-${{ github.sha }}"
path: "tools/migrate_gse/bin/package/linux/**/*" path: "tools/migrate_gse/bin/package/linux/**/*"
if-no-files-found: 'error' if-no-files-found: "error"
compression-level: 9 compression-level: 9
retention-days: 7 retention-days: 7

34
.gitignore vendored
View File

@ -1,30 +1,32 @@
/.vs/ # IDE
/.vscode/ **/.vs
**/.vscode
/build/ # PYTHON
**/.venv
**/__pycache__
/proto_gen/ # PROTOBUF
/proto_gen
/crash_printer/tests/crash_test/ # SPECIFIC
/resources/win/file_dos_stub/build/ /build
/third-party
# TOOLS
# generate_emu_config
/tools/generate_emu_config/.py*/ /tools/generate_emu_config/.py*/
/tools/generate_emu_config/.venv*/
/tools/generate_emu_config/.env*/ /tools/generate_emu_config/.env*/
/tools/generate_emu_config/.vscode/ /tools/generate_emu_config/bin
/tools/generate_emu_config/backup/ /tools/generate_emu_config/backup/
/tools/generate_emu_config/bin/
/tools/generate_emu_config/login_temp/ /tools/generate_emu_config/login_temp/
/tools/generate_emu_config/output/ /tools/generate_emu_config/output/
/tools/generate_emu_config/**/__pycache__/
/tools/generate_emu_config/**/my_login.txt /tools/generate_emu_config/**/my_login.txt
/tools/generate_emu_config/top_owners_ids.txt /tools/generate_emu_config/top_owners_ids.txt
# migrate_gse
/tools/migrate_gse/.py*/ /tools/migrate_gse/.py*/
/tools/migrate_gse/.venv*/
/tools/migrate_gse/.env*/ /tools/migrate_gse/.env*/
/tools/migrate_gse/.vscode/ /tools/migrate_gse/bin
/tools/migrate_gse/bin/
/tools/migrate_gse/**/__pycache__/
/third-party/

1
.gitmodules vendored
View File

@ -1,4 +1,3 @@
[submodule "third-party/build/win"] [submodule "third-party/build/win"]
path = third-party/build/win path = third-party/build/win
url = ./ url = ./

View File

@ -24,6 +24,7 @@
- [libs\stb](#libsstb) - [libs\stb](#libsstb)
- [libs\utfcpp](#libsutfcpp) - [libs\utfcpp](#libsutfcpp)
- [tools\steamclient_loader](#toolssteamclient_loader) - [tools\steamclient_loader](#toolssteamclient_loader)
- [sdk](#sdk)
### third-party\build\win\cert\openssl ### third-party\build\win\cert\openssl
@ -2548,3 +2549,9 @@ https://github.com/Rat431/ColdAPI_Steam
Original version of ColdClientLoader by Rat431. Original version of ColdClientLoader by Rat431.
### sdk
#### INFO
https://partner.steamgames.com/doc/sdk

View File

@ -21,7 +21,7 @@ set /a "BUILD_DEPS=0"
) else if "%~1" equ "--help" ( ) else if "%~1" equ "--help" (
goto :help_page goto :help_page
) else ( ) else (
1>&2 echo: invalid arg %~1 1>&2 echo:invalid arg %~1
goto :end_script_with_err goto :end_script_with_err
) )
@ -32,15 +32,14 @@ set /a "BUILD_DEPS=0"
:: check premake :: check premake
set "PREMAKE_EXE=third-party\common\win\premake\premake5.exe" set "PREMAKE_EXE=third-party\common\win\premake\premake5.exe"
if not exist "%PREMAKE_EXE%" ( if not exist "%PREMAKE_EXE%" (
1>&2 echo: premake wasn't found 1>&2 echo:premake wasn't found
goto :end_script_with_err goto :end_script_with_err
) )
:: build deps :: build deps
if %BUILD_DEPS% equ 1 ( if %BUILD_DEPS% equ 1 (
set "CMAKE_GENERATOR=Visual Studio 17 2022" set "CMAKE_GENERATOR=Visual Studio 17 2022"
call "%PREMAKE_EXE%" --file="premake5-deps.lua" --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=windows vs2022 call "%PREMAKE_EXE%" --file="premake5-deps.lua" --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=windows vs2022 || (
if !errorlevel! neq 0 (
goto :end_script_with_err goto :end_script_with_err
) )
goto :end_script goto :end_script
@ -49,7 +48,7 @@ set /a "BUILD_DEPS=0"
:: check vswhere :: check vswhere
set "VSWHERE_EXE=third-party\common\win\vswhere\vswhere.exe" set "VSWHERE_EXE=third-party\common\win\vswhere\vswhere.exe"
if not exist "%VSWHERE_EXE%" ( if not exist "%VSWHERE_EXE%" (
1>&2 echo: vswhere wasn't found 1>&2 echo:vswhere wasn't found
goto :end_script_with_err goto :end_script_with_err
) )
@ -59,20 +58,19 @@ set /a "BUILD_DEPS=0"
set "MSBUILD_EXE=%%~A\MSBuild\Current\Bin\MSBuild.exe" set "MSBUILD_EXE=%%~A\MSBuild\Current\Bin\MSBuild.exe"
) )
if not exist "%MSBUILD_EXE%" ( if not exist "%MSBUILD_EXE%" (
1>&2 echo: MSBuild wasn't found 1>&2 echo:MSBuild wasn't found
goto :end_script_with_err goto :end_script_with_err
) )
:: create .sln :: create .sln
call "%PREMAKE_EXE%" --file="premake5.lua" --genproto --dosstub --winrsrc --winsign --os=windows vs2022 call "%PREMAKE_EXE%" --file="premake5.lua" --genproto --dosstub --winrsrc --winsign --os=windows vs2022 || (
if %errorlevel% neq 0 (
goto :end_script_with_err goto :end_script_with_err
) )
:: check .sln :: check .sln
set "SLN_FILE=build\project\vs2022\win\gbe.sln" set "SLN_FILE=build\project\vs2022\win\gbe.sln"
if not exist "%SLN_FILE%" ( if not exist "%SLN_FILE%" (
1>&2 echo: .sln file wasn't found 1>&2 echo:.sln file wasn't found
goto :end_script_with_err goto :end_script_with_err
) )
@ -87,9 +85,8 @@ set /a "BUILD_DEPS=0"
set "BUILD_PLATFORM=%%B" set "BUILD_PLATFORM=%%B"
for %%C in (%BUILD_TARGETS%) do ( for %%C in (%BUILD_TARGETS%) do (
set "BUILD_TARGET=%%C" set "BUILD_TARGET=%%C"
echo. & echo: building !BUILD_TARGET! !BUILD_TYPE! !BUILD_PLATFORM! echo. & echo:building !BUILD_TARGET! !BUILD_TYPE! !BUILD_PLATFORM!
call "%MSBUILD_EXE%" /nologo -m:%MAX_THREADS% -v:n /p:Configuration=!BUILD_TYPE!,Platform=!BUILD_PLATFORM! /target:!BUILD_TARGET! "%SLN_FILE%" call "%MSBUILD_EXE%" /nologo -m:%MAX_THREADS% -v:n /p:Configuration=!BUILD_TYPE!,Platform=!BUILD_PLATFORM! /target:!BUILD_TARGET! "%SLN_FILE%" || (
if !errorlevel! neq 0 (
goto :end_script_with_err goto :end_script_with_err
) )
) )
@ -98,20 +95,18 @@ set /a "BUILD_DEPS=0"
goto :end_script goto :end_script
:: exit without error
:end_script :end_script
endlocal endlocal
exit /b 0 exit /b 0
:: exit with error
:end_script_with_err :end_script_with_err
endlocal endlocal
exit /b 1 exit /b 1
:: show help page :: show help page
:help_page :help_page
echo: "%~nx0" [switches] echo:"%~nx0" [switches]
echo: switches: echo:switches:
echo: --deps: rebuild third-party dependencies echo: --deps: rebuild third-party dependencies
echo: --help: show this page echo: --help: show this page
goto :end_script goto :end_script

View File

@ -2,13 +2,14 @@
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
cd /d "%~dp0" cd /d "%~dp0"
set "CREDITS_FILE=CREDITS.md" set "ROOT=%cd%"
set "CREDITS_FILE=%ROOT%\CREDITS.md"
if exist "%CREDITS_FILE%" ( if exist "%CREDITS_FILE%" (
del /f /s /q "%CREDITS_FILE%" del /f /q "%CREDITS_FILE%"
) )
set "GLOB=third-party libs tools\steamclient_loader" set "GLOB=third-party libs tools\steamclient_loader sdk"
set "FILTER=SOURCE.txt" set "FILTER=SOURCE.txt"
echo:# Many thanks for these sources>> "%CREDITS_FILE%" echo:# Many thanks for these sources>> "%CREDITS_FILE%"

View File

@ -11,17 +11,18 @@ if defined NUMBER_OF_PROCESSORS (
) )
) )
set "BUILD_DIR=build\win" set "ROOT=%cd%"
set "OUT_DIR=build\package\win" set "BUILD_DIR=%ROOT%\build\win"
set "OUT_DIR=%ROOT%\build\package\win"
if "%~1" equ "" ( if "%~1" equ "" (
1>&2 echo: missing build target folder arg 1>&2 echo:missing build target folder arg
goto :end_script_with_err goto :end_script_with_err
) )
set "TARGET_DIR=%BUILD_DIR%\%~1" set "TARGET_DIR=%BUILD_DIR%\%~1"
if not exist "%TARGET_DIR%\" ( if not exist "%TARGET_DIR%\" (
1>&2 echo: build target folder wasn't found 1>&2 echo:build target folder wasn't found
goto :end_script_with_err goto :end_script_with_err
) )
@ -34,39 +35,39 @@ set /a "PKG_EXE_MEM_PERCENT=90"
set /a "PKG_EXE_DICT_SIZE_MB=384" set /a "PKG_EXE_DICT_SIZE_MB=384"
set "PKG_EXE=third-party\deps\win\7za\7za.exe" set "PKG_EXE=third-party\deps\win\7za\7za.exe"
if not exist "%PKG_EXE%" ( if not exist "%PKG_EXE%" (
1>&2 echo: packager wasn't found 1>&2 echo:packager wasn't found
goto :end_script_with_err goto :end_script_with_err
) )
:::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
echo: // copying readmes + example files echo:// copying readmes + example files
xcopy /y /s /e /r "post_build\steam_settings.EXAMPLE\" "%TARGET_DIR%\steam_settings.EXAMPLE\" xcopy /y /s /e /r "%ROOT%\post_build\steam_settings.EXAMPLE\" "%TARGET_DIR%\steam_settings.EXAMPLE\"
copy /y "post_build\README.release.md" "%TARGET_DIR%\" copy /y "%ROOT%\post_build\README.release.md" "%TARGET_DIR%\"
copy /y "CHANGELOG.md" "%TARGET_DIR%\" copy /y "%ROOT%\CHANGELOG.md" "%TARGET_DIR%\"
copy /y "CREDITS.md" "%TARGET_DIR%\" copy /y "%ROOT%\CREDITS.md" "%TARGET_DIR%\"
if %BUILD_DEBUG% equ 1 ( if %BUILD_DEBUG% equ 1 (
copy /y "post_build\README.debug.md" "%TARGET_DIR%\" copy /y "%ROOT%\post_build\README.debug.md" "%TARGET_DIR%\"
) )
if exist "%TARGET_DIR%\experimental\" ( if exist "%TARGET_DIR%\experimental\" (
copy /y "post_build\README.experimental.md" "%TARGET_DIR%\experimental\" copy /y "%ROOT%\post_build\README.experimental.md" "%TARGET_DIR%\experimental\"
) )
if exist "%TARGET_DIR%\steamclient_experimental\" ( if exist "%TARGET_DIR%\steamclient_experimental\" (
xcopy /y /s /e /r "post_build\win\ColdClientLoader.EXAMPLE\" "%TARGET_DIR%\steamclient_experimental\dll_injection.EXAMPLE\" xcopy /y /s /e /r "%ROOT%\post_build\win\ColdClientLoader.EXAMPLE\" "%TARGET_DIR%\steamclient_experimental\dll_injection.EXAMPLE\"
copy /y "post_build\README.experimental_steamclient.md" "%TARGET_DIR%\steamclient_experimental\" copy /y "%ROOT%\post_build\README.experimental_steamclient.md" "%TARGET_DIR%\steamclient_experimental\"
copy /y "tools\steamclient_loader\win\ColdClientLoader.ini" "%TARGET_DIR%\steamclient_experimental\" copy /y "%ROOT%\tools\steamclient_loader\win\ColdClientLoader.ini" "%TARGET_DIR%\steamclient_experimental\"
) )
if exist "%TARGET_DIR%\tools\generate_interfaces\" ( if exist "%TARGET_DIR%\tools\generate_interfaces\" (
copy /y "post_build\README.generate_interfaces.md" "%TARGET_DIR%\tools\generate_interfaces\" copy /y "%ROOT%\post_build\README.generate_interfaces.md" "%TARGET_DIR%\tools\generate_interfaces\"
) )
if exist "%TARGET_DIR%\tools\lobby_connect\" ( if exist "%TARGET_DIR%\tools\lobby_connect\" (
copy /y "post_build\README.lobby_connect.md" "%TARGET_DIR%\tools\lobby_connect\" copy /y "%ROOT%\post_build\README.lobby_connect.md" "%TARGET_DIR%\tools\lobby_connect\"
) )
:::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
@ -85,22 +86,19 @@ for %%A in ("%ACHIVE_DIR%") do (
) )
if exist "%ACHIVE_FILE%" ( if exist "%ACHIVE_FILE%" (
del /f /s /q "%ACHIVE_FILE%" del /f /q "%ACHIVE_FILE%"
) )
call "%PKG_EXE%" a "%ACHIVE_FILE%" ".\%TARGET_DIR%" -t7z -xr^^!*.lib -xr^^!*.exp -slp -ssw -mx -myx -mmemuse=p%PKG_EXE_MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%PKG_EXE_DICT_SIZE_MB%m -mmt=%MAX_THREADS% -mmtf+ -mtm- -mtc- -mta- -mtr+ call "%PKG_EXE%" a "%ACHIVE_FILE%" "%TARGET_DIR%" -t7z -xr^^!*.lib -xr^^!*.exp -slp -ssw -mx -myx -mmemuse=p%PKG_EXE_MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%PKG_EXE_DICT_SIZE_MB%m -mmt=%MAX_THREADS% -mmtf+ -mtm- -mtc- -mta- -mtr+ || (
if %errorlevel% neq 0 (
goto :end_script_with_err goto :end_script_with_err
) )
goto :end_script goto :end_script
:: exit without error
:end_script :end_script
endlocal endlocal
exit /b 0 exit /b 0
:: exit with error
:end_script_with_err :end_script_with_err
endlocal endlocal
exit /b 1 exit /b 1

View File

@ -1,6 +1,6 @@
================================================================ ================================================================
Copyright © 1996-2022, Valve Corporation, All rights reserved. Copyright © 1996-2024, Valve Corporation, All rights reserved.
================================================================ ================================================================
@ -8,6 +8,26 @@ Copyright © 1996-2022, Valve Corporation, All rights reserved.
Welcome to the Steamworks SDK. For documentation please see our partner Welcome to the Steamworks SDK. For documentation please see our partner
website at: http://partner.steamgames.com website at: http://partner.steamgames.com
----------------------------------------------------------------
v1.60 19th June 2024
----------------------------------------------------------------
General
* CSteamAPIContext has been removed. Please switch to using the Steam<interface> accessors where appropriate.
ISteamTimeline
* Added this new interface to allow games to provide information that supports the new Game Recording feature. See the [url=https://partner.steamgames.com/doc/features/timeline]Timeline[/url] documentation for more information.
ISteamUGC
* Added 64 bit m_ulTotalFilesSize to SteamUGCDetails_t which is the correct size of the content for Workshop items are larger than 2,147,483,647 bytes.
* Added GetNumSupportedGameVersions() and GetSupportedGameVersionData() which can be used to determine what game beta branches a Workshop item supports/is valid for.
* Added SetAdminQuery() to allow ISteamUGC to be used in a tools like environment for users who have the appropriate privileges for the calling appid.
ISteamApps
* Added API to allow the game to manage active beta branches.
---------------------------------------------------------------- ----------------------------------------------------------------
v1.59 9th February 2024 v1.59 9th February 2024
---------------------------------------------------------------- ----------------------------------------------------------------

View File

@ -1 +1,3 @@
#### INFO
https://partner.steamgames.com/doc/sdk https://partner.steamgames.com/doc/sdk

View File

@ -1,48 +1,52 @@
@echo off @echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal set /a "MAX_THREADS=2"
pushd "%~dp0"
set /a last_code=0
set "build_dir=bin\win"
set "out_dir=bin\package\win"
set /a MEM_PERCENT=90
set /a DICT_SIZE_MB=384
set "packager=..\..\third-party\deps\win\7za\7za.exe"
:: use 70%
if defined NUMBER_OF_PROCESSORS ( if defined NUMBER_OF_PROCESSORS (
set /a THREAD_COUNT=NUMBER_OF_PROCESSORS*70/100 :: use 70%
) else ( set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
set /a THREAD_COUNT=2 if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
) )
if not exist "%packager%" ( set "ROOT=%cd%"
1>&2 echo "[X] packager app wasn't found" set "BUILD_DIR=%ROOT%\bin\win"
set /a last_code=1 set "OUT_DIR=%ROOT%\bin\package\win"
goto :script_end
set /a "PKG_EXE_MEM_PERCENT=90"
set /a "PKG_EXE_DICT_SIZE_MB=384"
set "PKG_EXE=..\..\third-party\deps\win\7za\7za.exe"
if not exist "%PKG_EXE%" (
1>&2 echo:packager wasn't found
goto :end_script_with_err
) )
if not exist "%build_dir%" ( if not exist "%BUILD_DIR%" (
1>&2 echo "[X] build folder wasn't found" 1>&2 echo:build folder wasn't found
set /a last_code=1 goto :end_script_with_err
goto :script_end
) )
mkdir "%out_dir%" if not exist "%OUT_DIR%" (
mkdir "%OUT_DIR%"
set "archive_file=%out_dir%\generate_emu_config-win.7z"
if exist "%archive_file%" (
del /f /q "%archive_file%"
) )
"%packager%" a "%archive_file%" ".\%build_dir%\*" -t7z -slp -ssw -mx -myx -mmemuse=p%MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%DICT_SIZE_MB%m -mmt=%THREAD_COUNT% -mmtf+ -mtm- -mtc- -mta- -mtr+ set "ACHIVE_FILE=%OUT_DIR%\generate_emu_config-win.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
:script_end
popd
endlocal & (
exit /b %last_code%
) )
call "%PKG_EXE%" a "%ACHIVE_FILE%" "%BUILD_DIR%\*" -t7z -slp -ssw -mx -myx -mmemuse=p%PKG_EXE_MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%PKG_EXE_DICT_SIZE_MB%m -mmt=%MAX_THREADS% -mmtf+ -mtm- -mtc- -mta- -mtr+ || (
goto :end_script_with_err
)
goto :end_script
:end_script
endlocal
exit /b 0
:end_script_with_err
endlocal
exit /b 1

View File

@ -1,74 +1,71 @@
@echo off @echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal set "ROOT=%cd%"
pushd "%~dp0" set "VENV=%ROOT%\.env-win"
set "OUT_DIR=%ROOT%\bin\win"
set "BUILD_TEMP_DIR=%ROOT%\bin\tmp\win"
set "ICON_FILE=%ROOT%\icon\Froyoshark-Enkel-Steam.ico"
set "venv=.env-win" set /a "LAST_ERR_CODE=0"
set "out_dir=bin\win"
set "build_temp_dir=bin\tmp\win"
:: relative to build_temp_dir
set "icon_file=..\..\..\icon\Froyoshark-Enkel-Steam.ico"
set "signer_tool=..\..\third-party\build\win\cert\sign_helper.bat"
set /a last_code=0 set "SIGNER_TOOL=..\..\third-party\build\win\cert\sign_helper.bat"
if not exist "%SIGNER_TOOL%" (
if not exist "%signer_tool%" ( 1>&2 echo:signing tool wasn't found
1>&2 echo "[X] signing tool wasn't found" set /a "LAST_ERR_CODE=1"
set /a last_code=1 goto :end_script
goto :script_end
) )
if exist "%out_dir%" ( if exist "%OUT_DIR%" (
rmdir /s /q "%out_dir%" rmdir /s /q "%OUT_DIR%"
) )
mkdir "%out_dir%" mkdir "%OUT_DIR%"
if exist "%build_temp_dir%" ( if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%build_temp_dir%" rmdir /s /q "%BUILD_TEMP_DIR%"
) )
del /f /q "*.spec" call "%VENV%\Scripts\activate.bat"
call "%venv%\Scripts\activate.bat" echo:building generate_emu_config...
pyinstaller "generate_emu_config.py" --distpath "%OUT_DIR%" -y --clean --onedir --name "generate_emu_config" --noupx --console -i "%ICON_FILE%" --collect-submodules "steam" --workpath "%BUILD_TEMP_DIR%" --specpath "%BUILD_TEMP_DIR%" || (
echo building generate_emu_config... set /a "LAST_ERR_CODE=1"
pyinstaller "generate_emu_config.py" --distpath "%out_dir%" -y --clean --onedir --name "generate_emu_config" --noupx --console -i "%icon_file%" --collect-submodules "steam" --workpath "%build_temp_dir%" --specpath "%build_temp_dir%" || ( goto :end_script
set /a last_code=1
goto :script_end
) )
call "%signer_tool%" "%out_dir%\generate_emu_config\generate_emu_config.exe" call "%SIGNER_TOOL%" "%OUT_DIR%\generate_emu_config\generate_emu_config.exe"
echo building parse_controller_vdf... echo:building parse_controller_vdf...
pyinstaller "controller_config_generator\parse_controller_vdf.py" --distpath "%out_dir%" -y --clean --onedir --name "parse_controller_vdf" --noupx --console -i "NONE" --workpath "%build_temp_dir%" --specpath "%build_temp_dir%" || ( pyinstaller "controller_config_generator\parse_controller_vdf.py" --distpath "%OUT_DIR%" -y --clean --onedir --name "parse_controller_vdf" --noupx --console -i "NONE" --workpath "%BUILD_TEMP_DIR%" --specpath "%BUILD_TEMP_DIR%" || (
set /a last_code=1 set /a "LAST_ERR_CODE=1"
goto :script_end goto :end_script
) )
call "%signer_tool%" "%out_dir%\parse_controller_vdf\parse_controller_vdf.exe" call "%SIGNER_TOOL%" "%OUT_DIR%\parse_controller_vdf\parse_controller_vdf.exe"
echo building parse_achievements_schema... echo:building parse_achievements_schema...
pyinstaller "stats_schema_achievement_gen\achievements_gen.py" --distpath "%out_dir%" -y --clean --onedir --name "parse_achievements_schema" --noupx --console -i "NONE" --workpath "%build_temp_dir%" --specpath "%build_temp_dir%" || ( pyinstaller "stats_schema_achievement_gen\achievements_gen.py" --distpath "%OUT_DIR%" -y --clean --onedir --name "parse_achievements_schema" --noupx --console -i "NONE" --workpath "%BUILD_TEMP_DIR%" --specpath "%BUILD_TEMP_DIR%" || (
set /a last_code=1 set /a "LAST_ERR_CODE=1"
goto :script_end goto :end_script
) )
call "%signer_tool%" "%out_dir%\parse_achievements_schema\parse_achievements_schema.exe" call "%SIGNER_TOOL%" "%OUT_DIR%\parse_achievements_schema\parse_achievements_schema.exe"
copy /y "steam_default_icon_locked.jpg" "%out_dir%\generate_emu_config\" copy /y "steam_default_icon_locked.jpg" "%OUT_DIR%\generate_emu_config\"
copy /y "steam_default_icon_unlocked.jpg" "%out_dir%\generate_emu_config\" copy /y "steam_default_icon_unlocked.jpg" "%OUT_DIR%\generate_emu_config\"
copy /y "README.md" "%out_dir%\generate_emu_config\" copy /y "README.md" "%OUT_DIR%\generate_emu_config\"
1>"%out_dir%\generate_emu_config\my_login.EXAMPLE.txt" echo Check the README echo Check the README>> "%OUT_DIR%\generate_emu_config\my_login.EXAMPLE.txt"
1>"%out_dir%\generate_emu_config\top_owners_ids.EXAMPLE.txt" echo Check the README echo Check the README>> "%OUT_DIR%\generate_emu_config\top_owners_ids.EXAMPLE.txt"
1>>"%out_dir%\generate_emu_config\top_owners_ids.EXAMPLE.txt" echo You can use a website like: https://steamladder.com/games/ echo You can use a website like: https://steamladder.com/games/>> "%OUT_DIR%\generate_emu_config\top_owners_ids.EXAMPLE.txt"
echo: echo:
echo ============= echo:=============
echo Built inside: "%out_dir%\" echo:Built inside: "%OUT_DIR%\"
goto :end_script
:script_end :end_script
if exist "%build_temp_dir%" ( if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%build_temp_dir%" rmdir /s /q "%BUILD_TEMP_DIR%"
) )
popd
endlocal & ( endlocal
exit /b %last_code% exit /b %LAST_ERR_CODE%
)

View File

@ -1,19 +1,29 @@
@echo off @echo off
cd /d "%~dp0" cd /d "%~dp0"
set "venv=.env-win" set "ROOT=%cd%"
set "reqs_file=requirements.txt" set "VENV=%ROOT%\.env-win"
set "REQS_FILE=%ROOT%\requirements.txt"
if exist "%venv%" ( set /a "LAST_ERR_CODE=0"
rmdir /s /q "%venv%"
if exist "%VENV%" (
rmdir /s /q "%VENV%"
) )
python -m venv "%venv%" || exit /b 1 python -m venv "%VENV%" || (
timeout /t 1 /nobreak set /a "LAST_ERR_CODE=1"
call "%venv%\Scripts\activate.bat" goto :end_script
pip install -r "%reqs_file%" )
set /a exit_code=errorlevel
call "%venv%\Scripts\deactivate.bat" timeout /t 1 /nobreak
exit /b %exit_code%
call "%VENV%\Scripts\activate.bat"
pip install -r "%REQS_FILE%"
set /a "LAST_ERR_CODE=%ERRORLEVEL%"
call "%VENV%\Scripts\deactivate.bat"
goto :end_script
:end_script
exit /b %LAST_ERR_CODE%

View File

@ -1,48 +1,52 @@
@echo off @echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal set /a "MAX_THREADS=2"
pushd "%~dp0"
set /a last_code=0
set "build_dir=bin\win"
set "out_dir=bin\package\win"
set /a MEM_PERCENT=90
set /a DICT_SIZE_MB=384
set "packager=..\..\third-party\deps\win\7za\7za.exe"
:: use 70%
if defined NUMBER_OF_PROCESSORS ( if defined NUMBER_OF_PROCESSORS (
set /a THREAD_COUNT=NUMBER_OF_PROCESSORS*70/100 :: use 70%
) else ( set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
set /a THREAD_COUNT=2 if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
) )
if not exist "%packager%" ( set "ROOT=%cd%"
1>&2 echo "[X] packager app wasn't found" set "BUILD_DIR=%ROOT%\bin\win"
set /a last_code=1 set "OUT_DIR=%ROOT%\bin\package\win"
goto :script_end
set /a "PKG_EXE_MEM_PERCENT=90"
set /a "PKG_EXE_DICT_SIZE_MB=384"
set "PKG_EXE=..\..\third-party\deps\win\7za\7za.exe"
if not exist "%PKG_EXE%" (
1>&2 echo:packager wasn't found
goto :end_script_with_err
) )
if not exist "%build_dir%" ( if not exist "%BUILD_DIR%" (
1>&2 echo "[X] build folder wasn't found" 1>&2 echo:build folder wasn't found
set /a last_code=1 goto :end_script_with_err
goto :script_end
) )
mkdir "%out_dir%" if not exist "%OUT_DIR%" (
mkdir "%OUT_DIR%"
set "archive_file=%out_dir%\migrate_gse-win.7z"
if exist "%archive_file%" (
del /f /q "%archive_file%"
) )
"%packager%" a "%archive_file%" ".\%build_dir%\*" -t7z -slp -ssw -mx -myx -mmemuse=p%MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%DICT_SIZE_MB%m -mmt=%THREAD_COUNT% -mmtf+ -mtm- -mtc- -mta- -mtr+ set "ACHIVE_FILE=%OUT_DIR%\migrate_gse-win.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
:script_end
popd
endlocal & (
exit /b %last_code%
) )
call "%PKG_EXE%" a "%ACHIVE_FILE%" "%BUILD_DIR%\*" -t7z -slp -ssw -mx -myx -mmemuse=p%PKG_EXE_MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%PKG_EXE_DICT_SIZE_MB%m -mmt=%MAX_THREADS% -mmtf+ -mtm- -mtc- -mta- -mtr+ || (
goto :end_script_with_err
)
goto :end_script
:end_script
endlocal
exit /b 0
:end_script_with_err
endlocal
exit /b 1

View File

@ -1,53 +1,51 @@
@echo off @echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal set "ROOT=%cd%"
pushd "%~dp0" set "VENV=%ROOT%\.env-win"
set "OUT_DIR=%ROOT%\bin\win"
set "BUILD_TEMP_DIR=%ROOT%\bin\tmp\win"
set "venv=.env-win" set /a "LAST_ERR_CODE=0"
set "out_dir=bin\win"
set "build_temp_dir=bin\tmp\win"
set "signer_tool=..\..\third-party\build\win\cert\sign_helper.bat"
set /a last_code=0 set "SIGNER_TOOL=..\..\third-party\build\win\cert\sign_helper.bat"
if not exist "%SIGNER_TOOL%" (
if not exist "%signer_tool%" ( 1>&2 echo:signing tool wasn't found
1>&2 echo "[X] signing tool wasn't found" set /a "LAST_ERR_CODE=1"
set /a last_code=1 goto :end_script
goto :script_end
) )
if exist "%out_dir%" ( if exist "%OUT_DIR%" (
rmdir /s /q "%out_dir%" rmdir /s /q "%OUT_DIR%"
) )
mkdir "%out_dir%" mkdir "%OUT_DIR%"
if exist "%build_temp_dir%" ( if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%build_temp_dir%" rmdir /s /q "%BUILD_TEMP_DIR%"
) )
del /f /q "*.spec" call "%VENV%\Scripts\activate.bat"
call "%venv%\Scripts\activate.bat" echo:building migrate_gse...
pyinstaller "main.py" --distpath "%OUT_DIR%" -y --clean --onedir --name "migrate_gse" --noupx --console -i "NONE" --workpath "%BUILD_TEMP_DIR%" --specpath "%BUILD_TEMP_DIR%" || (
echo building migrate_gse... set /a "LAST_ERR_CODE=1"
pyinstaller "main.py" --distpath "%out_dir%" -y --clean --onedir --name "migrate_gse" --noupx --console -i "NONE" --workpath "%build_temp_dir%" --specpath "%build_temp_dir%" || ( goto :end_script
set /a last_code=1
goto :script_end
) )
call "%signer_tool%" "%out_dir%\migrate_gse\migrate_gse.exe" call "%SIGNER_TOOL%" "%OUT_DIR%\migrate_gse\migrate_gse.exe"
copy /y README.md "%out_dir%\migrate_gse\" copy /y "README.md" "%out_dir%\migrate_gse\"
echo: echo:
echo ============= echo:=============
echo Built inside: "%out_dir%\" echo:Built inside: "%OUT_DIR%\"
goto :end_script
:script_end :end_script
if exist "%build_temp_dir%" ( if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%build_temp_dir%" rmdir /s /q "%BUILD_TEMP_DIR%"
) )
popd
endlocal & ( endlocal
exit /b %last_code% exit /b %LAST_ERR_CODE%
)

View File

@ -1,19 +1,29 @@
@echo off @echo off
cd /d "%~dp0" cd /d "%~dp0"
set "venv=.env-win" set "ROOT=%cd%"
set "reqs_file=requirements.txt" set "VENV=%ROOT%\.env-win"
set "REQS_FILE=%ROOT%\requirements.txt"
if exist "%venv%" ( set /a "LAST_ERR_CODE=0"
rmdir /s /q "%venv%"
if exist "%VENV%" (
rmdir /s /q "%VENV%"
) )
python -m venv "%venv%" || exit /b 1 python -m venv "%VENV%" || (
timeout /t 1 /nobreak set /a "LAST_ERR_CODE=1"
call "%venv%\Scripts\activate.bat" goto :end_script
pip install -r "%reqs_file%" )
set /a exit_code=errorlevel
call "%venv%\Scripts\deactivate.bat" timeout /t 1 /nobreak
exit /b %exit_code%
call "%VENV%\Scripts\activate.bat"
pip install -r "%REQS_FILE%"
set /a "LAST_ERR_CODE=%ERRORLEVEL%"
call "%VENV%\Scripts\deactivate.bat"
goto :end_script
:end_script
exit /b %LAST_ERR_CODE%