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:
workflow_call:
@ -7,26 +7,26 @@ on:
# allows manual trigger
permissions:
contents: write
contents: "write"
env:
PREMAKE_ACTION: gmake2
DEPS_CACHE_KEY: emu-deps-linux
DEPS_CACHE_DIR: build/deps/linux
PREMAKE_ACTION: "gmake2"
DEPS_CACHE_KEY: "emu-deps-linux"
DEPS_CACHE_DIR: "build/deps/linux"
PACKAGE_BASE_DIR: "build/package/linux"
THIRD_PARTY_BASE_DIR: 'third-party'
THIRD_PARTY_BASE_DIR: "third-party"
jobs:
deps:
name: Restore or build deps
name: "Restore or build deps"
if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-deps-linux.yml
uses: "./.github/workflows/emu-deps-linux.yml"
builds-matrix-linux:
name: build
needs: [ deps ]
runs-on: ubuntu-24.04
name: "build"
needs: ["deps"]
runs-on: "ubuntu-24.04"
if: ${{ !cancelled() }}
continue-on-error: true
@ -35,60 +35,62 @@ jobs:
matrix:
prj: [
# regular api
'api_regular', 'steamclient_regular',
"api_regular",
"steamclient_regular",
# api + client (experimental)
'api_experimental', 'steamclient_experimental',
"api_experimental",
"steamclient_experimental",
# tools
'tool_lobby_connect', 'tool_generate_interfaces',
"tool_lobby_connect",
"tool_generate_interfaces",
]
arch: [ 'x64', 'x32', ]
cfg: [ 'debug', 'release', ]
arch: ["x64", "x32"]
cfg: ["debug", "release"]
steps:
### clone branch
- name: Checkout branch
# clone branch
- name: "Checkout branch"
uses: actions/checkout@v4
### deps
- name: Restore deps
id: emu-deps-cache-step
# deps
- name: "Restore deps"
id: "emu-deps-cache-step"
uses: actions/cache@v4
with:
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}
key: "${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}"
path: "${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}"
## extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party build helpers (common/linux)
# extra helpers/tools, these are not built inside the deps build dir
- name: "Clone third-party build helpers (common/linux)"
uses: actions/checkout@v4
with:
ref: 'third-party/common/linux'
ref: "third-party/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
with:
ref: 'third-party/build/linux'
ref: "third-party/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
- name: Give all permissions to repo folder
shell: bash
working-directory: ${{ github.workspace }}
- name: "Give all permissions to repo folder"
shell: "bash"
working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}"
### generate project files
- name: Generate project files
shell: bash
working-directory: ${{ github.workspace }}
# generate project files
- name: "Generate project files"
shell: "bash"
working-directory: "${{ github.workspace }}"
run: |
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
## mandatory Linux packages
- name: Install required packages
shell: bash
# mandatory Linux packages
- name: "Install required packages"
shell: "bash"
run: |
sudo apt update -y
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 binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff
### build target
- name: Build target
shell: bash
working-directory: ${{ github.workspace }}/build/project/gmake2/linux
# build target
- name: "Build target"
shell: "bash"
working-directory: "${{ github.workspace }}/build/project/gmake2/linux"
run: |
echo "dry run..."
make -n -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
echo "actual run..."
make -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
### upload artifact/package to github Actions
- name: Upload target package
# upload artifact/package to github Actions
- name: "Upload target package"
uses: actions/upload-artifact@v4
with:
name: "emu-linux-${{ matrix.prj }}-${{ matrix.cfg }}-${{ matrix.arch }}-${{ github.sha }}"
path: "build/linux"
if-no-files-found: 'error'
if-no-files-found: "error"
compression-level: 9
retention-days: 1

View File

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

View File

