Merge pull request #12 from Sak32009/dev

Updated third-party and libs deps + improved package_win_release.bat and build_win_premake.bat + added generate_credits.bat from SOURCE.txt files.
This commit is contained in:
Detanup01 2024-08-18 20:49:58 +02:00 committed by GitHub
commit c1a3856b20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 13740 additions and 4864 deletions

View File

@ -58,12 +58,12 @@ jobs:
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
### - 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)

1673
CREDITS.md

File diff suppressed because it is too large Load Diff

View File

@ -1,120 +1,117 @@
@echo off
setlocal
setlocal EnableDelayedExpansion
cd /d "%~dp0"
:: use 70%
set /a build_threads=2
set /a "MAX_THREADS=2"
if defined NUMBER_OF_PROCESSORS (
set /a build_threads=NUMBER_OF_PROCESSORS*70/100
)
if %build_threads% lss 1 (
set /a build_threads=1
:: use 70%
set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
)
set /a BUILD_DEPS=0
set /a "BUILD_DEPS=0"
:args_loop
if "%~1"=="" (
if "%~1" equ "" (
goto :args_loop_end
) else if "%~1"=="--deps" (
set /a BUILD_DEPS=1
) else if "%~1"=="--help" (
call :help_page
goto :end_script
) else if "%~1" equ "--deps" (
set /a "BUILD_DEPS=1"
) 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
)
shift /1
goto :args_loop
shift /1
goto :args_loop
:args_loop_end
set "premake_exe=third-party\common\win\premake\premake5.exe"
if not exist "%premake_exe%" (
1>&2 echo "preamke wasn't found"
:: check premake
set "PREMAKE_EXE=third-party\common\win\premake\premake5.exe"
if not exist "%PREMAKE_EXE%" (
1>&2 echo: premake wasn't found
goto :end_script_with_err
)
)
:: build deps
if %BUILD_DEPS%==0 (
goto :build_deps_end
)
set "CMAKE_GENERATOR=Visual Studio 17 2022"
call "%premake_exe%" --file="premake5-deps.lua" --all-ext --all-build --64-build --32-build --verbose --clean --os=windows vs2022
if %errorlevel% neq 0 (
:: build deps
if %BUILD_DEPS% equ 1 (
set "CMAKE_GENERATOR=Visual Studio 17 2022"
call "%PREMAKE_EXE%" --file="premake5-deps.lua" --64-build --32-build --all-ext --all-build --j=2 --verbose --clean --os=windows vs2022
if %errorlevel% neq 0 (
goto :end_script_with_err
)
:build_deps_end
)
goto :end_script
)
:: VS WHERE to get MSBUILD
set "vswhere_exe=third-party\common\win\vswhere\vswhere.exe"
if not exist "%vswhere_exe%" (
1>&2 echo "vswhere wasn't found"
:: check vswhere
set "VSWHERE_EXE=third-party\common\win\vswhere\vswhere.exe"
if not exist "%VSWHERE_EXE%" (
1>&2 echo: vswhere wasn't found
goto :end_script_with_err
)
)
:: .sln file
set "sln_file=build\project\vs2022\win\gbe.sln"
:: get msbuild path
set "my_vs_path="
for /f "tokens=* delims=" %%A in ('"%vswhere_exe%" -prerelease -latest -nocolor -nologo -property installationPath 2^>nul') do (
set "my_vs_path=%%~A\MSBuild\Current\Bin\MSBuild.exe"
)
if not exist "%my_vs_path%" (
1>&2 echo "MSBuild wasn't found"
:: check msbuild
set "MSBUILD_EXE="
for /f "tokens=* delims=" %%A in ('"%VSWHERE_EXE%" -prerelease -latest -nocolor -nologo -property installationPath 2^>nul') do (
set "MSBUILD_EXE=%%~A\MSBuild\Current\Bin\MSBuild.exe"
)
if not exist "%MSBUILD_EXE%" (
1>&2 echo: MSBuild wasn't found
goto :end_script_with_err
)
)
call "%premake_exe%" --file="premake5.lua" --dosstub --winrsrc --winsign --genproto --os=windows vs2022
if %errorlevel% neq 0 (
:: create .sln
call "%PREMAKE_EXE%" --file="premake5.lua" --genproto --dosstub --winrsrc --winsign --os=windows vs2022
if %errorlevel% neq 0 (
goto :end_script_with_err
)
if not exist "%sln_file%" (
1>&2 echo "project solution file wasn't found"
)
:: check .sln
set "SLN_FILE=build\project\vs2022\win\gbe.sln"
if not exist "%SLN_FILE%" (
1>&2 echo: .sln file wasn't found
goto :end_script_with_err
)
)
:: -v:n make it so we can actually see what commands it runs
echo: & echo building debug x64
call "%my_vs_path%" /nologo "%sln_file%" /p:Configuration=debug /p:Platform=x64 -v:n -m:%build_threads%
if %errorlevel% neq 0 (
:: build .sln
set "BUILD_TYPES=release debug"
set "BUILD_PLATFORMS=x64 Win32"
set "BUILD_TARGETS=api_regular api_experimental steamclient_experimental_stub steamclient_experimental steamclient_experimental_loader steamclient_experimental_extra lib_game_overlay_renderer tool_lobby_connect tool_generate_interfaces"
for %%A in (%BUILD_TYPES%) do (
set "BUILD_TYPE=%%A"
for %%B in (%BUILD_PLATFORMS%) do (
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 (
goto :end_script_with_err
)
)
)
)
)
echo: & echo building debug x32
call "%my_vs_path%" /nologo "%sln_file%" /p:Configuration=debug /p:Platform=Win32 -v:n -m:%build_threads%
if %errorlevel% neq 0 (
goto :end_script_with_err
)
goto :end_script
echo: & echo building release x64
call "%my_vs_path%" /nologo "%sln_file%" /p:Configuration=release /p:Platform=x64 -v:n -m:%build_threads%
if %errorlevel% neq 0 (
goto :end_script_with_err
)
echo: & echo building release x32
call "%my_vs_path%" /nologo "%sln_file%" /p:Configuration=release /p:Platform=Win32 -v:n -m:%build_threads%
if %errorlevel% neq 0 (
goto :end_script_with_err
)
:: if all ok
:: exit without error
:end_script
endlocal
exit /b 0
endlocal
exit /b 0
:: exit with error
:end_script_with_err
endlocal
exit /b 1
endlocal
exit /b 1
:: show help page
:help_page
echo:
echo "%~nx0" [switches]
echo switches:
echo --deps: rebuild third-party dependencies
echo --help: show this page
exit /b 0
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" --deps

