Compare commits

...

71 Commits

Author SHA1 Message Date
alex47exe
56e8e6adfe
Merge branch 'dev' into dev 2024-10-26 02:31:02 +01:00
Detanup01
63552d7584
fixing is_beta_branch in ini 2024-10-25 18:47:18 +02:00
Detanup01
2560c6eb8e
Merge pull request #66 from Detanup01/steamutils001
steamutils001 imp
2024-10-25 14:07:50 +02:00
Detanup01
8556336169
remove the comment in SteamUtils001 2024-10-25 14:07:34 +02:00
Detanup01
6be3ba1963
fix interface getter and steamutils class 2024-10-23 17:00:28 +02:00
alex47exe
20f50d8cb0
Merge branch 'Detanup01:dev' into dev 2024-10-23 00:15:02 +01:00
Detanup01
47c6f8ef3d
steamutils001 imp 2024-10-22 20:23:22 +02:00
Detanup01
3a4d7c4bc1
Merge pull request #64 from universal963/patch-oldsteamuser
Initial implementation of `ISteamUser004` to `ISteamUser008`
2024-10-22 20:17:42 +02:00
universal963
dee5201e61 Fix debug log 2024-10-22 19:55:12 +08:00
universal963
f8bf0ab381 Fix debug build 2024-10-22 19:13:36 +08:00
universal963
2ef54d0fb8 Fix again 2024-10-22 19:00:49 +08:00
universal963
e3527834d7 Fix compilation 2024-10-22 18:53:44 +08:00
universal963
415fd1ca3e Initial implementation of ISteamUser004 to ISteamUser008 2024-10-22 18:41:46 +08:00
alex47exe
68e35c17ee generate_emu_config, fix -rel argument
for better customization, it is now split in two arguments:
- rel_out:  generate complete game config in _OUTPUT/appid folder, relative to the bat, sh or app calling generate_emu_config app
- rel_raw:  generate complete game config in the same folder that contains the bat, sh or app calling generate_emu_config app
2024-10-21 02:42:54 +01:00
alex47exe
493cf75376
Merge branch 'Detanup01:dev' into dev 2024-10-21 00:19:06 +01:00
Detanup01
2b0eefd929
use UGC19 as UGC20 2024-10-20 23:10:22 +02:00
alex47exe
5e6fcc146c
Merge branch 'Detanup01:dev' into dev 2024-10-19 23:17:16 +01:00
alex47exe
169d29e53d fix generate_emu_config
fix two controller config related error when generating for appid 427520 and 1477940
2024-10-19 22:47:56 +01:00
Detanup01
2f81f755b7
Merge pull request #59 from universal963/patch-3
Fix possible memory leaks in `network.cpp`
2024-10-18 16:06:21 +02:00
universal963
ff5ef4f721
One more fix 2024-10-15 23:45:32 +08:00
alex47exe
766b685b62 update top_owners_ids.txt for generate_emu_config
add top owners_ids.txt to Linux build too
2024-10-14 20:10:36 +01:00
alex47exe
0745935be0 is_beta_branch fix, as pointed by wizark952
should now be correctly parsed from 'app::general' instead of 'main::general'
2024-10-14 17:45:32 +01:00
alex47exe
174d2df50a generate_emu_config and migrate_gse:
replaced %outdir% with $outdir for linux build scripts
2024-10-14 15:40:14 +01:00
alex47exe
21c33b3a98 generate_emu_config and migrate_gse:
copy _DEFAULT folders for Linux too
2024-10-14 15:23:21 +01:00
universal963
4823a2be70
Fix possible memory leak 2024-10-14 13:40:21 +08:00
alex47exe
3ccce93a74 fix generate_emu_config login, thanks to Sak32009
replace 'client_id' error with simple 'wrong username and / or password' message, asking for correct username and / or password
add pcgw_page script to download PCGamingWiki page (source code only), not yet enabled in main script
generate steam_emu.ini for CODEX and RUNE versions, update gse_generate_interfaces
2024-10-14 00:24:49 +01:00
alex47exe
9c18c68ce9
Merge branch 'Detanup01:dev' into dev 2024-10-10 23:43:25 +01:00
Detanup01
4250da00c6
Merge pull request #55 from otavepto/dev
implement `ISteamAppDisableUpdate001`
2024-10-10 10:48:59 +02:00
a
2d69eb2164 implement ISteamAppDisableUpdate001 2024-10-09 22:34:03 +03:00
alex47exe
6c5819b3f0 release workflow improvements
- added bat scripts to automatically pack latest steam_api dlss and tools for generate_emu_config and migrate_gse
- removed previous steam_api dlls and 7z archives from generate_emu_config and migrate_gse
- removed previous generate_interfaces and lobby_connect 7z archives from generate_emu_config and migrate_gse
- moved some default required files for generate_emu_config from _DEFAULT\1 to _DEFAULT\0 folder, thus eliminating the need to duplicate them for every other default configuration folder you might create (_DEFAULT\2 - _DEFAULT\5)
2024-10-07 15:56:41 +01:00
alex47exe
398ae35d99 fix steam id for generated codex ini
now using steam id3 (correct) instead of steam id64 (wrong)
2024-10-07 15:55:38 +01:00
alex47exe
1d68c3d58b
Merge branch 'dev' into dev 2024-10-07 00:40:58 +01:00
Detanup01
1460b87e39
update generate interface (more interface discovery) 2024-10-06 14:06:39 +02:00
Detanup01
3a05ef636f
Merge pull request #52 from otavepto/dev
support older bind variants + auto unload on success or timeout
2024-10-06 13:52:51 +02:00
a
ed5b745e09 support older variant + auto unload on success or timeout 2024-10-05 20:11:40 +03:00
alex47exe
8141643978 - manually push latest steam api 7z archives required by gse_debug_switch helper tool
- disable overlay by default for generate_emu_config (seems it crashes a lot of games now after some recent updates to the way achivement icons are loaded)
2024-09-24 00:14:28 +01:00
alex47exe
ea28ed622b
Merge branch 'Detanup01:dev' into dev 2024-09-19 00:50:42 +01:00
Detanup01
d40d306ccd
wizard's change to stubdrm
Indicading using old ubuntu version in readme (check prev change for going 22.04->20.04)
2024-09-18 19:41:02 +02:00
alex47exe
c0b071e78a
Merge branch 'dev' into dev 2024-09-16 15:17:36 +01:00
Detanup01
712482f286
Merge pull request #42 from universal963/patch-2
Correct undocumented api in `ISteamNetworkingSockets010` and `ISteamNetworkingSockets011`
2024-09-16 09:48:24 +02:00
universal963
cbef1d49e9 Correct undocumented api in ISteamNetworkingSockets010 and ISteamNetworkingSockets011 2024-09-16 13:06:42 +08:00
Detanup01
f7fe813310
fix for "inputs" not exists in vdf 2024-09-15 21:46:09 +02:00
Detanup01
0dcafc5cb8
Merge pull request #39 from Detanup01/morestub_ms3
Update stubdrm.cpp
2024-09-15 17:26:38 +02:00
Detanup01
addfd88782
fixing wrong indent (tabs) 2024-09-15 17:14:00 +02:00
Detanup01
febbf32fb9
Update stubdrm.cpp
Adding new detection for Metal Slug 3
2024-09-15 16:46:21 +02:00
Detanup01
ca66c1bf62
Merge pull request #38 from M4RCK5/dev
Lobby Connect Improvements + MBTL Fix
2024-09-15 12:51:15 +02:00
M4RCK5
fcd523796f
Added back active user list but disabled 2024-09-14 05:32:53 -03:00
M4RCK5
a68259d7cd
MELTY BLOOD TYPE LUMINA Fix
[Requested by wizark](https://cs.rin.ru/forum/viewtopic.php?p=3124996#p3124996)
2024-09-14 01:59:57 -03:00
M4RCK5
367234ae64
Lobby Connect Improvements
-Removed active user list to prioritize multiplayer lobbies
-Fixed infinite loop when the user inputs letters instead of numbers
-Clear output when refreshing lobby list
2024-09-13 15:12:27 -03:00
alex47exe
8b2b141770
Merge branch 'Detanup01:dev' into dev 2024-09-07 00:11:12 +01:00
Detanup01
cd8fcaf61f
Merge pull request #36 from Detanup01/ubuntu_20-04
changing all 22.04 to 20.04
2024-09-06 12:54:25 +02:00
Detanup01
d2f990d8e3
changing all 22.04 to 20.04 2024-09-05 19:40:37 +02:00
alex47exe
3fbe0d3ec6
Merge branch 'Detanup01:dev' into dev 2024-09-02 12:19:29 +01:00
Detanup01
dcc1a5c63f
Merge pull request #35 from Sak32009/patch-stb-image-resize2-as-static
compile stb_image_resize2 as static library
2024-09-02 10:46:35 +02:00
Detanup01
1c012c9ac7
Merge pull request #34 from Sak32009/patch-msbuild-warnings-1
fixed msbuild warnings (again and again forever maybe)
2024-09-02 10:46:24 +02:00
Sak32009
b3582bf31c compile stb_image_resize2 as static library 2024-09-01 08:17:23 +02:00
Sak32009
c3d8217629 fixed msbuild warnings 2024-09-01 07:24:16 +02:00
alex47exe
4f0a36f8bb
Merge branch 'Detanup01:dev' into dev 2024-08-27 23:37:28 +01:00
Detanup01
601bb51d46
Merge pull request #32 from universal963/universal963-patch-1
More accurate api behaviors fix
2024-08-27 15:27:32 +02:00
alex47exe
93ba29191c
Merge branch 'dev' into dev 2024-08-26 22:49:44 +01:00
universal963
fd1af0d7ff
More accurate api behaviors 2024-08-27 02:08:13 +08:00
Detanup01
b0d92a48c1
Merge pull request #31 from Sak32009/dev
varied fixes and improvements
2024-08-26 07:39:01 +02:00
Sak32009
91eff290a0 formatted the .yml workflows 2024-08-25 18:08:23 +02:00
Sak32009
1b68c4bb0e formatted the .yml workflows, updated the python version of migrate_gse to v3.12 and updated softprops/action-gh-release to v2 2024-08-25 12:49:34 +02:00
Sak32009
971e60c85d removed /s option from del command in .bat files 2024-08-25 11:37:01 +02:00
Sak32009
a75ba5c9bd improved generate_credits.bat 2024-08-25 11:36:17 +02:00
Sak32009
c302fa2638 added .editorconfig for compatible IDEs 2024-08-25 11:31:51 +02:00
Sak32009
00ede97f15 updated .gitignore 2024-08-25 11:30:57 +02:00
Sak32009
a506b80131 removed first line of .gitmodules 2024-08-25 11:30:38 +02:00
Sak32009
5700a5f886 improved build_win_premake.bat, package_win.bat, rebuild_win.bat and recreate_venv_win.bat and and fixed a sign_helper error that didn't find the input file 2024-08-25 11:30:19 +02:00
Sak32009
85335e7628 updated sdk readme and added source to CREDITS.md 2024-08-25 09:55:37 +02:00
171 changed files with 4686 additions and 2181 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-20.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-20.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" ]
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-20.04"
steps:
- name: Checkout branch
- name: "Checkout branch"
uses: actions/checkout@v4
# env
- name: Install env
shell: bash
# env
- 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
# build
- 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
# upload artifact
- 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,77 @@ 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 }}
### 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
shell: cmd
## clone this for 7za.exe
- name: "Clone third-party deps (deps/win)"
uses: actions/checkout@v4
with:
ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
# download artifacts
- name: "Download emu build artifacts (Win)"
uses: actions/download-artifact@v4
with:
path: "build/win"
pattern: "emu-win-*"
merge-multiple: true
# env
- name: "Install env"
shell: "cmd"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: recreate_venv_win.bat
# build
- name: Rebuild
shell: cmd
# build
- name: "Rebuild"
shell: "cmd"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: rebuild_win.bat
# upload artifact
- name: Upload build package
# upload artifact
- 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" ]
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-20.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
# env
- 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
# build
- 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
# upload artifact
- 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,77 @@ 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.12
- name: "Set up Python 3.12"
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 }}
# 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
## clone this for 7za.exe
- name: "Clone third-party deps (deps/win)"
uses: actions/checkout@v4
with:
ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
# download artifacts
- name: "Download emu build artifacts (Win)"
uses: actions/download-artifact@v4
with:
path: "build/win"
pattern: "emu-win-*"
merge-multiple: true
# env
- name: "Install env"
shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: recreate_venv_win.bat
# build
- name: Rebuild
# build
- name: "Rebuild"
shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: rebuild_win.bat
# upload artifact
- name: Upload build package
# upload artifact
- 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" ]
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,415 @@
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-20.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
needs: ["emu-win-all"] # add emu-win-all to wait for emu build to complete, so that we include the latest dlls and tools in generate_emu_config
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
# release tag
- 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
needs: ["emu-linux-all"] # add emu-linux-all to wait for emu build to complete (not really needed but included for better build matrix visualization)
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-20.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
# release tag
- 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
needs: ["emu-win-all"] # add emu-win-all to wait for emu build to complete, so that we include the latest dlls and tools in migrate_gse
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
# release tag
- 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:
needs: ["emu-linux-all"] # add emu-linux-all to wait for emu build to complete (not really needed but included for better build matrix visualization)
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-20.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
# release tag
- 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