@ -1,4 +1,4 @@
name: Emu third-party dependencies (Linux)
name: "Emu third-party dependencies (Linux)"
on:
workflow_call:
@ -7,66 +7,66 @@ on:
# allows manual trigger
permissions:
contents: write
contents: "write"
env:
PREMAKE_ACTION: gmake2
DEPS_CACHE_KEY: emu-deps-linux
DEPS_CACHE_DIR: build/deps/linux
PREMAKE_ACTION: "gmake2"
DEPS_CACHE_KEY: "emu-deps-linux"
DEPS_CACHE_DIR: "build/deps/linux"
PACKAGE_BASE_DIR: "build/package/linux"
THIRD_PARTY_BASE_DIR: 'third-party'
THIRD_PARTY_BASE_DIR: "third-party"
jobs:
deps-build:
runs-on: ubuntu-24.04
runs-on: "ubuntu-24.04"
if: ${{ !cancelled() }}
steps:
- name: Lookup cache for deps
id: emu-deps-cache-step
- name: "Lookup cache for deps"
id: "emu-deps-cache-step"
uses: actions/cache@v4
with:
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}
key: "${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}"
path: "${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}"
# we need branch because it has build scripts
- name: Checkout branch
- name: "Checkout branch"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
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'
uses: actions/checkout@v4
with:
ref: 'third-party/common/linux'
ref: "third-party/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'
uses: actions/checkout@v4
with:
ref: 'third-party/deps/linux'
ref: "third-party/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'
uses: actions/checkout@v4
with:
ref: 'third-party/deps/common'
ref: "third-party/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
- name: Give all permissions to repo folder
- name: "Give all permissions to repo folder"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: bash
working-directory: ${{ github.workspace }}
shell: "bash"
working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}"
## mandatory Linux packages
- name: Install required packages
shell: bash
# mandatory Linux packages
- name: "Install required packages"
shell: "bash"
run: |
sudo apt update -y
sudo apt install -y coreutils # echo, printf, etc...
@ -78,10 +78,10 @@ jobs:
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
- name: Build deps
- name: "Build deps"
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: bash
working-directory: ${{ github.workspace }}
shell: "bash"
working-directory: "${{ github.workspace }}"
run: |
export CMAKE_GENERATOR="Unix Makefiles"
sudo chmod 777 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5

View File

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

View File

@ -1,30 +1,30 @@
name: Emu PR
name: "Emu PR"
on:
pull_request:
branches: ["dev"]
paths-ignore:
- '**/*.md'
- 'dev.notes/**'
- 'post_build/**'
- 'z_original_repo_files/**'
- 'sdk/*.txt'
- 'LICENSE'
- "**/*.md"
- "dev.notes/**"
- "post_build/**"
- "z_original_repo_files/**"
- "sdk/*.txt"
- "LICENSE"
# tools
- 'tools/generate_emu_config/**'
- 'tools/migrate_gse/**'
- 'tools/steamclient_loader/linux/**' # these are just scripts, not built
- "tools/generate_emu_config/**"
- "tools/migrate_gse/**"
- "tools/steamclient_loader/linux/**" # these are just scripts, not built
permissions:
contents: write
contents: "write"
jobs:
emu-win-all:
name: win
name: "win"
if: ${{ !cancelled() }}
uses: ./.github/workflows/emu-build-all-win.yml
uses: "./.github/workflows/emu-build-all-win.yml"
emu-linux-all:
name: linux
name: "linux"
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:
workflow_call:
@ -7,7 +7,7 @@ on:
# allows manual trigger
permissions:
contents: write
contents: "write"
env:
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
@ -16,37 +16,37 @@ env:
jobs:
build:
runs-on: ubuntu-24.04
runs-on: "ubuntu-24.04"
steps:
- name: Checkout branch
- name: "Checkout branch"
uses: actions/checkout@v4
# env
- name: Install env
shell: bash
- name: "Install env"
shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
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
- name: Give all permissions to repo folder
shell: bash
working-directory: ${{ github.workspace }}
- name: "Give all permissions to repo folder"
shell: "bash"
working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}"
# build
- name: Rebuild
shell: bash
- name: "Rebuild"
shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh
# upload artifact
- name: Upload build package
- name: "Upload build package"
uses: actions/upload-artifact@v4
with:
name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error'
if-no-files-found: "error"
compression-level: 9
retention-days: 1

View File

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

View File