View File

@ -23,6 +23,7 @@
#define STBI_ONLY_JPEG
#if defined(__WINDOWS__)
#define STBI_WINDOWS_UTF8
#define STBIW_WINDOWS_UTF8
#endif
#include "stb/stb_image.h"
@ -31,7 +32,7 @@
#include "stb/stb_image_write.h"
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "stb/stb_image_resize.h"
#include "stb/stb_image_resize2.h"
struct File_Data {
std::string name{};
@ -882,13 +883,13 @@ std::string Local_Storage::load_image_resized(std::string const& image_path, std
PRINT_DEBUG("stbi_load('%s') -> %s", image_path.c_str(), (img ? "loaded" : stbi_failure_reason()));
if (img) {
std::vector<char> out_resized(resized_img_size);
stbir_resize_uint8(img, width, height, 0, (unsigned char*)&out_resized[0], resolution, resolution, 0, 4);
stbir_resize_uint8_linear(img, width, height, 0, (unsigned char*)&out_resized[0], resolution, resolution, 0, STBIR_RGBA);
resized_image = std::string((char*)&out_resized[0], out_resized.size());
stbi_image_free(img);
}
} else if (image_data.size()) {
std::vector<char> out_resized(resized_img_size);
stbir_resize_uint8((unsigned char*)image_data.c_str(), 184, 184, 0, (unsigned char*)&out_resized[0], resolution, resolution, 0, 4);
stbir_resize_uint8_linear((unsigned char*)image_data.c_str(), 184, 184, 0, (unsigned char*)&out_resized[0], resolution, resolution, 0, STBIR_RGBA);
resized_image = std::string((char*)&out_resized[0], out_resized.size());
}

26
generate_credits.bat Normal file
View File

@ -0,0 +1,26 @@
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
set "CREDITS_FILE=CREDITS.md"
if exist "%CREDITS_FILE%" (
del /f /s /q "%CREDITS_FILE%"
)
set "GLOB=third-party libs tools\steamclient_loader"
set "FILTER=SOURCE.txt"
echo:# Many thanks for these sources>> "%CREDITS_FILE%"
for %%A in (%GLOB%) do (
powershell -Command "Get-ChildItem -LiteralPath \"%%~A\" -Filter \"%FILTER%\" -File -Recurse | foreach { $parent = Split-Path -Path $_.FullName -Parent; $relative = (Resolve-Path -Path $parent -Relative).replace(\".\\\",\"\"); Write-Output \"- ^[$^($relative^)^]^(#$^($relative^)^)\"; }">> "%CREDITS_FILE%"
)
echo.>> "%CREDITS_FILE%"
for %%B in (%GLOB%) do (
powershell -Command "Get-ChildItem -LiteralPath \"%%~B\" -Filter \"%FILTER%\" -File -Recurse | foreach { $parent = Split-Path -Path $_.FullName -Parent; $relative = (Resolve-Path -Path $parent -Relative).replace(\".\\\",\"\"); Write-Output \"### $^($relative^)\"; Write-Output \"\"; Get-Content -LiteralPath $_.FullName -Raw -Encoding utf8; }">> "%CREDITS_FILE%"
)
endlocal

View File

@ -1,23 +0,0 @@
# Copyright (c) Microsoft Corporation
All rights reserved.
# MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,3 +1,9 @@
============================================================================ INFO
https://github.com/microsoft/Detours
VERSION: https://github.com/microsoft/Detours/tree/4b8c659f549b0ab21cf649377c7a84eb708f5e68
============================================================================ LICENSE
Copyright (c) Microsoft Corporation.
MIT License

View File

@ -1395,6 +1395,12 @@ PVOID WINAPI DetourAllocateRegionWithinJumpBounds(_In_ LPCVOID pbTarget,
return pbNewlyAllocated;
}
BOOL WINAPI DetourIsFunctionImported(_In_ PBYTE pbCode,
_In_ PBYTE pbAddress)
{
return detour_is_imported(pbCode, pbAddress);
}
static PDETOUR_TRAMPOLINE detour_alloc_trampoline(PBYTE pbTarget)
{
// We have to place trampolines within +/- 2GB of target.
@ -1437,7 +1443,8 @@ static PDETOUR_TRAMPOLINE detour_alloc_trampoline(PBYTE pbTarget)
// We need to allocate a new region.
// Round pbTarget down to 64KB block.
pbTarget = pbTarget - (PtrToUlong(pbTarget) & 0xffff);
// /RTCc RuntimeChecks breaks PtrToUlong.
pbTarget = pbTarget - (ULONG)((ULONG_PTR)pbTarget & 0xffff);
PVOID pbNewlyAllocated =
detour_alloc_trampoline_allocate_new(pbTarget, pLo, pHi);
@ -2098,6 +2105,12 @@ LONG WINAPI DetourAttachEx(_Inout_ PVOID *ppPointer,
delete o;
o = NULL;
}
if (ppRealDetour != NULL) {
*ppRealDetour = NULL;
}
if (ppRealTarget != NULL) {
*ppRealTarget = NULL;
}
s_ppPendingError = ppPointer;
return error;
}

View File

@ -56,6 +56,7 @@
#define __try
#define __except(x) if (0)
#include <strsafe.h>
#include <intsafe.h>
#endif
// From winerror.h, as this error isn't found in some SDKs:
@ -382,6 +383,10 @@ extern const GUID DETOUR_EXE_HELPER_GUID;
#define DETOUR_TRAMPOLINE_SIGNATURE 0x21727444 // Dtr!
typedef struct _DETOUR_TRAMPOLINE DETOUR_TRAMPOLINE, *PDETOUR_TRAMPOLINE;
#ifndef DETOUR_MAX_SUPPORTED_IMAGE_SECTION_HEADERS
#define DETOUR_MAX_SUPPORTED_IMAGE_SECTION_HEADERS 32
#endif // !DETOUR_MAX_SUPPORTED_IMAGE_SECTION_HEADERS
/////////////////////////////////////////////////////////// Binary Structures.
//
#pragma pack(push, 8)
@ -453,9 +458,9 @@ typedef struct _DETOUR_EXE_RESTORE
#endif
#ifdef IMAGE_NT_OPTIONAL_HDR64_MAGIC // some environments do not have this
BYTE raw[sizeof(IMAGE_NT_HEADERS64) +
sizeof(IMAGE_SECTION_HEADER) * 32];
sizeof(IMAGE_SECTION_HEADER) * DETOUR_MAX_SUPPORTED_IMAGE_SECTION_HEADERS];
#else
BYTE raw[0x108 + sizeof(IMAGE_SECTION_HEADER) * 32];
BYTE raw[0x108 + sizeof(IMAGE_SECTION_HEADER) * DETOUR_MAX_SUPPORTED_IMAGE_SECTION_HEADERS];
#endif
};
DETOUR_CLR_HEADER clr;
@ -590,6 +595,8 @@ BOOL WINAPI DetourSetCodeModule(_In_ HMODULE hModule,
_In_ BOOL fLimitReferencesToModule);
PVOID WINAPI DetourAllocateRegionWithinJumpBounds(_In_ LPCVOID pbTarget,
_Out_ PDWORD pcbAllocatedSize);
BOOL WINAPI DetourIsFunctionImported(_In_ PBYTE pbCode,
_In_ PBYTE pbAddress);
///////////////////////////////////////////////////// Loaded Binary Functions.
//
@ -951,10 +958,10 @@ typedef DWORD (NTAPI *PF_SymSetOptions)(_In_ DWORD SymOptions);
typedef DWORD (NTAPI *PF_SymGetOptions)(VOID);
typedef DWORD64 (NTAPI *PF_SymLoadModule64)(_In_ HANDLE hProcess,
_In_opt_ HANDLE hFile,
_In_ LPSTR ImageName,
_In_opt_ LPSTR ImageName,
_In_opt_ LPSTR ModuleName,
_In_ DWORD64 BaseOfDll,
_In_opt_ DWORD SizeOfDll);
_In_ DWORD SizeOfDll);
typedef BOOL (NTAPI *PF_SymGetModuleInfo64)(_In_ HANDLE hProcess,
_In_ DWORD64 qwAddr,
_Out_ PIMAGEHLP_MODULE64 ModuleInfo);

