mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 14:26:06 +02:00
Repo cleanup (#879)
* Move build scipts * Move library DLLs * Remove DotSettings * Update gitignore * Remove Properties * Clean up csproj * Move warning suppression into code * Remove App.config --------- Co-authored-by: DubyaDude <ushafiq141@gmail.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
cd ..
|
||||
|
||||
$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
|
||||
dotnet build VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m --self-contained
|
||||
|
||||
Write-Host "Building Node.js..." -ForegroundColor Green
|
||||
cd "html"
|
||||
Remove-Item -Path "node_modules" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
npm ci --loglevel=error
|
||||
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!"*.log" -xr0!"*.pdb"
|
||||
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 "Creating SHA256-hash..." -ForegroundColor Green
|
||||
$hash = Get-FileHash -Path $SetupName -Algorithm SHA256
|
||||
$hashLine = "$($hash.Hash) $SetupName"
|
||||
$hashLine | Out-File -FilePath "SHA256SUMS.txt" -Encoding ASCII
|
||||
|
||||
Write-Host "Done!" -ForegroundColor Green
|
||||
@@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
cd ..
|
||||
dotnet build VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m --self-contained
|
||||
mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist"
|
||||
pause
|
||||
@@ -0,0 +1,5 @@
|
||||
cd ../html
|
||||
call npm ci
|
||||
call npm run production
|
||||
cd ..
|
||||
pause
|
||||
@@ -0,0 +1,3 @@
|
||||
mklink /J "%~dp0\..\bin\x64\Debug\html" "%~dp0\..\html\dist"
|
||||
mklink /J "%~dp0\..\bin\x64\Release\html" "%~dp0\..\html\dist"
|
||||
pause
|
||||
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
cd ..
|
||||
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"
|
||||
%ZIP_BIN% a -tzip %ZIP_NAME% * -mx=7 -xr0!*.log -xr0!*.pdb
|
||||
cd "%~dp0"
|
||||
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
|
||||
pause
|
||||
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
cd ..
|
||||
setlocal
|
||||
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 bandizip (https://www.bandisoft.com/bandizip)
|
||||
cd "%~dp0\bin\x64\Release"
|
||||
bz c -l:9 -r -storeroot:yes -ex:"*.log;*.pdb" -cmt:"https://github.com/vrcx-team/VRCX" %ZIP_NAME% *
|
||||
cd "%~dp0"
|
||||
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
|
||||
pause
|
||||
Reference in New Issue
Block a user