73
.gitignore vendored
View File

@ -1,30 +1,67 @@
/.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/backup/
/tools/generate_emu_config/bin/
/tools/generate_emu_config/bin
/tools/generate_emu_config/_DEFAULT/0/steam_api.dll
/tools/generate_emu_config/_DEFAULT/0/steam_api.7z
/tools/generate_emu_config/_DEFAULT/0/steam_api64.dll
/tools/generate_emu_config/_DEFAULT/0/steam_api64.7z
/tools/generate_emu_config/_DEFAULT/0/steam_api.7z
/tools/generate_emu_config/_DEFAULT/0/steam_api64.dll
/tools/generate_emu_config/_DEFAULT/0/steam_api64.7z
/tools/generate_emu_config/_DEFAULT/0/steam_misc/tools/generate_interfaces/generate_interfaces.7z
/tools/generate_emu_config/_DEFAULT/0/steam_misc/tools/generate_interfaces/generate_interfaces.exe
/tools/generate_emu_config/_DEFAULT/0/steam_misc/tools/generate_interfaces/generate_interfaces64.exe
/tools/generate_emu_config/_DEFAULT/0/steam_misc/tools/lobby_connect/lobby_connect.7z
/tools/generate_emu_config/_DEFAULT/0/steam_misc/tools/lobby_connect/lobby_connect.exe
/tools/generate_emu_config/_DEFAULT/0/steam_misc/tools/lobby_connect/lobby_connect64.exe
/tools/generate_emu_config/_OUTPUT/
/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__/
/tools/migrate_gse/bin
/third-party/
/tools/migrate_gse/_DEFAULT/0/steam_api.dll
/tools/migrate_gse/_DEFAULT/0/steam_api.7z
/tools/migrate_gse/_DEFAULT/0/steam_api64.dll
/tools/migrate_gse/_DEFAULT/0/steam_api64.7z
/tools/migrate_gse/_DEFAULT/0/steam_api.7z
/tools/migrate_gse/_DEFAULT/0/steam_api64.dll
/tools/migrate_gse/_DEFAULT/0/steam_api64.7z
/tools/migrate_gse/_DEFAULT/0/steam_misc/tools/generate_interfaces/generate_interfaces.7z
/tools/migrate_gse/_DEFAULT/0/steam_misc/tools/generate_interfaces/generate_interfaces.exe
/tools/migrate_gse/_DEFAULT/0/steam_misc/tools/generate_interfaces/generate_interfaces64.exe
/tools/migrate_gse/_DEFAULT/0/steam_misc/tools/lobby_connect/lobby_connect.7z
/tools/migrate_gse/_DEFAULT/0/steam_misc/tools/lobby_connect/lobby_connect.exe
/tools/migrate_gse/_DEFAULT/0/steam_misc/tools/lobby_connect/lobby_connect64.exe
/tools/migrate_gse/_OUTPUT/

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
@ -2547,3 +2548,9 @@ DEALINGS IN THE SOFTWARE.
https://github.com/Rat431/ColdAPI_Steam
Original version of ColdClientLoader by Rat431.
### sdk
#### INFO
https://partner.steamgames.com/doc/sdk

View File

