Don't switch build environment in one file

This commit is contained in:
Gerhard Tan
2025-06-05 16:53:24 +00:00
committed by GitHub
parent 5be9cca700
commit aa0481df98
2 changed files with 16 additions and 12 deletions

View File

@ -26,7 +26,8 @@ if "%~1" == "-p" goto :success
:installer
echo [+] Building installer
call installer\build.bat %VERSION% || goto :error
call installer\build.bat %VERSION% x64 || goto :error
call installer\build.bat %VERSION% x86 || goto :error
:success
echo [+] Success

View File

@ -1,7 +1,8 @@
@echo off
setlocal enabledelayedexpansion
set VERSION=%~1
set STEP="%~2"
set ARCH=%~2
set STEP="%~3"
set BUILDDIR=%~dp0
set RESx64=pe-x86-64
set RESx86=pe-i386
@ -12,6 +13,11 @@ if "%VERSION%" == "" (
exit /b 1
)
if "%ARCH%" == "" (
echo ERROR: no architecture provided.
exit /b 1
)
if not defined WIX (
echo ERROR: WIX was not found.
exit /b 1
@ -19,16 +25,13 @@ if not defined WIX (
:build
if not exist build md build
for %%a in (x64 x86) do (
set ARCH=%%a
call vcvarsall.bat !ARCH!
set PLAT_DIR=build\!ARCH!
if not exist !PLAT_DIR! md !PLAT_DIR!
set MSI_FILE=!PLAT_DIR!\frpmgr-%VERSION%.msi
if %STEP:"actions"=""% == "" call :build_actions || goto :error
if %STEP:"msi"=""% == "" call :build_msi || goto :error
if %STEP:"package"=""% == "" call :build_package || goto :error
)
call vcvarsall.bat %ARCH%
set PLAT_DIR=build\%ARCH%
if not exist %PLAT_DIR% md %PLAT_DIR%
set MSI_FILE=%PLAT_DIR%\frpmgr-%VERSION%.msi
if %STEP:"actions"=""% == "" call :build_actions || goto :error
if %STEP:"msi"=""% == "" call :build_msi || goto :error
if %STEP:"package"=""% == "" call :build_package || goto :error
:success
exit /b 0