Update build scripts

This commit is contained in:
Natsumi
2021-08-05 00:38:55 +12:00
parent f953fadcb7
commit e8a64af18c
5 changed files with 41 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ 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
%ZIP_BIN% a -tzip %ZIP_NAME% * -mx=7 -xr0!cache -xr0!userdata -xr0!*.log -xr0!*.json -xr0!*.sqlite3 -xr0!*.pdb -xr0!*.config
cd "%~dp0"
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
rd "%~dp0\bin\x64\Release\html"

37
build-all.ps1 Normal file
View File

@@ -0,0 +1,37 @@
$ErrorActionPreference = "Stop"
$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath
Import-Module (Join-Path $installPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation
$Date = Get-Date -format yyyyMMdd
$ZipName = "VRCX_" + $Date + ".zip"
$SetupName = "VRCX_" + $Date + "_Setup.exe"
Write-Host "Building .Net..." -ForegroundColor Green
msbuild VRCX.sln /p:Configuration=Release /p:Platform=x64 -m
Write-Host "Building Node.js..." -ForegroundColor Green
cd "html"
Remove-Item -Path "node_modules" -Force -Recurse -ErrorAction SilentlyContinue
npm ci
npm run prod
cd ..
Remove-Item -Path "bin\x64\Release\html" -Force -Recurse -ErrorAction SilentlyContinue
New-Item -ItemType Junction -Path "bin\x64\Release\html" -Target "html\dist"
Write-Host "Creating Zip..." -ForegroundColor Green
cd "bin\x64\Release"
7z a -tzip $ZipName * -mx=7 -xr0!cache -xr0!userdata -xr0!"*.log" -xr0!"*.json" -xr0!"*.sqlite3" -xr0!"*.pdb" -xr0!"*.config"
Move-Item $ZipName ..\..\..\$ZipName -Force
cd ..\..\..\
Write-Host "Creating Installer..." -ForegroundColor Green
cd "Installer"
$nsisPath = "C:\Program Files (x86)\NSIS\makensis.exe"
&$nsisPath installer.nsi
Start-Sleep -Seconds 1
Move-Item VRCX_Setup.exe ..\$SetupName -Force
cd ..
Write-Host "Done!" -ForegroundColor Green

View File

@@ -13,7 +13,7 @@ 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% *
bz c -l:9 -r -storeroot:yes -ex:"cache;userdata;*.log;*.json;*.sqlite3;*.pdb;*.config" -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"

View File

@@ -11,7 +11,7 @@ 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
%ZIP_BIN% a -tzip %ZIP_NAME% * -mx=7 -xr0!cache -xr0!userdata -xr0!*.log -xr0!*.json -xr0!*.sqlite3 -xr0!*.pdb -xr0!*.config
cd "%~dp0"
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
pause

View File

@@ -5,7 +5,7 @@ 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% *
bz c -l:9 -r -storeroot:yes -ex:"cache;userdata;*.log;*.json;*.sqlite3;*.pdb;*.config" -cmt:"https://github.com/pypy-vrc/VRCX" %ZIP_NAME% *
cd "%~dp0"
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
pause