gse/tools/migrate_gse/rebuild_win.bat
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

57 lines
1.3 KiB
Batchfile

@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
set "ROOT=%cd%"
set "VENV=%ROOT%\.env-win"
set "OUT_DIR=%ROOT%\bin\win"
set "BUILD_TEMP_DIR=%ROOT%\bin\tmp\win"
set /a "LAST_ERR_CODE=0"
set "SIGNER_TOOL=..\..\third-party\build\win\cert\sign_helper.bat"
if not exist "%SIGNER_TOOL%" (
1>&2 echo:signing tool wasn't found
set /a "LAST_ERR_CODE=1"
goto :end_script
)
if exist "%OUT_DIR%" (
rmdir /s /q "%OUT_DIR%"
)
mkdir "%OUT_DIR%"
if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%BUILD_TEMP_DIR%"
)
call "%VENV%\Scripts\activate.bat"
echo:building migrate_gse...
pyinstaller "main.py" --distpath "%OUT_DIR%" -y --clean --onedir --name "migrate_gse" --noupx --console -i "NONE" --workpath "%BUILD_TEMP_DIR%" --specpath "%BUILD_TEMP_DIR%" || (
set /a "LAST_ERR_CODE=1"
goto :end_script
)
call "%SIGNER_TOOL%" "%OUT_DIR%\migrate_gse\migrate_gse.exe"
call ".\bat\_pack_api.bat"
call ".\bat\_pack_exe.bat"
xcopy /s /y /e "post_build" "%out_dir%\migrate_gse\"
xcopy /s /y /e "_DEFAULT" "%out_dir%\migrate_gse\_DEFAULT\"
copy /y "README.md" "%out_dir%\migrate_gse\"
echo:
echo:=============
echo:Built inside: "%OUT_DIR%\"
goto :end_script
:end_script
if exist "%BUILD_TEMP_DIR%" (
rmdir /s /q "%BUILD_TEMP_DIR%"
)
endlocal
exit /b %LAST_ERR_CODE%