diff --git a/build-7z.cmd b/build-7z.cmd new file mode 100644 index 00000000..42b63219 --- /dev/null +++ b/build-7z.cmd @@ -0,0 +1,21 @@ +@echo off +set ZIP_BIN="C:\Program Files\7-Zip\7z.exe" +cd /d %~dp0 +msbuild -t:restore -p:RestorePackagesConfig=true +msbuild VRCX.sln /p:Configuration=Release /p:Platform=x64 -m +cd html +call npm ci +call npm run production +cd .. +mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist" +setlocal +set TODAY=%DATE:~0,4%%DATE:~5,2%%DATE:~8,2% +set ZIP_NAME=VRCX_%TODAY%.zip +echo %ZIP_NAME% +rem using 7-Zip (https://www.7-zip.org) +cd "%~dp0\bin\x64\Release" +%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" +rd "%~dp0\bin\x64\Release\html" +pause diff --git a/build-node.js.cmd b/build-node.js.cmd index 6051aa67..48579101 100644 --- a/build-node.js.cmd +++ b/build-node.js.cmd @@ -1,4 +1,5 @@ cd html call npm ci call npm run production +cd .. pause diff --git a/build.cmd b/build.cmd new file mode 100644 index 00000000..915088f9 --- /dev/null +++ b/build.cmd @@ -0,0 +1,20 @@ +@echo off +cd /d %~dp0 +msbuild -t:restore -p:RestorePackagesConfig=true +msbuild VRCX.sln /p:Configuration=Release /p:Platform=x64 -m +cd html +call npm ci +call npm run production +cd .. +mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist" +setlocal +set TODAY=%DATE:~0,4%%DATE:~5,2%%DATE:~8,2% +set ZIP_NAME=VRCX_%TODAY%.zip +echo %ZIP_NAME% +rem using bandizip (https://www.bandisoft.com/bandizip) +cd "%~dp0\bin\x64\Release" +bz c -l:9 -r -storeroot:yes -ex:"cache;userdata;*.log;VRCX.json;VRCX.sqlite3" -cmt:"https://github.com/pypy-vrc/VRCX" %ZIP_NAME% * +cd "%~dp0" +move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0" +rd "%~dp0\bin\x64\Release\html" +pause