@ -1,22 +1,22 @@
name: Gen emu cfg PR
name: "Gen emu cfg PR"
on:
pull_request:
branches: ["dev"]
paths:
- '!**/*.md'
- 'tools/generate_emu_config/**'
- "!**/*.md"
- "tools/generate_emu_config/**"
permissions:
contents: write
contents: "write"
jobs:
script-win:
name: Gen emu config win
name: "Gen emu config win"
if: ${{ !cancelled() }}
uses: ./.github/workflows/gen_emu_config-build-win.yml
uses: "./.github/workflows/gen_emu_config-build-win.yml"
script-linux:
name: Gen emu config linux
name: "Gen emu config linux"
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:
workflow_call:
@ -7,7 +7,7 @@ on:
# allows manual trigger
permissions:
contents: write
contents: "write"
env:
ARTIFACT_NAME: "migrate_gse-linux-${{ github.sha }}"
@ -16,37 +16,37 @@ env:
jobs:
build:
runs-on: ubuntu-24.04
runs-on: "ubuntu-24.04"
steps:
- name: Checkout branch
- name: "Checkout branch"
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
- name: Give all permissions to repo folder
shell: bash
working-directory: ${{ github.workspace }}
- name: "Give all permissions to repo folder"
shell: "bash"
working-directory: "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}"
# env
- name: Install env
shell: bash
- name: "Install env"
shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
# build
- name: Rebuild
shell: bash
- name: "Rebuild"
shell: "bash"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh
# upload artifact
- name: Upload build package
- name: "Upload build package"
uses: actions/upload-artifact@v4
with:
name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error'
if-no-files-found: "error"
compression-level: 9
retention-days: 1

View File

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

View File

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

34
.gitignore vendored
View File

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

1
.gitmodules vendored
View File

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

View File

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

View File

