mirror of
https://github.com/koho/frpmgr.git
synced 2025-10-20 16:03:47 +08:00
Don't switch build environment in one file
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user