mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-14 04:13:52 +02:00
check for env var with fallback
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
@echo off
|
||||
setlocal
|
||||
set ZIP_BIN="C:\Program Files\7-Zip\7z.exe"
|
||||
where /q 7z
|
||||
IF ERRORLEVEL 1 (
|
||||
set ZIP_BIN="C:\Program Files\7-Zip\7z.exe"
|
||||
) ELSE (
|
||||
set ZIP_BIN=7z
|
||||
)
|
||||
cd /d %~dp0
|
||||
msbuild -t:restore -p:RestorePackagesConfig=true
|
||||
msbuild VRCX.sln /p:Configuration=Release /p:Platform=x64 -m
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
@echo off
|
||||
setlocal
|
||||
where /q 7z
|
||||
IF ERRORLEVEL 1 (
|
||||
set ZIP_BIN="C:\Program Files\7-Zip\7z.exe"
|
||||
) ELSE (
|
||||
set ZIP_BIN=7z
|
||||
)
|
||||
for /f %%a in ('powershell -Command "Get-Date -format yyyyMMdd"') do set TODAY=%%a
|
||||
set ZIP_NAME=VRCX_%TODAY%.zip
|
||||
echo %ZIP_NAME%
|
||||
rem using 7-Zip (https://www.7-zip.org)
|
||||
cd "%~dp0\bin\x64\Release"
|
||||
"C:\Program Files\7-Zip\7z.exe" a -tzip %ZIP_NAME% * -mx=7 -xr0!cache -xr0!userdata -xr0!*.log -xr0!VRCX.json -xr0!VRCX.sqlite3
|
||||
%ZIP_BIN% a -tzip %ZIP_NAME% * -mx=7 -xr0!cache -xr0!userdata -xr0!*.log -xr0!VRCX.json -xr0!VRCX.sqlite3
|
||||
cd "%~dp0"
|
||||
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
|
||||
pause
|
||||
|
||||
Reference in New Issue
Block a user