@ -106,7 +106,7 @@ You can also find instructions here in [README.release.md](./post_build/README.r
### For Linux:
* Ubuntu 22.04 LTS: https://ubuntu.com/download/desktop
* Ubuntu 20.04 LTS: https://ubuntu.com/download/desktop
* Ubuntu required packages:
```shell
sudo apt update -y

View File

@ -21,7 +21,7 @@ set /a "BUILD_DEPS=0"
) else if "%~1" equ "--help" (
goto :help_page
) else (
1>&2 echo: invalid arg %~1
1>&2 echo:invalid arg %~1
goto :end_script_with_err
)
@ -32,15 +32,14 @@ set /a "BUILD_DEPS=0"
:: check premake
set "PREMAKE_EXE=third-party\common\win\premake\premake5.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
)
:: 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
@ -49,7 +48,7 @@ set /a "BUILD_DEPS=0"
:: check vswhere
set "VSWHERE_EXE=third-party\common\win\vswhere\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
)
@ -59,20 +58,19 @@ set /a "BUILD_DEPS=0"
set "MSBUILD_EXE=%%~A\MSBuild\Current\Bin\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
)
:: 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
)
:: check .sln
set "SLN_FILE=build\project\vs2022\win\gbe.sln"
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
)
@ -87,9 +85,8 @@ set /a "BUILD_DEPS=0"
set "BUILD_PLATFORM=%%B"
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 (
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%" || (
goto :end_script_with_err
)
)
@ -98,20 +95,18 @@ 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
:: show help page
:help_page
echo: "%~nx0" [switches]
echo: switches:
echo:"%~nx0" [switches]
echo:switches:
echo: --deps: rebuild third-party dependencies
echo: --help: show this page
goto :end_script

View File

@ -0,0 +1,3 @@
@echo off
call "build_win_premake.bat"

View File

@ -361,6 +361,7 @@ public:
CSteamID get_lobby();
bool is_offline();
void set_offline(bool offline);
uint16 get_port();
void set_port(uint16 port);

View File

@ -0,0 +1,47 @@
/* Copyright (C) 2019 Mr Goldberg
This file is part of the Goldberg Emulator
The Goldberg Emulator is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
The Goldberg Emulator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the Goldberg Emulator; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef __INCLUDED_STEAM_APP_DISABLE_UPDATE_H__
#define __INCLUDED_STEAM_APP_DISABLE_UPDATE_H__
#include "base.h"
class Steam_App_Disable_Update:
public ISteamAppDisableUpdate
{
class Settings *settings{};
class Networking *network{};
class SteamCallResults *callback_results{};
class SteamCallBacks *callbacks{};
class RunEveryRunCB *run_every_runcb{};
static void steam_network_callback(void *object, Common_Message *msg);
static void steam_run_every_runcb(void *object);
void steam_run_callback();
void network_callback(Common_Message *msg);
public:
Steam_App_Disable_Update(class Settings *settings, class Networking *network, class SteamCallResults *callback_results, class SteamCallBacks *callbacks, class RunEveryRunCB *run_every_runcb);
~Steam_App_Disable_Update();
// probably means how many seconds to keep the updates disabled
void SetAppUpdateDisabledSecondsRemaining(int32 nSeconds);
};
#endif // __INCLUDED_STEAM_APP_DISABLE_UPDATE_H__

View File

@ -56,6 +56,7 @@
#include "steam_gameserverstats.h"
#include "steam_gamestats.h"
#include "steam_timeline.h"
#include "steam_app_disable_update.h"
#include "steam_masterserver_updater.h"
#include "overlay/steam_overlay.h"
@ -140,6 +141,7 @@ public:
Steam_TV *steam_tv{};
Steam_GameStats *steam_gamestats{};
Steam_Timeline *steam_timeline{};
Steam_App_Disable_Update *steam_app_disable_update{};
Steam_GameServer *steam_gameserver{};
Steam_Utils *steam_gameserver_utils{};
@ -243,6 +245,9 @@ public:
// steam timeline
ISteamTimeline *GetISteamTimeline( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion );
// steam appp disable update
ISteamAppDisableUpdate *GetISteamAppDisableUpdate( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion );
// Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
STEAM_PRIVATE_API( void RunFrame() );

View File

@ -490,9 +490,6 @@ public:
/// - k_EResultInvalidParam - nLanes is bad
EResult GetConnectionRealTimeStatus( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus, int nLanes, SteamNetConnectionRealTimeLaneStatus_t *pLanes );
// based on reversing the vftable returned from original steamclient64.dll
bool GetConnectionRealTimeStatus_old( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus );
/// Fetch the next available message(s) from the socket, if any.
/// Returns the number of messages returned into your array, up to nMaxMessages.
/// If the connection handle is invalid, -1 is returned.

View File

@ -22,6 +22,11 @@
#include "auth.h"
class Steam_User :
public ISteamUser004,
public ISteamUser005,
public ISteamUser006,
public ISteamUser007,
public ISteamUser008,
public ISteamUser009,
public ISteamUser010,
public ISteamUser011,
@ -48,6 +53,8 @@ public ISteamUser
std::chrono::high_resolution_clock::time_point last_get_voice{};
std::string encrypted_app_ticket{};
Auth_Manager *auth_manager{};
std::map<std::string, std::string> registry{};
std::string registry_nullptr{};
public:
Steam_User(Settings *settings, Local_Storage *local_storage, class Networking *network, class SteamCallResults *callback_results, class SteamCallBacks *callbacks);
@ -57,15 +64,41 @@ public:
// this is only used internally by the API, and by a few select interfaces that support multi-user
HSteamUser GetHSteamUser();
void LogOn( CSteamID steamID );
void LogOff();
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
bool BLoggedOn();
ELogonState GetLogonState();
bool BConnected();
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
CSteamID GetSteamID();
bool IsVACBanned( int nGameID );
bool RequireShowVACBannedMessage( int nGameID );
void AcknowledgeVACBanning( int nGameID );
// These are dead.
int NClientGameIDAdd( int nGameID );
void RemoveClientGame( int nClientGameID );
void SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer );
void SetSteam2Ticket( uint8 *pubTicket, int cubTicket );
void AddServerNetAddress( uint32 unIP, uint16 unPort );
bool SetEmail( const char *pchEmail );
// logon cookie - this is obsolete and never used
int GetSteamGameConnectToken( void *pBlob, int cbMaxBlob );
bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue );
bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue );
bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue );
bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue );
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
@ -86,15 +119,40 @@ public:
int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure );
int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey );
int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure );
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer );
// Legacy functions
void SetSelfAsPrimaryChatDestination();
bool IsPrimaryChatDestination();
void RequestLegacyCDKey( uint32 nAppID );
bool SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending );
bool SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending );
bool AckGuestPass(const char *pchGuestPassCode);
bool RedeemGuestPass(const char *pchGuestPassCode);
uint32 GetGuestPassToGiveCount();
uint32 GetGuestPassToRedeemCount();
RTime32 GetGuestPassLastUpdateTime();
bool GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed, char *pchRecipientAddress, int cRecipientAddressSize );
bool GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed);
bool GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize );
bool GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize );
void AcknowledgeMessageByGID( const char *pchMessageGID );
bool SetLanguage( const char *pchLanguage );
// used by only a few games to track usage events
void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo);
void SetAccountName( const char *pchAccountName );
void SetPassword( const char *pchPassword );
void SetAccountCreationTime( RTime32 rt );
void RefreshSteam2Login();
// get the local storage folder for current Steam account to write application data, e.g. save games, configs etc.

View File

@ -25,6 +25,7 @@
class Steam_Utils :
public ISteamUtils001,
public ISteamUtils002,
public ISteamUtils003,
public ISteamUtils004,

View File

@ -17,14 +17,17 @@
#include "dll/local_storage.h"
#if defined(__WINDOWS__)
// NOTE: stb_image_write
#define STBIW_WINDOWS_UTF8
// NOTE: stb_image
#define STBI_WINDOWS_UTF8
#endif
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_STATIC
#define STBI_ONLY_PNG
#define STBI_ONLY_JPEG
#if defined(__WINDOWS__)
#define STBI_WINDOWS_UTF8
#define STBIW_WINDOWS_UTF8
#endif
#include "stb/stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
@ -32,6 +35,7 @@
#include "stb/stb_image_write.h"
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#define STB_IMAGE_RESIZE_STATIC
#include "stb/stb_image_resize2.h"
struct File_Data {
@ -813,7 +817,8 @@ bool Local_Storage::load_json(const std::string &full_path, nlohmann::json& json
PRINT_DEBUG("Loaded json '%s' (%zu items)", full_path.c_str(), json.size());
return true;
} catch (const std::exception& e) {
PRINT_DEBUG("Error while parsing '%s' json error: %s", full_path.c_str(), e.what());
const char *errorMessage = e.what();
PRINT_DEBUG("Error while parsing '%s' json error: %s", full_path.c_str(), errorMessage);
}
} else {
PRINT_DEBUG("Couldn't open file '%s' to read json", full_path.c_str());

View File

@ -110,7 +110,7 @@ static void get_broadcast_info(uint16 port)
number_broadcasts++;
if (number_broadcasts >= MAX_BROADCASTS) {
return;
break;
}
}
@ -542,6 +542,8 @@ std::set<IP_PORT> Networking::resolve_ip(std::string dns)
}
}
if (result)
freeaddrinfo(result);
return ips;
}

View File

@ -161,6 +161,11 @@ bool Settings::is_offline()
return offline;
}
void Settings::set_offline(bool offline)
{
this->offline = offline;
}
uint16 Settings::get_port()
{
return port;

View File

@ -1053,7 +1053,8 @@ static void try_parse_mods_file(class Settings *settings_client, Settings *setti
PRINT_DEBUG(" workshop_item_url: '%s'", newMod.workshopItemURL.c_str());
PRINT_DEBUG(" preview_url: '%s'", newMod.previewURL.c_str());
} catch (std::exception& e) {
PRINT_DEBUG("MODLOADER ERROR: %s", e.what());
const char *errorMessage = e.what();
PRINT_DEBUG("MODLOADER ERROR: %s", errorMessage);
}
}
}
@ -1206,6 +1207,10 @@ static bool parse_branches_file(
return false;
}
// app::general::is_beta_branch
settings_client->is_beta_branch = ini.GetBoolValue("app::general", "is_beta_branch", settings_client->is_beta_branch);
settings_server->is_beta_branch = ini.GetBoolValue("app::general", "is_beta_branch", settings_server->is_beta_branch);
// app::general::branch_name
std::string selected_branch = common_helpers::string_strip(ini.GetValue("app::general", "branch_name", ""));
if (selected_branch.empty()) {
@ -1375,9 +1380,6 @@ static void parse_simple_features(class Settings *settings_client, class Setting
settings_client->disable_account_avatar = !ini.GetBoolValue("main::general", "enable_account_avatar", !settings_client->disable_account_avatar);
settings_server->disable_account_avatar = !ini.GetBoolValue("main::general", "enable_account_avatar", !settings_server->disable_account_avatar);
settings_client->is_beta_branch = ini.GetBoolValue("main::general", "is_beta_branch", settings_client->is_beta_branch);
settings_server->is_beta_branch = ini.GetBoolValue("main::general", "is_beta_branch", settings_server->is_beta_branch);
settings_client->steam_deck = ini.GetBoolValue("main::general", "steam_deck", settings_client->steam_deck);
settings_server->steam_deck = ini.GetBoolValue("main::general", "steam_deck", settings_server->steam_deck);

View File

@ -0,0 +1,88 @@
/* Copyright (C) 2019 Mr Goldberg
This file is part of the Goldberg Emulator
The Goldberg Emulator is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
The Goldberg Emulator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the Goldberg Emulator; if not, see
<http://www.gnu.org/licenses/>. */
#include "dll/steam_app_disable_update.h"
void Steam_App_Disable_Update::steam_run_every_runcb(void *object)
{
// PRINT_DEBUG_ENTRY();
auto inst = (Steam_App_Disable_Update *)object;
inst->steam_run_callback();
}
void Steam_App_Disable_Update::steam_network_callback(void *object, Common_Message *msg)
{
// PRINT_DEBUG_ENTRY();
auto inst = (Steam_App_Disable_Update *)object;
inst->network_callback(msg);
}
Steam_App_Disable_Update::Steam_App_Disable_Update(class Settings *settings, class Networking *network, class SteamCallResults *callback_results, class SteamCallBacks *callbacks, class RunEveryRunCB *run_every_runcb)
{
this->settings = settings;
this->network = network;
this->callback_results = callback_results;
this->callbacks = callbacks;
this->run_every_runcb = run_every_runcb;
// this->network->setCallback(CALLBACK_ID_USER_STATUS, settings->get_local_steam_id(), &Steam_App_Disable_Update::steam_network_callback, this);
// this->run_every_runcb->add(&Steam_App_Disable_Update::steam_run_every_runcb, this);
}
Steam_App_Disable_Update::~Steam_App_Disable_Update()
{
// this->network->rmCallback(CALLBACK_ID_USER_STATUS, settings->get_local_steam_id(), &Steam_App_Disable_Update::steam_network_callback, this);
// this->run_every_runcb->remove(&Steam_App_Disable_Update::steam_run_every_runcb, this);
}
void Steam_App_Disable_Update::SetAppUpdateDisabledSecondsRemaining(int32 nSeconds)
{
PRINT_DEBUG_TODO();
std::lock_guard lock(global_mutex);
}
void Steam_App_Disable_Update::steam_run_callback()
{
}
void Steam_App_Disable_Update::network_callback(Common_Message *msg)
{
if (msg->has_low_level()) {
if (msg->low_level().type() == Low_Level::CONNECT) {
}
if (msg->low_level().type() == Low_Level::DISCONNECT) {
}
}
if (msg->has_networking_sockets()) {
}
}

View File

@ -84,8 +84,12 @@ bool Steam_Apps::BIsSubscribedApp( AppId_t appID )
std::lock_guard<std::recursive_mutex> lock(global_mutex);
if (appID == 0) return false; // steam returns false
if (appID == UINT32_MAX) return true; // steam returns true
if (appID == settings->get_local_game_id().AppID()) return true; // steam returns true
return settings->hasDLC(appID);
if (appID == settings->get_local_game_id().AppID() || settings->hasDLC(appID)) return true; // steam returns true
for (auto &d : settings->depots) {
if (d == appID)
return true;
}
return false;
}
@ -112,12 +116,16 @@ uint32 Steam_Apps::GetEarliestPurchaseUnixTime( AppId_t nAppID )
std::lock_guard<std::recursive_mutex> lock(global_mutex);
if (nAppID == 0) return 0; // steam returns 0
if (nAppID == UINT32_MAX) return 0; // steam returns 0
if (nAppID == settings->get_local_game_id().AppID() || settings->hasDLC(nAppID)) {
auto t =
// 4 days ago
startup_time
- std::chrono::hours(24 * 4);
auto duration = std::chrono::duration_cast<std::chrono::seconds>(t.time_since_epoch());
if (nAppID == settings->get_local_game_id().AppID() || settings->hasDLC(nAppID)) {
return (uint32)duration.count();
}
for (auto &d : settings->depots) {
if (d == nAppID)
return (uint32)duration.count();
}

View File

@ -124,6 +124,7 @@ Steam_Client::Steam_Client()
steam_tv = new Steam_TV(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
steam_gamestats = new Steam_GameStats(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
steam_timeline = new Steam_Timeline(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
steam_app_disable_update = new Steam_App_Disable_Update(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
// server
PRINT_DEBUG("init gameserver");
@ -205,6 +206,7 @@ Steam_Client::~Steam_Client()
DEL_INST(steam_tv);
DEL_INST(steam_gamestats);
DEL_INST(steam_timeline);
DEL_INST(steam_app_disable_update);
DEL_INST(steam_utils);
DEL_INST(steam_friends);

View File

@ -18,6 +18,19 @@
#include "dll/steam_client.h"
// retrieves the ISteamAppDisableUpdate interface associated with the handle
ISteamAppDisableUpdate *Steam_Client::GetISteamAppDisableUpdate( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion )
{
PRINT_DEBUG("%s", pchVersion);
if (!steam_pipes.count(hSteamPipe) || !hSteamUser) return nullptr;
if (strcmp(pchVersion, STEAMAPPDISABLEUPDATE_INTERFACE_VERSION) == 0) {
return reinterpret_cast<ISteamAppDisableUpdate *>(static_cast<ISteamAppDisableUpdate *>(steam_app_disable_update));
}
report_missing_impl_and_exit(pchVersion, EMU_FUNC_NAME);
}
// retrieves the ISteamTimeline interface associated with the handle
ISteamTimeline *Steam_Client::GetISteamTimeline( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion )
{
@ -58,7 +71,17 @@ ISteamUser *Steam_Client::GetISteamUser( HSteamUser hSteamUser, HSteamPipe hStea
PRINT_DEBUG("%s", pchVersion);
if (!steam_pipes.count(hSteamPipe) || !hSteamUser) return NULL;
if (strcmp(pchVersion, "SteamUser009") == 0) {
if (strcmp(pchVersion, "SteamUser004") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser004 *>(steam_user)); // sdk 0.99u
} else if (strcmp(pchVersion, "SteamUser005") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser005 *>(steam_user)); // sdk 0.99v
} else if (strcmp(pchVersion, "SteamUser006") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser006 *>(steam_user)); // sdk 0.99w
} else if (strcmp(pchVersion, "SteamUser007") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser007 *>(steam_user)); // sdk 0.99x
} else if (strcmp(pchVersion, "SteamUser008") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser008 *>(steam_user)); // sdk 0.99y
} else if (strcmp(pchVersion, "SteamUser009") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser009 *>(steam_user));
} else if (strcmp(pchVersion, "SteamUser010") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser010 *>(steam_user));
@ -186,7 +209,10 @@ ISteamUtils *Steam_Client::GetISteamUtils( HSteamPipe hSteamPipe, const char *pc
steam_utils_temp = steam_utils;
}
if (strcmp(pchVersion, "SteamUtils002") == 0) {
if (strcmp(pchVersion, "SteamUtils001") == 0) {
return reinterpret_cast<ISteamUtils *>(static_cast<ISteamUtils001 *>(steam_utils_temp));
} else if (strcmp(pchVersion, "SteamUtils002") == 0) {
return reinterpret_cast<ISteamUtils *>(static_cast<ISteamUtils002 *>(steam_utils_temp));
} else if (strcmp(pchVersion, "SteamUtils003") == 0) {
return reinterpret_cast<ISteamUtils *>(static_cast<ISteamUtils003 *>(steam_utils_temp)); // ISteamUtils003 Not found in public Archive, must be between 1.02-1.03
@ -422,6 +448,8 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
return GetAppTicket(hSteamUser, hSteamPipe, pchVersion);
} else if (strstr(pchVersion, "STEAMTIMELINE_INTERFACE") == pchVersion) {
return GetISteamTimeline(hSteamUser, hSteamPipe, pchVersion);
} else if (strstr(pchVersion, "SteamAppDisableUpdate") == pchVersion) {
return GetISteamAppDisableUpdate(hSteamUser, hSteamPipe, pchVersion);
}
PRINT_DEBUG("No interface: %s", pchVersion);
@ -725,6 +753,8 @@ ISteamUGC *Steam_Client::GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamP
return reinterpret_cast<ISteamUGC *>(static_cast<ISteamUGC017 *>(steam_ugc_temp));
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION018") == 0) {
return reinterpret_cast<ISteamUGC *>(static_cast<ISteamUGC018 *>(steam_ugc_temp));
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION019") == 0) {
return reinterpret_cast<ISteamUGC *>(static_cast<ISteamUGC *>(steam_ugc_temp));
} else if (strcmp(pchVersion, STEAMUGC_INTERFACE_VERSION) == 0) {
return reinterpret_cast<ISteamUGC *>(static_cast<ISteamUGC *>(steam_ugc_temp));
}

View File

@ -950,24 +950,6 @@ EResult Steam_Networking_Sockets::GetConnectionRealTimeStatus( HSteamNetConnecti
return k_EResultOK;
}
// based on reversing the vftable returned from original steamclient64.dll
bool Steam_Networking_Sockets::GetConnectionRealTimeStatus_old( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus )
{
PRINT_DEBUG("undocumented API, interface v10-11");
/*
...
xor r9d, r9d // int nLanes = 0
mov qword ptr ss:[rsp+0x20], 0x0 // SteamNetConnectionRealTimeLaneStatus_t *pLanes = nullptr
...
call qword ptr ds:[rax+0x80] // call GetConnectionRealTimeStatus(hConn, pStatus, nLanes, pLanes)
test eax, eax
setne al if (eax !=0) { al=1 } else { al=0 }
...
ret
*/
return GetConnectionRealTimeStatus(hConn, pStatus, 0, nullptr) != EResult::k_EResultNone;
}
/// Fetch the next available message(s) from the socket, if any.
/// Returns the number of messages returned into your array, up to nMaxMessages.
/// If the connection handle is invalid, -1 is returned.
@ -1022,10 +1004,19 @@ bool Steam_Networking_Sockets::GetConnectionInfo( HSteamNetConnection hConn, Ste
bool Steam_Networking_Sockets::GetQuickConnectionStatus( HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus *pStats )
{
PRINT_DEBUG_ENTRY();
if (!pStats)
return false;
return GetConnectionRealTimeStatus(hConn, pStats, 0, NULL) == k_EResultOK;
// based on reversing the vftable returned from original steamclient64.dll
/*
...
xor r9d, r9d // int nLanes = 0
mov qword ptr ss:[rsp+0x20], 0x0 // SteamNetConnectionRealTimeLaneStatus_t *pLanes = nullptr
...
call qword ptr ds:[rax+0x80] // call GetConnectionRealTimeStatus(hConn, pStatus, nLanes, pLanes)
test eax, eax
setne al if (eax !=0) { al=1 } else { al=0 }
...
ret
*/
return GetConnectionRealTimeStatus(hConn, pStats, 0, NULL) != k_EResultNone;
}

View File

@ -44,6 +44,18 @@ HSteamUser Steam_User::GetHSteamUser()
return CLIENT_HSTEAMUSER;
}
void Steam_User::LogOn( CSteamID steamID )
{
PRINT_DEBUG_ENTRY();
settings->set_offline(false);
}
void Steam_User::LogOff()
{
PRINT_DEBUG_ENTRY();
settings->set_offline(true);
}
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
@ -53,6 +65,21 @@ bool Steam_User::BLoggedOn()
return !settings->is_offline();
}
ELogonState Steam_User::GetLogonState()
{
PRINT_DEBUG_ENTRY();
if(settings->is_offline())
return (ELogonState)0;
else
return (ELogonState)4; // tested on real steam, undocumented return value
}
bool Steam_User::BConnected()
{
PRINT_DEBUG_ENTRY();
return !settings->is_offline();
}
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
CSteamID Steam_User::GetSteamID()
@ -63,6 +90,160 @@ CSteamID Steam_User::GetSteamID()
return id;
}
bool Steam_User::IsVACBanned( int nGameID )
{
PRINT_DEBUG_ENTRY();
return false;
}
bool Steam_User::RequireShowVACBannedMessage( int nGameID )
{
PRINT_DEBUG_ENTRY();
return false;
}
void Steam_User::AcknowledgeVACBanning( int nGameID )
{
PRINT_DEBUG_ENTRY();
}
// according to comments in sdk, "these are dead."
int Steam_User::NClientGameIDAdd( int nGameID )
{
PRINT_DEBUG_ENTRY();
return 0;
}
// according to comments in sdk, "these are dead."
void Steam_User::RemoveClientGame( int nClientGameID )
{
PRINT_DEBUG_ENTRY();
}
// according to comments in sdk, "these are dead."
void Steam_User::SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer )
{
PRINT_DEBUG_ENTRY();
}
void Steam_User::SetSteam2Ticket( uint8 *pubTicket, int cubTicket )
{
PRINT_DEBUG_ENTRY();
}
void Steam_User::AddServerNetAddress( uint32 unIP, uint16 unPort )
{
PRINT_DEBUG_ENTRY();
}
bool Steam_User::SetEmail( const char *pchEmail )
{
PRINT_DEBUG_ENTRY();
return false;
}
// according to comments in sdk, "logon cookie - this is obsolete and never used"
int Steam_User::GetSteamGameConnectToken( void *pBlob, int cbMaxBlob )
{
PRINT_DEBUG_ENTRY();
return 0;
}
bool Steam_User::SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue )
{
PRINT_DEBUG_TODO();
if (!pchValue)
return false; // real steam crashes, so return value is assumed
if (!pchKey) // tested on real steam
{
registry.clear();
registry_nullptr = std::string(pchValue);
}
else
{
registry[std::string(pchKey)] = std::string(pchValue);
// TODO: save it to disk, because real steam can get the string when app restarts
}
return true;
}
bool Steam_User::GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue )
{
PRINT_DEBUG_TODO();
// TODO: read data on disk, because real steam can get the string when app restarts
if (pchValue && cbValue > 0)
memset(pchValue, 0, cbValue);
std::string value{};
if(!pchKey)
{
value = registry_nullptr;
}
else
{
auto it = registry.find(std::string(pchKey));
if (it == registry.end())
return false;
value = it->second;
}
if (pchValue && cbValue > 0)
value.copy(pchValue, cbValue - 1);
return true;
}
bool Steam_User::SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue )
{
PRINT_DEBUG_TODO();
if (!pchKey) // tested on real steam
{
registry.clear();
registry_nullptr = std::to_string(iValue);
}
else
{
registry[std::string(pchKey)] = std::to_string(iValue);
// TODO: save it to disk, because real steam can get the string when app restarts
}
return true;
}
bool Steam_User::GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue )
{
PRINT_DEBUG_TODO();
// TODO: read data on disk, because real steam can get the string when app restarts
if (piValue)
*piValue = 0;
std::string value{};
if(!pchKey)
{
value = registry_nullptr;
}
else
{
auto it = registry.find(std::string(pchKey));
if (it == registry.end())
return false;
value = it->second;
}
try
{
if (piValue)
*piValue = std::stoi(value);
}
catch(...)
{
PRINT_DEBUG("not a number"); // TODO: real steam returns a value other than 0 under this condition
}
return true;
}
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
@ -101,6 +282,18 @@ int Steam_User::InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSte
return InitiateGameConnection(pAuthBlob, cbMaxAuthBlob, steamIDGameServer, unIPServer, usPortServer, bSecure);
}
int Steam_User::InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey )
{
PRINT_DEBUG("sdk 0.99x, 0.99y");
return InitiateGameConnection(pBlob, cbMaxBlob, steamID, unIPServer, usPortServer, bSecure);
}
int Steam_User::InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure )
{
PRINT_DEBUG("sdk 0.99u");
return InitiateGameConnection(pBlob, cbMaxBlob, steamID, unIPServer, usPortServer, bSecure);
}
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
void Steam_User::TerminateGameConnection( uint32 unIPServer, uint16 usPortServer )
@ -110,12 +303,147 @@ void Steam_User::TerminateGameConnection( uint32 unIPServer, uint16 usPortServer
// Legacy functions
void Steam_User::SetSelfAsPrimaryChatDestination()
{
PRINT_DEBUG_TODO();
}
bool Steam_User::IsPrimaryChatDestination()
{
PRINT_DEBUG_ENTRY();
return false;
}
void Steam_User::RequestLegacyCDKey( uint32 iAppID )
{
PRINT_DEBUG_TODO();
}
bool Steam_User::SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending )
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending )
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::AckGuestPass(const char *pchGuestPassCode)
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::RedeemGuestPass(const char *pchGuestPassCode)
{
PRINT_DEBUG_TODO();
return false;
}
uint32 Steam_User::GetGuestPassToGiveCount()
{
PRINT_DEBUG_TODO();
return 0;
}
uint32 Steam_User::GetGuestPassToRedeemCount()
{
PRINT_DEBUG_TODO();
return 0;
}
RTime32 Steam_User::GetGuestPassLastUpdateTime()
{
PRINT_DEBUG_TODO();
return 0;
}
bool Steam_User::GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed, char *pchRecipientAddress, int cRecipientAddressSize )
{
PRINT_DEBUG_TODO();
// TODO: pgidGuestPassID
if (pnPackageID)
*pnPackageID = 0;
if (pRTime32Created)
*pRTime32Created = 0;
if (pRTime32Expiration)
*pRTime32Expiration = 0;
if (pRTime32Sent)
*pRTime32Sent = 0;
if (pRTime32Redeemed)
*pRTime32Redeemed = 0;
if (pchRecipientAddress && cRecipientAddressSize > 0)
memset(pchRecipientAddress, 0, cRecipientAddressSize);
return false;
}
bool Steam_User::GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed)
{
PRINT_DEBUG_TODO();
// TODO: pgidGuestPassID
if (pnPackageID)
*pnPackageID = 0;
if (pRTime32Created)
*pRTime32Created = 0;
if (pRTime32Expiration)
*pRTime32Expiration = 0;
if (pRTime32Sent)
*pRTime32Sent = 0;
if (pRTime32Redeemed)
*pRTime32Redeemed = 0;
return false;
}
bool Steam_User::GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize )
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize )
{
PRINT_DEBUG_TODO();
if (pchSenderName && cSenderNameSize > 0)
memset(pchSenderName, 0, cSenderNameSize);
return false;
}
void Steam_User::AcknowledgeMessageByGID( const char *pchMessageGID )
{
PRINT_DEBUG_TODO();
}
bool Steam_User::SetLanguage( const char *pchLanguage )
{
PRINT_DEBUG_TODO();
// TODO: don't know what this api actually does other than returning true
return true;
}
// used by only a few games to track usage events
void Steam_User::TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo)
{
PRINT_DEBUG_TODO();
}
void Steam_User::SetAccountName( const char *pchAccountName )
{
PRINT_DEBUG_TODO();
}
void Steam_User::SetPassword( const char *pchPassword )
{
PRINT_DEBUG_TODO();
}
void Steam_User::SetAccountCreationTime( RTime32 rt )
{
PRINT_DEBUG_TODO();
}
void Steam_User::RefreshSteam2Login()
{
PRINT_DEBUG_TODO();

View File

@ -186,7 +186,7 @@ unsigned int Steam_User_Stats::cache_leaderboard_ifneeded(const std::string &nam
// create a new entry in-memory and try reading the entries from disk
struct Steam_Leaderboard new_board{};
new_board.name = common_helpers::ascii_to_lowercase(name);
new_board.name = name;
new_board.sort_method = eLeaderboardSortMethod;
new_board.display_type = eLeaderboardDisplayType;
new_board.entries = load_leaderboard_entries(name);

View File

@ -582,7 +582,8 @@ bool Steam_User_Stats::ResetAllStats( bool bAchievementsToo )
// this won't actually trigger a notification, just updates the data
overlay->AddAchievementNotification(name, item, false);
} catch(const std::exception& e) {
PRINT_DEBUG("ERROR: %s", e.what());
const char *errorMessage = e.what();
PRINT_DEBUG("ERROR: %s", errorMessage);
}
}
if (needs_disk_write) save_achievements();

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,17 +11,18 @@ 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
1>&2 echo:missing build target folder arg
goto :end_script_with_err
)
set "TARGET_DIR=%BUILD_DIR%\%~1"
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
)
@ -34,39 +35,39 @@ 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
1>&2 echo:packager wasn't found
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 "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

@ -36,7 +36,7 @@ disable_warning_local_save=0
# by default the overlay will attempt to upload the achievements icons to the GPU
# so that they are displayed, in rare cases this might keep failing and cause FPS drop
# 0=prevent the overlay from attempting to upload the icons periodically,
# in that case achievements icons win't be displayed
# in that case achievements icons won't be displayed
# default=1
upload_achievements_icons_to_gpu=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

@ -0,0 +1,19 @@
#ifndef ISTEAMAPPDISABLEUPDATE_H
#define ISTEAMAPPDISABLEUPDATE_H
// this interface is not found in public SDK archives, it is based on reversing the returned vftable from steamclient64.dll
// requested by appid 730
class ISteamAppDisableUpdate
{
public:
// probably means how many seconds to keep the updates disabled
virtual void SetAppUpdateDisabledSecondsRemaining(int32 nSeconds) = 0;
};
#define STEAMAPPDISABLEUPDATE_INTERFACE_VERSION "SteamAppDisableUpdate001"
#endif // ISTEAMAPPDISABLEUPDATE_H

View File

@ -301,8 +301,9 @@ public:
/// Returns basic information about the high-level state of the connection.
virtual bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pInfo ) = 0;
// based on reversing the vftable returned from original steamclient64.dll
virtual bool GetConnectionRealTimeStatus_old( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus ) = 0;
/// Returns a small set of information about the real-time state of the connection
/// Returns false if the connection handle is invalid, or the connection has ended.
virtual bool GetQuickConnectionStatus( HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus *pStats ) = 0;
/// Returns detailed connection stats in text format. Useful
/// for dumping to a log, etc.

View File

@ -301,8 +301,9 @@ public:
/// Returns basic information about the high-level state of the connection.
virtual bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pInfo ) = 0;
// based on reversing the vftable returned from original steamclient64.dll
virtual bool GetConnectionRealTimeStatus_old( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus ) = 0;
/// Returns a small set of information about the real-time state of the connection
/// Returns false if the connection handle is invalid, or the connection has ended.
virtual bool GetQuickConnectionStatus( HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus *pStats ) = 0;
/// Returns detailed connection stats in text format. Useful
/// for dumping to a log, etc.

53
sdk/steam/isteamuser004.h Normal file
View File

@ -0,0 +1,53 @@
#ifndef ISTEAMUSER004_H
#define ISTEAMUSER004_H
#ifdef STEAM_WIN32
#pragma once
#endif
enum EConfigSubTree {
EConfigSubTree_stub
};
enum ELogonState {
ELogonState_stub
};
class ISteamUser004
{
public:
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
virtual bool BLoggedOn() = 0;
virtual ELogonState GetLogonState() = 0;
virtual bool BConnected() = 0;
virtual CSteamID GetSteamID() = 0;
virtual bool IsVACBanned( int nGameID ) = 0;
virtual bool RequireShowVACBannedMessage( int nGameID ) = 0;
virtual void AcknowledgeVACBanning( int nGameID ) = 0;
// These are dead.
virtual int NClientGameIDAdd( int nGameID ) = 0;
virtual void RemoveClientGame( int nClientGameID ) = 0;
virtual void SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer ) = 0;
virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0;
virtual void AddServerNetAddress( uint32 unIP, uint16 unPort ) = 0;
virtual bool SetEmail( const char *pchEmail ) = 0;
// logon cookie - this is obsolete and never used
virtual int GetSteamGameConnectToken( void *pBlob, int cbMaxBlob ) = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
virtual void SetSelfAsPrimaryChatDestination() = 0;
virtual bool IsPrimaryChatDestination() = 0;
virtual void RequestLegacyCDKey( uint32 iAppID ) = 0;
};
#endif // ISTEAMUSER004_H

57
sdk/steam/isteamuser005.h Normal file
View File

@ -0,0 +1,57 @@
#ifndef ISTEAMUSER005_H
#define ISTEAMUSER005_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser005
{
public:
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
virtual bool BLoggedOn() = 0;
virtual ELogonState GetLogonState() = 0;
virtual bool BConnected() = 0;
virtual CSteamID GetSteamID() = 0;
virtual bool IsVACBanned( int nGameID ) = 0;
virtual bool RequireShowVACBannedMessage( int nAppID ) = 0;
virtual void AcknowledgeVACBanning( int nAppID ) = 0;
virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0;
virtual void AddServerNetAddress( uint32 unIP, uint16 unPort ) = 0;
virtual bool SetEmail( const char *pchEmail ) = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
virtual void SetSelfAsPrimaryChatDestination() = 0;
virtual bool IsPrimaryChatDestination() = 0;
virtual void RequestLegacyCDKey( uint32 nAppID ) = 0;
virtual bool SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending ) = 0;
virtual bool SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending ) = 0;
virtual bool AckGuestPass(const char *pchGuestPassCode) = 0;
virtual bool RedeemGuestPass(const char *pchGuestPassCode) = 0;
virtual uint32 GetGuestPassToGiveCount() = 0;
virtual uint32 GetGuestPassToRedeemCount() = 0;
virtual RTime32 GetGuestPassLastUpdateTime() = 0;
virtual bool GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed, char *pchRecipientAddress, int cRecipientAddressSize ) = 0;
virtual bool GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed) = 0;
virtual bool GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize ) = 0;
virtual bool GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize ) = 0;
virtual void AcknowledgeMessageByGID( const char *pchMessageGID ) = 0;
virtual bool SetLanguage( const char *pchLanguage ) = 0;
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
virtual void SetAccountName( const char *pchAccountName ) = 0;
virtual void SetPassword( const char *pchPassword ) = 0;
virtual void SetAccountCreationTime( RTime32 rt ) = 0;
};
#endif // ISTEAMUSER005_H

64
sdk/steam/isteamuser006.h Normal file
View File

@ -0,0 +1,64 @@
#ifndef ISTEAMUSER006_H
#define ISTEAMUSER006_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser006
{
public:
// returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
virtual bool BLoggedOn() = 0;
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
virtual CSteamID GetSteamID() = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
// used by only a few games to track usage events
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
};
#endif // ISTEAMUSER006_H

68
sdk/steam/isteamuser007.h Normal file
View File

@ -0,0 +1,68 @@
#ifndef ISTEAMUSER007_H
#define ISTEAMUSER007_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser007
{
public:
// returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
virtual bool BLoggedOn() = 0;
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
virtual CSteamID GetSteamID() = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
// used by only a few games to track usage events
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
// legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error
// this is only needed under very specific circumstances
virtual void RefreshSteam2Login() = 0;
};
#endif // ISTEAMUSER007_H

60
sdk/steam/isteamuser008.h Normal file
View File

@ -0,0 +1,60 @@
#ifndef ISTEAMUSER008_H
#define ISTEAMUSER008_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser008
{
public:
// returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user
virtual HSteamUser GetHSteamUser() = 0;
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
virtual bool BLoggedOn() = 0;
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
virtual CSteamID GetSteamID() = 0;
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
// used by only a few games to track usage events
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
// legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error
// this is only needed under very specific circumstances
virtual void RefreshSteam2Login() = 0;
};
#endif // ISTEAMUSER008_H

View File

@ -0,0 +1,34 @@
#ifndef ISTEAMUTILS001_H
#define ISTEAMUTILS001_H
#ifdef STEAM_WIN32
#pragma once
#endif
class ISteamUtils001
{
public:
// return the number of seconds since the user
virtual uint32 GetSecondsSinceAppActive() = 0;
virtual uint32 GetSecondsSinceComputerActive() = 0;
// the universe this client is connecting to
virtual EUniverse GetConnectedUniverse() = 0;
// Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time)
virtual uint32 GetServerRealTime() = 0;
// returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)
// e.g "US" or "UK".
virtual const char *GetIPCountry() = 0;
// returns true if the image exists, and valid sizes were filled out
virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0;
// returns true if the image exists, and the buffer was successfully filled out
// results are returned in RGBA format
// the destination buffer size should be 4 * height * width * sizeof(char)
virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0;
};
#endif // ISTEAMUTILS001_H

View File

@ -21,6 +21,7 @@
#include "steam_api_common.h"
// All of the interfaces
#include "isteamappdisableupdate.h"
#include "isteamclient.h"
#include "isteamclient007.h"
#include "isteamclient008.h"
@ -37,6 +38,11 @@
#include "isteamclient019.h"
#include "isteamclient020.h"
#include "isteamuser.h"
#include "isteamuser004.h"
#include "isteamuser005.h"
#include "isteamuser006.h"
#include "isteamuser007.h"
#include "isteamuser008.h"
#include "isteamuser009.h"
#include "isteamuser010.h"
#include "isteamuser011.h"
@ -67,6 +73,7 @@
#include "isteamfriends015.h"
#include "isteamfriends016.h"
#include "isteamutils.h"
#include "isteamutils001.h"
#include "isteamutils002.h"
#include "isteamutils003.h"
#include "isteamutils004.h"

View File

@ -0,0 +1,211 @@
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_type=a3x
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <File.au3>
; ARC_NAME
$arc_generate_interfaces = IniRead(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".ini", "ARC_NAME", "generate_interfaces", "generate_interfaces.7z")
; EXE_PATH
$generate_interfaces_release = IniRead(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".ini", "EXE_PATH", "generate_interfaces_release", "generate_interfaces.exe")
$generate_interfaces64_release = IniRead(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".ini", "EXE_PATH", "generate_interfaces64_release", "generate_interfaces64.exe")
$generate_interfaces_7z = @ScriptDir & '\steam_misc\tools\generate_interfaces\' & $arc_generate_interfaces
$generate_interfaces_dst = @ScriptDir & '\steam_misc\tools\generate_interfaces'
$generate_interfaces_exe = ''
Switch @OSArch
Case 'X64'
$generate_interfaces_exe = StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1)) ; generate_interfaces64.exe
If Not FileExists(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1))) Then
ShellExecuteWait(@ScriptDir & "\steam_misc\tools\7za\7za.exe", 'x "' & $generate_interfaces_7z & '" -o"' & $generate_interfaces_dst & '" -aoa', "", "", @SW_HIDE)
EndIf
Case 'X86'
$generate_interfaces_exe = StringTrimLeft($generate_interfaces_release, StringInStr($generate_interfaces_release, "\", 0, -1)) ; generate_interfaces.exe
If Not FileExists(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces_release, StringInStr($generate_interfaces_release, "\", 0, -1))) Then
ShellExecuteWait(@ScriptDir & "\steam_misc\tools\7za\7za.exe", 'x "' & $generate_interfaces_7z & '" -o"' & $generate_interfaces_dst & '" -aoa', "", "", @SW_HIDE)
EndIf
Case Else
$generate_interfaces_exe = StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1)) ; generate_interfaces64.exe
If Not FileExists(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1))) Then
ShellExecuteWait(@ScriptDir & "\steam_misc\tools\7za\7za.exe", 'x "' & $generate_interfaces_7z & '" -o"' & $generate_interfaces_dst & '" -aoa', "", "", @SW_HIDE)
EndIf
EndSwitch
If Not FileExists(@ScriptDir & '\steam_api.dll') Then FileDelete(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces_release, StringInStr($generate_interfaces_release, "\", 0, -1)))
If Not FileExists(@ScriptDir & '\steam_api64.dll') Then FileDelete(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1)))
Switch @OSArch
Case 'X64'
If Not FileExists(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1))) Then
$generate_interfaces_exe = StringTrimLeft($generate_interfaces_release, StringInStr($generate_interfaces_release, "\", 0, -1))
EndIf
Case 'X86'
If Not FileExists(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces_release, StringInStr($generate_interfaces_release, "\", 0, -1))) Then
$generate_interfaces_exe = StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1))
EndIf
Case Else
If Not FileExists(@ScriptDir & '\steam_misc\tools\generate_interfaces\' & StringTrimLeft($generate_interfaces64_release, StringInStr($generate_interfaces64_release, "\", 0, -1))) Then
$generate_interfaces_exe = StringTrimLeft($generate_interfaces_release, StringInStr($generate_interfaces_release, "\", 0, -1))
EndIf
EndSwitch
If FileExists(@ScriptDir & '\valve_api.dll') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\valve_api.dll.bak' & '"', @ScriptDir, @SW_HIDE)
EndIf
If FileExists(@ScriptDir & '\steam_api.dll.bak') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api.dll.bak' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api.dll.org') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api.dll.org' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api.bak') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api.bak' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api.org') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api.org' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api_orig.dll') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api_orig.dll' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api_legit.dll') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api_legit.dll' & '"', @ScriptDir, @SW_HIDE)
#ElseIf FileExists(@ScriptDir & '\steam_api.dll') Then
#RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api.dll' & '"', @ScriptDir, @SW_HIDE)
EndIf
If FileExists(@ScriptDir & '\valve_api64.dll') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\valve_api64.dll.bak' & '"', @ScriptDir, @SW_HIDE)
EndIf
If FileExists(@ScriptDir & '\steam_api64.dll.bak') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api64.dll.bak' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api64.dll.org') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api64.dll.org' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api64.bak') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api64.bak' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api64.org') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api64.org' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api64_orig.dll') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe &' ' & '"' & @ScriptDir & '\steam_api64_orig.dll' & '"', @ScriptDir, @SW_HIDE)
ElseIf FileExists(@ScriptDir & '\steam_api64_legit.dll') Then
RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe &' ' & '"' & @ScriptDir & '\steam_api64_legit.dll' & '"', @ScriptDir, @SW_HIDE)
#ElseIf FileExists(@ScriptDir & '\steam_api64.dll') Then
#RunWait($generate_interfaces_dst & '\' & $generate_interfaces_exe & ' ' & '"' & @ScriptDir & '\steam_api64.dll' & '"', @ScriptDir, @SW_HIDE)
EndIf
FileMove(@ScriptDir & '\steam_interfaces.txt', @ScriptDir & '\steam_settings\steam_interfaces.txt', 9)
FileCopy(@ScriptDir & '\steam_settings\steam_interfaces.txt', @ScriptDir & '\steam_settings\steam_interfaces.ini', 9)
$hFile=FileOpen(@ScriptDir & '\steam_settings\steam_interfaces.ini',0)
$sOld=FileRead($hFile)
FileClose($hFile)
$hFile=FileOpen(@ScriptDir & '\steam_settings\steam_interfaces.ini',2)
$sNew='[steam_interfaces]' & @CRLF & $sOld
FileWrite($hFile,$sNew)
FileClose($hFile)
$interfaces_ini = @ScriptDir & '\steam_settings\steam_interfaces.ini'
$codex_ini = @ScriptDir & '\steam_misc\extra_crk\CODEX\steam_emu.ini'
_AddInterfaces($codex_ini)
$rune_ini = @ScriptDir & '\steam_misc\extra_crk\RUNE\steam_emu.ini'
_AddInterfaces($rune_ini)
FileDelete($interfaces_ini)
Func _AddInterfaces($crack_ini)
If FileExists($crack_ini) Then
_ReplaceStringInFile($interfaces_ini, 'SteamAppDisableUpdate', 'SteamAppDisableUpdate=SteamAppDisableUpdate', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMAPPLIST_', 'SteamAppList=STEAMAPPLIST_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMAPPS_', 'SteamApps=STEAMAPPS_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMAPPTICKET_', 'SteamAppTicket=STEAMAPPTICKET_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamClient', 'SteamClient=SteamClient', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamController', 'SteamController=SteamController', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamFriends', 'SteamFriends=SteamFriends', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamGameCoordinator', 'SteamGameCoordinator=SteamGameCoordinator', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamGameServerStats', 'Steam_Game_Server_Stats=Steam_Game_Server_Stats', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamGameServer', 'SteamGameServer=SteamGameServer', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_Game_Server_Stats', 'SteamGameServerStats', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamGameStats', 'SteamGameStats=SteamGameStats', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMHTMLSURFACE_', 'SteamHTMLSurface=STEAMHTMLSURFACE_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMHTTP_', 'SteamHTTP=STEAMHTTP_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamInput', 'SteamInput=SteamInput', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMINVENTORY_', 'SteamInventory=STEAMINVENTORY_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamMasterServerUpdater', 'SteamMasterServerUpdater=SteamMasterServerUpdater', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamMatchGameSearch', 'SteamMatchGameSearch=SteamMatchGameSearch', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamMatchMakingServers', 'Steam_Match_Making_Servers=Steam_Match_Making_Servers', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamMatchMaking', 'SteamMatchMaking=SteamMatchMaking', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_Match_Making_Servers', 'SteamMatchMakingServers', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMMUSIC_', 'SteamMusic=STEAMMUSIC_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMMUSICREMOTE_', 'SteamMusicRemote=STEAMMUSICREMOTE_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamNetworkingMessages', 'Steam_Networking_Messages=Steam_Networking_Messages', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamNetworkingSocketsSerialized', 'Steam_Networking_Sockets_Serialized=Steam_Networking_Sockets_Serialized', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamNetworkingSockets', 'Steam_Networking_Sockets=Steam_Networking_Sockets', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamNetworkingUtils', 'Steam_Networking_Utils=Steam_Networking_Utils', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamNetworking', 'SteamNetworking=SteamNetworking', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_Networking_Messages', 'SteamNetworkingMessages', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_Networking_Sockets_Serialized', 'SteamNetworkingSocketsSerialized', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_Networking_Sockets', 'SteamNetworkingSockets', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_Networking_Utils', 'SteamNetworkingUtils', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMPARENTALSETTINGS_', 'SteamParentalSettings=STEAMPARENTALSETTINGS_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamParties', 'SteamParties=SteamParties', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMREMOTEPLAY_', 'SteamRemotePlay=STEAMREMOTEPLAY_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMREMOTESTORAGE_', 'SteamRemoteStorage=STEAMREMOTESTORAGE_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMSCREENSHOTS_', 'SteamScreenshots=STEAMSCREENSHOTS_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMTIMELINE_', 'SteamTimeline=STEAMTIMELINE_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMTV_', 'SteamTV=STEAMTV_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMUGC_', 'SteamUGC=STEAMUGC_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMUNIFIEDMESSAGES_', 'SteamUnifiedMessages=STEAMUNIFIEDMESSAGES_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMUSERSTATS_', 'Steam_User_Stats=STEAMUSERSTATS_', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamUser', 'SteamUser=SteamUser', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'Steam_User_Stats', 'SteamUserStats', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'SteamUtils', 'SteamUtils=SteamUtils', 1, 1)
_ReplaceStringInFile($interfaces_ini, 'STEAMVIDEO_', 'SteamVideo=STEAMVIDEO_', 1, 1)
IniWrite($crack_ini, 'Interfaces', 'SteamAppDisableUpdate', IniRead($interfaces_ini, 'steam_interfaces', 'SteamAppDisableUpdate', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamAppList', IniRead($interfaces_ini, 'steam_interfaces', 'SteamAppList', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamApps', IniRead($interfaces_ini, 'steam_interfaces', 'SteamApps', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamAppTicket', IniRead($interfaces_ini, 'steam_interfaces', 'SteamAppTicket', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamClient', IniRead($interfaces_ini, 'steam_interfaces', 'SteamClient', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamController', IniRead($interfaces_ini, 'steam_interfaces', 'SteamController', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamFriends', IniRead($interfaces_ini, 'steam_interfaces', 'SteamFriends', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamGameCoordinator', IniRead($interfaces_ini, 'steam_interfaces', 'SteamGameCoordinator', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamGameServerStats', IniRead($interfaces_ini, 'steam_interfaces', 'SteamGameServerStats', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamGameServer', IniRead($interfaces_ini, 'steam_interfaces', 'SteamGameServer', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamGameStats', IniRead($interfaces_ini, 'steam_interfaces', 'SteamGameStats', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamHTMLSurface', IniRead($interfaces_ini, 'steam_interfaces', 'SteamHTMLSurface', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamHTTP', IniRead($interfaces_ini, 'steam_interfaces', 'SteamHTTP', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamInput', IniRead($interfaces_ini, 'steam_interfaces', 'SteamInput', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamInventory', IniRead($interfaces_ini, 'steam_interfaces', 'SteamInventory', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamMasterServerUpdater', IniRead($interfaces_ini, 'steam_interfaces', 'SteamMasterServerUpdater', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamMatchGameSearch', IniRead($interfaces_ini, 'steam_interfaces', 'SteamMatchGameSearch', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamMatchMakingServers', IniRead($interfaces_ini, 'steam_interfaces', 'SteamMatchMakingServers', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamMatchMaking', IniRead($interfaces_ini, 'steam_interfaces', 'SteamMatchMaking', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamMusic', IniRead($interfaces_ini, 'steam_interfaces', 'SteamMusic', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamMusicRemote', IniRead($interfaces_ini, 'steam_interfaces', 'SteamMusicRemote', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamNetworkingMessages', IniRead($interfaces_ini, 'steam_interfaces', 'SteamNetworkingMessages', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamNetworkingSocketsSerialized', IniRead($interfaces_ini, 'steam_interfaces', 'SteamNetworkingSocketsSerialized', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamNetworkingSockets', IniRead($interfaces_ini, 'steam_interfaces', 'SteamNetworkingSockets', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamNetworkingUtils', IniRead($interfaces_ini, 'steam_interfaces', 'SteamNetworkingUtils', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamNetworking', IniRead($interfaces_ini, 'steam_interfaces', 'SteamNetworking', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamParentalSettings', IniRead($interfaces_ini, 'steam_interfaces', 'SteamParentalSettings', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamParties', IniRead($interfaces_ini, 'steam_interfaces', 'SteamParties', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamRemotePlay', IniRead($interfaces_ini, 'steam_interfaces', 'SteamRemotePlay', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamRemoteStorage', IniRead($interfaces_ini, 'steam_interfaces', 'SteamRemoteStorage', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamScreenshots', IniRead($interfaces_ini, 'steam_interfaces', 'SteamScreenshots', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamTimeline', IniRead($interfaces_ini, 'steam_interfaces', 'SteamTimeline', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamTV', IniRead($interfaces_ini, 'steam_interfaces', 'SteamTV', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamUGC', IniRead($interfaces_ini, 'steam_interfaces', 'SteamUGC', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamUnifiedMessages', IniRead($interfaces_ini, 'steam_interfaces', 'SteamUnifiedMessages', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamUserStats', IniRead($interfaces_ini, 'steam_interfaces', 'SteamUserStats', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamUser', IniRead($interfaces_ini, 'steam_interfaces', 'SteamUser', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamUtils', IniRead($interfaces_ini, 'steam_interfaces', 'SteamUtils', ''))
IniWrite($crack_ini, 'Interfaces', 'SteamVideo', IniRead($interfaces_ini, 'steam_interfaces', 'SteamVideo', ''))
EndIf
EndFunc

View File

@ -8,7 +8,7 @@
[overlay::general]
# 1=enable the experimental overlay, might cause crashes
# default=1
enable_experimental_overlay=1
enable_experimental_overlay=0
# amount of time to wait before attempting to detect and hook the renderer (DirectX, OpenGL, Vulkan, etc...)
# default=0
hook_delay_sec=0
@ -36,7 +36,7 @@ disable_warning_local_save=0
# by default the overlay will attempt to upload the achievements icons to the GPU
# so that they are displayed, in rare cases this might keep failing and cause FPS drop
# 0=prevent the overlay from attempting to upload the icons periodically,
# in that case achievements icons win't be displayed
# in that case achievements icons won't be displayed
# default=1
upload_achievements_icons_to_gpu=1

View File

@ -0,0 +1,103 @@
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
set /a "MAX_THREADS=2"
if defined NUMBER_OF_PROCESSORS (
:: use 70%
set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
)
set "ROOT=%cd%"
set "BUILD_DIR=..\..\..\build\win\vs2022"
set "OUT_DIR=..\build\package\win"
if not exist "%BUILD_DIR%\release\" (
1>&2 echo:release build target folder wasn't found
goto :end_script_with_err
)
if not exist "%BUILD_DIR%\debug\" (
1>&2 echo:debug build target folder wasn't found
goto :end_script_with_err
)
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
)
::::::::::::::::::::::::::::::::::::::::::
echo:// packing latest steam_api.dll for generate_emu_config
set "ACHIVE_DIR=..\_DEFAULT\0\steam_api"
if exist "%ACHIVE_DIR%\" (
rmdir /s /q "%ACHIVE_DIR%"
)
mkdir "..\_DEFAULT\0\steam_api\release"
mkdir "..\_DEFAULT\0\steam_api\debug"
set "TARGET_DIR=%BUILD_DIR%\release"
xcopy /y "%TARGET_DIR%\experimental\x32\steam_api.dll" "..\_DEFAULT\0\steam_api\release\steam_api.dll"*
xcopy /y "%TARGET_DIR%\experimental\x32\steam_api.dll" "..\_DEFAULT\0\steam_api.dll"*
set "TARGET_DIR=%BUILD_DIR%\debug"
xcopy /y "%TARGET_DIR%\experimental\x32\steam_api.dll" "..\_DEFAULT\0\steam_api\debug\steam_api.dll"*
rem xcopy /y "%TARGET_DIR%\experimental\x32\steam_api.dll" "..\_DEFAULT\0\steam_api.dll"* rem do not overwrite dll with debug version
set "ACHIVE_FILE=..\_DEFAULT\0\steam_api.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
)
call "%PKG_EXE%" a "%ACHIVE_FILE%" "%ACHIVE_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
)
rmdir /s /q "%ACHIVE_DIR%"
echo:// packing latest steam_api64.dll for generate_emu_config
set "ACHIVE_DIR=..\_DEFAULT\0\steam_api64"
if exist "%ACHIVE_DIR%\" (
rmdir /s /q "%ACHIVE_DIR%"
)
mkdir "..\_DEFAULT\0\steam_api64\release"
mkdir "..\_DEFAULT\0\steam_api64\debug"
set "TARGET_DIR=%BUILD_DIR%\release"
xcopy /y "%TARGET_DIR%\experimental\x64\steam_api64.dll" "..\_DEFAULT\0\steam_api64\release\steam_api64.dll"*
xcopy /y "%TARGET_DIR%\experimental\x64\steam_api64.dll" "..\_DEFAULT\0\steam_api64.dll"*
set "TARGET_DIR=%BUILD_DIR%\debug"
xcopy /y "%TARGET_DIR%\experimental\x64\steam_api64.dll" "..\_DEFAULT\0\steam_api64\debug\steam_api64.dll"*
rem xcopy /y "%TARGET_DIR%\experimental\x64\steam_api64.dll" "..\_DEFAULT\0\steam_api64.dll"* rem do not overwrite dll with debug version
set "ACHIVE_FILE=..\_DEFAULT\0\steam_api64.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
)
call "%PKG_EXE%" a "%ACHIVE_FILE%" "%ACHIVE_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
)
rmdir /s /q "%ACHIVE_DIR%"
::::::::::::::::::::::::::::::::::::::::::
goto :end_script
:end_script
endlocal
exit /b 0
:end_script_with_err
endlocal
exit /b 1

View File

@ -0,0 +1,95 @@
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
set /a "MAX_THREADS=2"
if defined NUMBER_OF_PROCESSORS (
:: use 70%
set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
)
set "ROOT=%cd%"
set "BUILD_DIR=..\..\..\build\win\vs2022"
set "OUT_DIR=..\build\package\win"
if not exist "%BUILD_DIR%\release\" (
1>&2 echo:release build target folder wasn't found
goto :end_script_with_err
)
if not exist "%BUILD_DIR%\debug\" (
1>&2 echo:debug build target folder wasn't found
goto :end_script_with_err
)
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
)
::::::::::::::::::::::::::::::::::::::::::
echo:// packing latest generate_interfaces.exe for generate_emu_config
set "ACHIVE_DIR=..\_DEFAULT\0\steam_misc\tools\generate_interfaces\generate_interfaces"
if exist "%ACHIVE_DIR%\" (
rmdir /s /q "%ACHIVE_DIR%"
)
mkdir "..\_DEFAULT\0\steam_misc\tools\generate_interfaces\generate_interfaces"
set "TARGET_DIR=%BUILD_DIR%\release"
xcopy /y "%TARGET_DIR%\tools\generate_interfaces\generate_interfaces_x32.exe" "..\_DEFAULT\0\steam_misc\tools\generate_interfaces\generate_interfaces\generate_interfaces.exe"*
xcopy /y "%TARGET_DIR%\tools\generate_interfaces\generate_interfaces_x64.exe" "..\_DEFAULT\0\steam_misc\tools\generate_interfaces\generate_interfaces\generate_interfaces64.exe"*
set "ACHIVE_FILE=..\_DEFAULT\0\steam_misc\tools\generate_interfaces\generate_interfaces.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
)
call "%PKG_EXE%" a "%ACHIVE_FILE%" "%ACHIVE_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
)
rmdir /s /q "%ACHIVE_DIR%"
echo:// packing latest lobby_connect.exe for generate_emu_config
set "ACHIVE_DIR=..\_DEFAULT\0\steam_misc\tools\lobby_connect\lobby_connect"
if exist "%ACHIVE_DIR%\" (
rmdir /s /q "%ACHIVE_DIR%"
)
mkdir "..\_DEFAULT\0\steam_misc\tools\lobby_connect\lobby_connect"
set "TARGET_DIR=%BUILD_DIR%\release"
xcopy /y "%TARGET_DIR%\tools\lobby_connect\lobby_connect_x32.exe" "..\_DEFAULT\0\steam_misc\tools\lobby_connect\lobby_connect\lobby_connect.exe"*
xcopy /y "%TARGET_DIR%\tools\lobby_connect\lobby_connect_x64.exe" "..\_DEFAULT\0\steam_misc\tools\lobby_connect\lobby_connect\lobby_connect64.exe"*
set "ACHIVE_FILE=..\_DEFAULT\0\steam_misc\tools\lobby_connect\lobby_connect.7z"
if exist "%ACHIVE_FILE%" (
del /f /q "%ACHIVE_FILE%"
)
call "%PKG_EXE%" a "%ACHIVE_FILE%" "%ACHIVE_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
)
rmdir /s /q "%ACHIVE_DIR%"
::::::::::::::::::::::::::::::::::::::::::
goto :end_script
:end_script
endlocal
exit /b 0
:end_script_with_err
endlocal
exit /b 1

View File

@ -1,5 +1,5 @@
@echo off
pip install -U steam[client]
pip install -U git+https://github.com/Sak32009/steam_py_fork.git@fix-cm-servers
pip install pyinstaller
pip install requests
pip install certifi

View File

@ -1,3 +1,3 @@
@echo off
set /p arg="Generate Emu Config for Steam AppId: "
python -W ignore::DeprecationWarning generate_emu_config.py -img -scr -vids_low -vids_max -scx -cdx -acw -clr -anon %arg%
python -W ignore::DeprecationWarning generate_emu_config.py -img -scr -vids_low -vids_max -scx -cdx -rne -acw -clr -anon %arg%

View File

@ -1,3 +1,3 @@
@echo off
set /p arg="Generate Emu Config for Steam AppId: "
python -W ignore::DeprecationWarning generate_emu_config.py -img -scr -vids_low -vids_max -scx -cdx -acw -clr %arg%
python -W ignore::DeprecationWarning generate_emu_config.py -img -scr -vids_low -vids_max -scx -cdx -rne -acw -clr %arg%

View File

@ -1,3 +1,3 @@
@echo off
set /p arg="Generate Emu Config for Steam AppId: "
python -W ignore::DeprecationWarning generate_emu_config.py -cdx -acw -clr %arg%
python -W ignore::DeprecationWarning generate_emu_config.py -cdx -rne -acw -clr %arg%

View File

@ -30,6 +30,8 @@ keymap_digital = {
}
def add_input_bindings(group, bindings, force_binding=None, keymap=keymap_digital):
if "inputs" not in group:
return bindings
for i in group["inputs"]:
for act in group["inputs"][i]:
for fp in group["inputs"][i][act]:

View File

@ -12,7 +12,7 @@ def __ClosestDictKey(targetKey : str, srcDict : dict[str, object] | set[str]) ->
return None
def __generate_ach_watcher_schema(lang: str, app_id: int, achs: list[dict]) -> list[dict]:
print(f"[ ] __ writing {lang} {app_id}.db to '.\\schema\\{lang}' folder")
print(f"[ ] __ writing {lang} {app_id}.db to <SCH_DIR>\\{lang} folder")
out_achs_list = []
for idx in range(len(achs)):
ach = copy.deepcopy(achs[idx])
@ -114,7 +114,7 @@ def generate_all_ach_watcher_schemas(
#print("[X] Couldn't generate Achievement Watcher schemas, no achievements found") # move notification to main script
return
else:
print(f"[ ] Generating Achievement Watcher schemas...")
print(f"[ ] Generating & packing Achievement Watcher schemas...")
#if app_exe:
# print(f"[ ] __ Detected app exe: '{app_exe}'") # move notification to main script
#else:
@ -163,7 +163,7 @@ def generate_all_ach_watcher_schemas(
print(f"[ ] __ Assuming english is the only supported language")
langs = ["english"]
print(f"[ ] __ schema = OUTPUT\\{appid}\\steam_misc\\achievement_watcher\\steam_cache\\schema")
print(f"[ ] __ <SCH_DIR> = <OUT_DIR>\\steam_misc\\extra_acw\\steam_cache\\schema")
for lang in langs:
out_schema_folder = os.path.join(ach_watcher_out_dir, lang)

View File

@ -340,14 +340,14 @@ def download_app_details(
time.sleep(0.1)
if not app_details:
print(f"[?] No app details found - skip creating 'app_details.json'")
print(f"[?] No app details found - skip creating <OUT_DIR>\\steam_misc\\app_info\\app_details.json")
#if last_exception: # skip showing last_exception
# print(f"[X] __ last error: {last_exception}")
return
with open(details_out_file, "wt", encoding='utf-8') as f:
json.dump(app_details, f, ensure_ascii=False, indent=2)
print(f"[ ] Found app details --- writing to 'app_details.json'") # move it here to avoid showing both 'downloading' and 'cannot download'
print(f"[ ] Found app details --- writing to <OUT_DIR>\\steam_misc\\app_info\\app_details.json") # move it here to avoid showing both 'downloading' and 'cannot download'
if download_screenshots:
__download_screenshots(base_out_dir, appid, app_details)

View File

@ -1,6 +1,9 @@
import os
from steam_id_converter.SteamID import (
SteamID
)
__codex_ini = '''
__codex_ini = r'''###
### ÜÛÛÛÛÛ Ü
### °ÛÛÛÛ ßÛÛ Û² ßßßÛÛÛÛÛÛÛÜ ßßßßßÛÛ²ÛÛÜ Ü²ÛÛÛß
### ±ÛÛÛß ±ÛÛß ßßÛÛÛÛ° ßÛÛÛ ±ÛÛÛß
@ -14,7 +17,7 @@ __codex_ini = '''
### ßßßÛÛ²ÜÜÜÜÜÛ²ÛÛÛ²ßß
###
###
### Game data is stored at %SystemDrive%\\Users\\Public\\Documents\\Steam\\CODEX\\{cdx_id}
### Game data is stored at %SystemDrive%\Users\Public\Documents\Steam\CODEX\{cdx_id}
###
[Settings]
@ -58,6 +61,7 @@ SelfProtect=0
###
### Steam Client API interface versions
###
SteamAppDisableUpdate=
SteamAppList=
SteamApps=
SteamAppTicket=
@ -133,11 +137,11 @@ def generate_cdx_ini(
dlc: list[tuple[int, str]],
achs: list[dict]) -> None:
if not os.path.exists(os.path.join(base_out_dir, "steam_misc\\extra_cdx")):
os.makedirs(os.path.join(base_out_dir, "steam_misc\\extra_cdx"))
if not os.path.exists(os.path.join(base_out_dir, "steam_misc\\extra_crk\\CODEX")):
os.makedirs(os.path.join(base_out_dir, "steam_misc\\extra_crk\\CODEX"))
codex_ini_path = os.path.join(base_out_dir, "steam_misc\\extra_cdx\\steam_emu.ini")
print(f"[ ] Generating RUNE / CODEX / PLAZA config --- writing 'steam_emu.ini'")
codex_ini_path = os.path.join(base_out_dir, "steam_misc\\extra_crk\\CODEX\\steam_emu.ini")
print(f"[ ] Generating CODEX config --- writing <OUT_DIR>\\steam_misc\\extra_crk\\CODEX\\steam_emu.ini")
print(f"[ ] __ if to be used, make sure it has the correct interface versions")
dlc_list = [f"{d[0]}={d[1]}" for d in dlc]
@ -162,10 +166,12 @@ def generate_cdx_ini(
achs_list.append(f'{ach["name"]} Achieved={icon}') # unlocked
achs_list.append(f'{ach["name"]} Unachieved={icon_gray}') # locked
steam_id = SteamID(accountid)
formatted_ini = __codex_ini.format(
cdx_id = appid,
cdx_username = username,
cdx_accountid = accountid,
cdx_accountid = steam_id.get_steam32_id(),
cdx_language = language,
cdx_dlc_list = "\n".join(dlc_list),
cdx_ach_list = "\n".join(achs_list)

View File

@ -0,0 +1,23 @@
import os
import urllib.request
# download PCGamingWiki page source code only
# to be parsed for additional game info, e.g. config and saved games files locations, extended developer and publisher info, etc
# not yet implemented in main script
def download_pcgw(base_out_dir : str, appid : int):
pcgw_link = f"https://www.pcgamingwiki.com/api/appid.php?appid={appid}"
if not os.path.exists(os.path.join(base_out_dir, 'steam_misc\\app_info')):
os.makedirs(os.path.join(base_out_dir, 'steam_misc\\app_info'))
with urllib.request.urlopen(pcgw_link) as f:
html = f.read().decode('utf-8')
file = os.path.join(base_out_dir, f"steam_misc\\app_info\\pcgw.tmp")
with open(file, 'w', encoding='utf-8') as f:
f.write(html)
if os.path.isfile(os.path.join(base_out_dir, 'steam_misc\\app_info\\pcgw.tmp')):
with open(os.path.join(base_out_dir, 'steam_misc\\app_info\\pcgw.tmp'), 'r', encoding='utf-8') as app_pcgw:
app_pcgw_line = app_pcgw.readlines()

View File

@ -0,0 +1,172 @@
import os
from steam_id_converter.SteamID import (
SteamID
)
__rune_ini = r'''###
### \ /
### _ _ _ _ \\__//
### ____ ._/______:_//\//_/____ _ //___ ./_ __//_____:_\\//
### :\ //_/ _ . /_/ / /_/__:_//_/ /\ /\__/_ _ . /\\\
### \\/// ____/___./ / / / / / / \X_/ //___/ /_\_
### . \/// _______ _/_ /_/ _/_/ \\/ // /_\_\ /.
### z_/ _/\ _/ // / // / \ /// __// :\//
### | / _ / /\// /__// __//_ _ /\ /X/ /__/ |/\/2
### --+-_=\__/ / / / \_____:__/ //\____// /\ /\/__:_______=_-+--\4
### |-\__\- / /________\____.__\/- -\--/_\/_______\--.\________\|___\
### = dS!\/- -\_______\ =-RUNE- -== \/ ==-\______\-= ======== --\__\
###
###
### Game data is stored at %SystemDrive%\Users\Public\Documents\Steam\RUNE\{rne_id}
###
[Settings]
###
### Game identifier (http://store.steampowered.com/app/{rne_id})
###
AppId={rne_id}
###
### Steam Account ID, set it to 0 to get a random Account ID
###
AccountId={rne_accountid}
###
### Name of the current player
###
UserName={rne_username}
###
### Language that will be used in the game
###
Language={rne_language}
###
### Enable lobby mode
###
LobbyEnabled=1
###
### Lobby port to listen on
###
#LobbyPort=31183
###
### Enable/Disable Steam overlay
###
Overlays=1
###
### Set Steam connection to offline mode
###
Offline=0
###
BlockConnection=0
###
[Interfaces]
###
### Steam Client API interface versions
###
SteamAppDisableUpdate=
SteamAppList=
SteamApps=
SteamAppTicket=
SteamClient=
SteamController=
SteamFriends=
SteamGameCoordinator=
SteamGameServerStats=
SteamGameServer=
SteamGameStats=
SteamHTMLSurface=
SteamHTTP=
SteamInput=
SteamInventory=
SteamMasterServerUpdater=
SteamMatchGameSearch=
SteamMatchMakingServers=
SteamMatchMaking=
SteamMusic=
SteamMusicRemote=
SteamNetworkingMessages=
SteamNetworkingSocketsSerialized=
SteamNetworkingSockets=
SteamNetworkingUtils=
SteamNetworking=
SteamParentalSettings=
SteamParties=
SteamRemotePlay=
SteamRemoteStorage=
SteamScreenshots=
SteamTimeline=
SteamTV=
SteamUGC=
SteamUnifiedMessages=
SteamUserStats=
SteamUser=
SteamUtils=
SteamVideo=
###
[DLC]
###
### Automatically unlock all DLCs
###
DLCUnlockall=0
###
### Identifiers for DLCs
###
#ID=Name
{rne_dlc_list}
###
[Crack]
7f508eddb6d6c0b1=3681a9beddbae875
'''
def generate_rne_ini(
base_out_dir : str,
appid: int,
accountid: int,
username: str,
language: str,
dlc: list[tuple[int, str]],
achs: list[dict]) -> None:
if not os.path.exists(os.path.join(base_out_dir, "steam_misc\\extra_crk\\RUNE")):
os.makedirs(os.path.join(base_out_dir, "steam_misc\\extra_crk\\RUNE"))
rune_ini_path = os.path.join(base_out_dir, "steam_misc\\extra_crk\\RUNE\\steam_emu.ini")
print(f"[ ] Generating RUNE config --- writing <OUT_DIR>\\steam_misc\\extra_crk\\RUNE\\steam_emu.ini")
print(f"[ ] __ if to be used, make sure it has the correct interface versions")
dlc_list = [f"{d[0]}={d[1]}" for d in dlc]
achs_list = []
for ach in achs:
icon = ach.get("icon", None)
if icon:
icon = f"steam_settings\\img\\{icon}"
else:
icon = 'steam_settings\\img\\steam_default_icon_unlocked.jpg'
icon_gray = ach.get("icon_gray", None)
if icon_gray:
icon_gray = f"steam_settings\\img\\{icon_gray}"
else:
icon_gray = 'steam_settings\\img\\steam_default_icon_locked.jpg'
icongray = ach.get("icongray", None)
if icongray:
icon_gray = f"steam_settings\\img\\{icongray}"
achs_list.append(f'{ach["name"]} Achieved={icon}') # unlocked
achs_list.append(f'{ach["name"]} Unachieved={icon_gray}') # locked
steam_id = SteamID(accountid)
formatted_ini = __rune_ini.format(
rne_id = appid,
rne_username = username,
rne_accountid = steam_id.get_steam32_id(),
rne_language = language,
rne_dlc_list = "\n".join(dlc_list),
rne_ach_list = "\n".join(achs_list)
)
with open(rune_ini_path, "wt", encoding='utf-8') as f:
f.writelines(formatted_ini)

Some files were not shown because too many files have changed in this diff Show More