View File

@ -279,7 +279,7 @@ class CDetourDis
PBYTE CopyVex2(REFCOPYENTRY pEntry, PBYTE pbDst, PBYTE pbSrc);
PBYTE CopyVex3(REFCOPYENTRY pEntry, PBYTE pbDst, PBYTE pbSrc);
PBYTE CopyVexCommon(BYTE m, PBYTE pbDst, PBYTE pbSrc);
PBYTE CopyVexEvexCommon(BYTE m, PBYTE pbDst, PBYTE pbSrc, BYTE p);
PBYTE CopyVexEvexCommon(BYTE m, PBYTE pbDst, PBYTE pbSrc, BYTE p, BYTE fp16 = 0);
PBYTE CopyEvex(REFCOPYENTRY pEntry, PBYTE pbDst, PBYTE pbSrc);
PBYTE CopyXop(REFCOPYENTRY pEntry, PBYTE pbDst, PBYTE pbSrc);
@ -745,7 +745,7 @@ PBYTE CDetourDis::CopyFF(REFCOPYENTRY pEntry, PBYTE pbDst, PBYTE pbSrc)
return pbOut;
}
PBYTE CDetourDis::CopyVexEvexCommon(BYTE m, PBYTE pbDst, PBYTE pbSrc, BYTE p)
PBYTE CDetourDis::CopyVexEvexCommon(BYTE m, PBYTE pbDst, PBYTE pbSrc, BYTE p, BYTE fp16)
// m is first instead of last in the hopes of pbDst/pbSrc being
// passed along efficiently in the registers they were already in.
{
@ -762,10 +762,13 @@ PBYTE CDetourDis::CopyVexEvexCommon(BYTE m, PBYTE pbDst, PBYTE pbSrc, BYTE p)
REFCOPYENTRY pEntry;
switch (m) {
// see https://software.intel.com/content/www/us/en/develop/download/intel-avx512-fp16-architecture-specification.html
switch (m | fp16) {
default: return Invalid(&ceInvalid, pbDst, pbSrc);
case 1: pEntry = &s_rceCopyTable0F[pbSrc[0]];
return (this->*pEntry->pfCopy)(pEntry, pbDst, pbSrc);
case 5: // fallthrough
case 6: // fallthrough
case 2: return CopyBytes(&ceF38, pbDst, pbSrc);
case 3: return CopyBytes(&ceF3A, pbDst, pbSrc);
}
@ -859,7 +862,9 @@ PBYTE CDetourDis::CopyEvex(REFCOPYENTRY, PBYTE pbDst, PBYTE pbSrc)
static const COPYENTRY ceInvalid = /* 62 */ ENTRY_Invalid;
if ((p0 & 0x0C) != 0)
// This could also be handled by default in CopyVexEvexCommon
// if 4u changed to 4|8.
if (p0 & 8u)
return Invalid(&ceInvalid, pbDst, pbSrc);
BYTE const p1 = pbSrc[2];
@ -876,7 +881,7 @@ PBYTE CDetourDis::CopyEvex(REFCOPYENTRY, PBYTE pbDst, PBYTE pbSrc)
m_bRaxOverride |= !!(p1 & 0x80); // w
#endif
return CopyVexEvexCommon(p0 & 3u, pbDst + 4, pbSrc + 4, p1 & 3u);
return CopyVexEvexCommon(p0 & 3u, pbDst + 4, pbSrc + 4, p1 & 3u, p0 & 4u);
}
PBYTE CDetourDis::CopyXop(REFCOPYENTRY, PBYTE pbDst, PBYTE pbSrc)

27
libs/fifo_map/SOURCE.txt Normal file
View File

@ -0,0 +1,27 @@
============================================================================ INFO
https://github.com/nlohmann/fifo_map
VERSION: https://github.com/nlohmann/fifo_map/tree/d732aaf9a315415ae8fd7eb11e3a4c1f80e42a48
============================================================================ LICENSE
MIT License
Copyright (c) 2015-2017 Niels Lohmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

26
libs/gamepad/SOURCE.txt Normal file
View File

@ -0,0 +1,26 @@
============================================================================ INFO
https://github.com/mtwilliams/libgamepad
VERSION: ????
============================================================================ LICENSE
Copyright (c) 2014 Michael Williams
Copyright (c) 2010-2011 Sean Middleditch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,6 +1,12 @@
MIT License
============================================================================ INFO
https://github.com/ocornut/imgui
Copyright (c) 2015-2017 Niels Lohmann
VERSION: ????
============================================================================ LICENSE
The MIT License (MIT)
Copyright (c) 2014-2024 Omar Cornut
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,3 +1,9 @@
============================================================================ INFO
https://github.com/nlohmann/json
VERSION: https://github.com/nlohmann/json/releases/tag/v3.11.3
============================================================================ LICENSE
MIT License
Copyright (c) 2013-2022 Niels Lohmann

View File

@ -1 +1,7 @@
============================================================================ INFO
https://github.com/vog/sha1
VERSION: https://github.com/vog/sha1/tree/3f8a4aa032d144309d00dbfe972906a49b3631b9
============================================================================ LICENSE
PUBLIC DOMAIN

View File

@ -1,3 +1,9 @@
============================================================================ INFO
https://github.com/brofield/simpleini
VERSION: https://github.com/brofield/simpleini/releases/tag/v4.22
============================================================================ LICENSE
The MIT License (MIT)
Copyright (c) 2006-2022 Brodie Thiesfield

View File

@ -1,3 +1,9 @@
============================================================================ INFO
https://github.com/nothings/stb
VERSION: https://github.com/nothings/stb/tree/f75e8d1cad7d90d72ef7a4661f1b994ef78b4e31
============================================================================ LICENSE
This software is available under 2 licenses -- choose whichever you prefer.
------------------------------------------------------------------------------
ALTERNATIVE A - MIT License

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

10572
libs/stb/stb_image_resize2.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,9 @@
============================================================================ INFO
https://github.com/nemtrif/utfcpp
VERSION: https://github.com/nemtrif/utfcpp/releases/tag/v4.0.5
============================================================================ LICENSE
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization

View File

@ -1,87 +1,106 @@
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
setlocal
pushd "%~dp0"
set /a last_code=0
set "build_base_dir=build\win"
set "out_dir=build\package\win"
set /a MEM_PERCENT=90
set /a DICT_SIZE_MB=384
set "packager=third-party\deps\win\7za\7za.exe"
:: use 70%
set /a THREAD_COUNT=2
set /a "MAX_THREADS=2"
if defined NUMBER_OF_PROCESSORS (
set /a THREAD_COUNT=NUMBER_OF_PROCESSORS*70/100
)
if %THREAD_COUNT% lss 2 (
set /a THREAD_COUNT=2
:: use 70%
set /a "MAX_THREADS=%NUMBER_OF_PROCESSORS% * 70 / 100"
if %MAX_THREADS% lss 1 (
set /a "MAX_THREADS=1"
)
)
if not exist "%packager%" (
1>&2 echo [X] packager app wasn't found
set /a last_code=1
goto :script_end
set "BUILD_DIR=build\win"
set "OUT_DIR=build\package\win"
if "%~1" equ "" (
1>&2 echo: missing build target folder arg
goto :end_script_with_err
)
if "%~1"=="" (
1>&2 echo [X] missing build folder
set /a last_code=1
goto :script_end
set "TARGET_DIR=%BUILD_DIR%\%~1"
if not exist "%TARGET_DIR%\" (
1>&2 echo: build target folder wasn't found
goto :end_script_with_err
)
set "target_src_dir=%build_base_dir%\%~1"
if not exist "%target_src_dir%" (
1>&2 echo [X] build folder wasn't found
set /a last_code=1
goto :script_end
set /a "BUILD_DEBUG=0"
if "%~2" equ "1" (
set /a "BUILD_DEBUG=1"
)
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 // copying readmes + example files
xcopy /y /s /e /r "post_build\steam_settings.EXAMPLE\" "%target_src_dir%\steam_settings.EXAMPLE\"
copy /y "post_build\README.release.md" "%target_src_dir%\"
copy /y "CHANGELOG.md" "%target_src_dir%\"
copy /y "CREDITS.md" "%target_src_dir%\"
if "%~2"=="1" (
copy /y "post_build\README.debug.md" "%target_src_dir%\"
echo: // copying readmes + example files
xcopy /y /s /e /r "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%\"
if %BUILD_DEBUG% equ 1 (
copy /y "post_build\README.debug.md" "%TARGET_DIR%\"
)
if exist "%target_src_dir%\experimental\" (
copy /y "post_build\README.experimental.md" "%target_src_dir%\experimental\"
if exist "%TARGET_DIR%\experimental\" (
copy /y "post_build\README.experimental.md" "%TARGET_DIR%\experimental\"
)
if exist "%target_src_dir%\steamclient_experimental\" (
xcopy /y /s /e /r "post_build\win\ColdClientLoader.EXAMPLE\" "%target_src_dir%\steamclient_experimental\dll_injection.EXAMPLE\"
copy /y "post_build\README.experimental_steamclient.md" "%target_src_dir%\steamclient_experimental\"
copy /y "tools\steamclient_loader\win\ColdClientLoader.ini" "%target_src_dir%\steamclient_experimental\"
if exist "%TARGET_DIR%\steamclient_experimental\" (
xcopy /y /s /e /r "post_build\win\ColdClientLoader.EXAMPLE\" "%TARGET_DIR%\steamclient_experimental\dll_injection.EXAMPLE\"
copy /y "post_build\README.experimental_steamclient.md" "%TARGET_DIR%\steamclient_experimental\"
copy /y "tools\steamclient_loader\win\ColdClientLoader.ini" "%TARGET_DIR%\steamclient_experimental\"
)
if exist "%target_src_dir%\tools\generate_interfaces\" (
copy /y "post_build\README.generate_interfaces.md" "%target_src_dir%\tools\generate_interfaces\"
if exist "%TARGET_DIR%\tools\generate_interfaces\" (
copy /y "post_build\README.generate_interfaces.md" "%TARGET_DIR%\tools\generate_interfaces\"
)
if exist "%target_src_dir%\tools\lobby_connect\" (
copy /y "post_build\README.lobby_connect.md" "%target_src_dir%\tools\lobby_connect\"
if exist "%TARGET_DIR%\tools\lobby_connect\" (
copy /y "post_build\README.lobby_connect.md" "%TARGET_DIR%\tools\lobby_connect\"
)
::::::::::::::::::::::::::::::::::::::::::
set "archive_dir=%out_dir%\%~1"
if exist "%archive_dir%\" (
rmdir /s /q "%archive_dir%"
)
set "archive_file="
for %%A in ("%archive_dir%") do (
set "archive_file=%%~dpAemu-win-%%~nxA.7z"
set "ACHIVE_DIR=%OUT_DIR%\%~1"
if exist "%ACHIVE_DIR%\" (
rmdir /s /q "%ACHIVE_DIR%"
)
for %%A in ("%archive_dir%") do (
mkdir "%%~dpA"
for %%A in ("%ACHIVE_DIR%") do (
md "%%~dpA"
)
"%packager%" a "%archive_file%" ".\%target_src_dir%" -t7z -slp -ssw -mx -myx -mmemuse=p%MEM_PERCENT% -ms=on -mqs=off -mf=on -mhc+ -mhe- -m0=LZMA2:d=%DICT_SIZE_MB%m -mmt=%THREAD_COUNT% -mmtf+ -mtm- -mtc- -mta- -mtr+
:script_end
popd
endlocal & (
exit /b %last_code%
set "ACHIVE_FILE="
for %%A in ("%ACHIVE_DIR%") do (
set "ACHIVE_FILE=%%~dpAemu-win-%%~nxA.7z"
)
if exist "%ACHIVE_FILE%" (
del /f /s /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 (
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

3
package_win_debug.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
call "package_win.bat" vs2022/debug 1

3
package_win_release.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
call "package_win.bat" vs2022/release

@ -1 +1 @@
Subproject commit 07336fafed51cccbb1438bf32f90bb0d20634529
Subproject commit 89d0bbf43221dc758efa56f988cb0f0a34b84342

@ -1 +1 @@
Subproject commit ecaee3fbfc14352b79609bc781db4881b150bd42
Subproject commit b4194b9019386d456031a9a0fd6b63a867ab0108

@ -1 +1 @@
Subproject commit b7761d06842f7799a653f61a4d29f382b9873053
Subproject commit a70c58d93377d1a472d9320842183bc533d87e5d

@ -1 +1 @@
Subproject commit 1c1acc03760113ce5a440f46bc89c6832c695f8f
Subproject commit 22197753b2a01b5097610f4c62f6c9f7eb1e27d2

@ -1 +1 @@
Subproject commit 6cb47a3e46e49b03be7b9c0e9b3d7c5953cf038a
Subproject commit be07085cc615800304acf619fcc9f4b6107c0574

@ -1 +1 @@
Subproject commit 6eb71e5e7aa0f1ead9e7d0d10c6b9efb14566b26
Subproject commit 3171da4672b2f10a06edfed6e54e5999872f1b22

View File

@ -0,0 +1,4 @@
============================================================================ INFO
https://github.com/Rat431/ColdAPI_Steam
Original version of ColdClientLoader by Rat431.