-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebuild_all.cmd
25 lines (17 loc) · 905 Bytes
/
rebuild_all.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@echo off
setlocal enabledelayedexpansion
:: Query the registry for the InstallLocation key for sbox and if its found set the contents of the InstallLocation key to a variable
FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 590830" /v "InstallLocation"') DO set "sboxinstalldir=%%B"
set contentbuilder=%sboxinstalldir%\bin\win64\contentbuilder.exe
:: Build all assets ( Excluding maps & shaders )
:: Note: Dosent like folders with spaces.
"%contentbuilder%" -b -o -nop4 -v -f -path "Assets"
:: Delete contentbuild folders in .source2
pushd "%sboxinstalldir%\.source2"
for /f "tokens=* delims=" %%# in ('dir /b /a:d^| findstr /i "contentbuild"') do (
rd /s /q "%%~f#"
)
popd
rem ..\..\bin\win64\contentbuilder.exe -b -o -nop4 -v -f -spewallcompiles -compileverbose -mergeverbose -spewallcommands
pause
endlocal