@ -39,8 +39,7 @@ set /a "BUILD_DEPS=0"
:: build deps
if %BUILD_DEPS% equ 1 (
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
if !errorlevel! neq 0 (
call "%PREMAKE_EXE%" --file="premake5-deps.lua" --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=windows vs2022 || (
goto :end_script_with_err
)
goto :end_script
@ -64,8 +63,7 @@ set /a "BUILD_DEPS=0"
)
:: create .sln
call "%PREMAKE_EXE%" --file="premake5.lua" --genproto --dosstub --winrsrc --winsign --os=windows vs2022
if %errorlevel% neq 0 (
call "%PREMAKE_EXE%" --file="premake5.lua" --genproto --dosstub --winrsrc --winsign --os=windows vs2022 || (
goto :end_script_with_err
)
@ -88,8 +86,7 @@ set /a "BUILD_DEPS=0"
for %%C in (%BUILD_TARGETS%) do (
set "BUILD_TARGET=%%C"
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%"
if !errorlevel! neq 0 (
call "%MSBUILD_EXE%" /nologo -m:%MAX_THREADS% -v:n /p:Configuration=!BUILD_TYPE!,Platform=!BUILD_PLATFORM! /target:!BUILD_TARGET! "%SLN_FILE%" || (
goto :end_script_with_err
)
)
@ -98,12 +95,10 @@ set /a "BUILD_DEPS=0"
goto :end_script
:: exit without error
:end_script
endlocal
exit /b 0
:: exit with error
:end_script_with_err
endlocal
exit /b 1

View File

@ -2,13 +2,14 @@
setlocal EnableDelayedExpansion
cd /d "%~dp0"
set "CREDITS_FILE=CREDITS.md"
set "ROOT=%cd%"
set "CREDITS_FILE=%ROOT%\CREDITS.md"
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"
echo:# Many thanks for these sources>> "%CREDITS_FILE%"

View File

@ -11,8 +11,9 @@ if defined NUMBER_OF_PROCESSORS (
)
)
set "BUILD_DIR=build\win"
set "OUT_DIR=build\package\win"
set "ROOT=%cd%"
set "BUILD_DIR=%ROOT%\build\win"
set "OUT_DIR=%ROOT%\build\package\win"
if "%~1" equ "" (
1>&2 echo:missing build target folder arg
@ -41,32 +42,32 @@ if not exist "%PKG_EXE%" (
::::::::::::::::::::::::::::::::::::::::::
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 "CHANGELOG.md" "%TARGET_DIR%\"
copy /y "CREDITS.md" "%TARGET_DIR%\"
copy /y "%ROOT%\post_build\README.release.md" "%TARGET_DIR%\"
copy /y "%ROOT%\CHANGELOG.md" "%TARGET_DIR%\"
copy /y "%ROOT%\CREDITS.md" "%TARGET_DIR%\"
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\" (
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\" (
xcopy /y /s /e /r "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 "tools\steamclient_loader\win\ColdClientLoader.ini" "%TARGET_DIR%\steamclient_experimental\"
xcopy /y /s /e /r "%ROOT%\post_build\win\ColdClientLoader.EXAMPLE\" "%TARGET_DIR%\steamclient_experimental\dll_injection.EXAMPLE\"
copy /y "%ROOT%\post_build\README.experimental_steamclient.md" "%TARGET_DIR%\steamclient_experimental\"
copy /y "%ROOT%\tools\steamclient_loader\win\ColdClientLoader.ini" "%TARGET_DIR%\steamclient_experimental\"
)
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\" (
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%" (
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+
if %errorlevel% neq 0 (
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+ || (
goto :end_script_with_err
)
goto :end_script
:: exit without error
:end_script
endlocal
exit /b 0
:: exit with error
:end_script_with_err
endlocal
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
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
----------------------------------------------------------------

View File

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

View File

@ -1,48 +1,52 @@
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal
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%
set /a "MAX_THREADS=2"
if defined NUMBER_OF_PROCESSORS (
set /a THREAD_COUNT=NUMBER_OF_PROCESSORS*70/100
) else (
set /a THREAD_COUNT=2
:: use 70%
set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
)
if not exist "%packager%" (
1>&2 echo "[X] packager app wasn't found"
set /a last_code=1
goto :script_end
set "ROOT=%cd%"
set "BUILD_DIR=%ROOT%\bin\win"
set "OUT_DIR=%ROOT%\bin\package\win"
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%" (
1>&2 echo "[X] build folder wasn't found"
set /a last_code=1
goto :script_end
if not exist "%BUILD_DIR%" (
1>&2 echo:build folder wasn't found
goto :end_script_with_err
)
mkdir "%out_dir%"
set "archive_file=%out_dir%\generate_emu_config-win.7z"
if exist "%archive_file%" (
del /f /q "%archive_file%"
if not exist "%OUT_DIR%" (
mkdir "%OUT_DIR%"
)
"%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+
:script_end
popd
endlocal & (
exit /b %last_code%
set "ACHIVE_FILE=%OUT_DIR%\generate_emu_config-win.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
)
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
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal
pushd "%~dp0"
set "ROOT=%cd%"
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 "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_ERR_CODE=0"
set /a last_code=0
if not exist "%signer_tool%" (
1>&2 echo "[X] signing tool wasn't found"
set /a last_code=1
goto :script_end
set "SIGNER_TOOL=..\..\third-party\build\win\cert\sign_helper.bat"
if not exist "%SIGNER_TOOL%" (
1>&2 echo:signing tool wasn't found
set /a "LAST_ERR_CODE=1"
goto :end_script
)
if exist "%out_dir%" (
rmdir /s /q "%out_dir%"
if exist "%OUT_DIR%" (
rmdir /s /q "%OUT_DIR%"
)
mkdir "%out_dir%"
mkdir "%OUT_DIR%"
if exist "%build_temp_dir%" (
rmdir /s /q "%build_temp_dir%"
if exist "%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%" || (
set /a last_code=1
goto :script_end
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%" || (
set /a "LAST_ERR_CODE=1"
goto :end_script
)
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...
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
goto :script_end
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%" || (
set /a "LAST_ERR_CODE=1"
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...
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
goto :script_end
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%" || (
set /a "LAST_ERR_CODE=1"
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_unlocked.jpg" "%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
1>"%out_dir%\generate_emu_config\top_owners_ids.EXAMPLE.txt" echo Check the README
1>>"%out_dir%\generate_emu_config\top_owners_ids.EXAMPLE.txt" echo You can use a website like: https://steamladder.com/games/
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 "README.md" "%OUT_DIR%\generate_emu_config\"
echo Check the README>> "%OUT_DIR%\generate_emu_config\my_login.EXAMPLE.txt"
echo Check the README>> "%OUT_DIR%\generate_emu_config\top_owners_ids.EXAMPLE.txt"
echo You can use a website like: https://steamladder.com/games/>> "%OUT_DIR%\generate_emu_config\top_owners_ids.EXAMPLE.txt"
echo:
echo =============
echo Built inside: "%out_dir%\"
echo:=============
echo:Built inside: "%OUT_DIR%\"
goto :end_script
:script_end
if exist "%build_temp_dir%" (
rmdir /s /q "%build_temp_dir%"
)
popd
endlocal & (
exit /b %last_code%
:end_script
if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%BUILD_TEMP_DIR%"
)
endlocal
exit /b %LAST_ERR_CODE%

View File

@ -1,19 +1,29 @@
@echo off
cd /d "%~dp0"
set "venv=.env-win"
set "reqs_file=requirements.txt"
set "ROOT=%cd%"
set "VENV=%ROOT%\.env-win"
set "REQS_FILE=%ROOT%\requirements.txt"
if exist "%venv%" (
rmdir /s /q "%venv%"
set /a "LAST_ERR_CODE=0"
if exist "%VENV%" (
rmdir /s /q "%VENV%"
)
python -m venv "%venv%" || exit /b 1
timeout /t 1 /nobreak
call "%venv%\Scripts\activate.bat"
pip install -r "%reqs_file%"
set /a exit_code=errorlevel
python -m venv "%VENV%" || (
set /a "LAST_ERR_CODE=1"
goto :end_script
)
call "%venv%\Scripts\deactivate.bat"
exit /b %exit_code%
timeout /t 1 /nobreak
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
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal
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%
set /a "MAX_THREADS=2"
if defined NUMBER_OF_PROCESSORS (
set /a THREAD_COUNT=NUMBER_OF_PROCESSORS*70/100
) else (
set /a THREAD_COUNT=2
:: use 70%
set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
)
if not exist "%packager%" (
1>&2 echo "[X] packager app wasn't found"
set /a last_code=1
goto :script_end
set "ROOT=%cd%"
set "BUILD_DIR=%ROOT%\bin\win"
set "OUT_DIR=%ROOT%\bin\package\win"
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%" (
1>&2 echo "[X] build folder wasn't found"
set /a last_code=1
goto :script_end
if not exist "%BUILD_DIR%" (
1>&2 echo:build folder wasn't found
goto :end_script_with_err
)
mkdir "%out_dir%"
set "archive_file=%out_dir%\migrate_gse-win.7z"
if exist "%archive_file%" (
del /f /q "%archive_file%"
if not exist "%OUT_DIR%" (
mkdir "%OUT_DIR%"
)
"%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+
:script_end
popd
endlocal & (
exit /b %last_code%
set "ACHIVE_FILE=%OUT_DIR%\migrate_gse-win.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
)
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
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal
pushd "%~dp0"
set "ROOT=%cd%"
set "VENV=%ROOT%\.env-win"
set "OUT_DIR=%ROOT%\bin\win"
set "BUILD_TEMP_DIR=%ROOT%\bin\tmp\win"
set "venv=.env-win"
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_ERR_CODE=0"
set /a last_code=0
if not exist "%signer_tool%" (
1>&2 echo "[X] signing tool wasn't found"
set /a last_code=1
goto :script_end
set "SIGNER_TOOL=..\..\third-party\build\win\cert\sign_helper.bat"
if not exist "%SIGNER_TOOL%" (
1>&2 echo:signing tool wasn't found
set /a "LAST_ERR_CODE=1"
goto :end_script
)
if exist "%out_dir%" (
rmdir /s /q "%out_dir%"
if exist "%OUT_DIR%" (
rmdir /s /q "%OUT_DIR%"
)
mkdir "%out_dir%"
mkdir "%OUT_DIR%"
if exist "%build_temp_dir%" (
rmdir /s /q "%build_temp_dir%"
if exist "%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%" || (
set /a last_code=1
goto :script_end
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%" || (
set /a "LAST_ERR_CODE=1"
goto :end_script
)
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 Built inside: "%out_dir%\"
echo:=============
echo:Built inside: "%OUT_DIR%\"
goto :end_script
:script_end
if exist "%build_temp_dir%" (
rmdir /s /q "%build_temp_dir%"
)
popd
endlocal & (
exit /b %last_code%
:end_script
if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%BUILD_TEMP_DIR%"
)
endlocal
exit /b %LAST_ERR_CODE%

View File

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