Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Hover-UI-Kit/AutoBuildUnityDemos.bat
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
62 lines (40 sloc)
1.36 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: ---- HOVERBOARD -------------------------------------------- | |
call :setVr 0 "Hoverboard Demo (Non-VR)" | |
call :build BuildBoardKeysNonVr | |
call :setVr 1 "Hoverboard Demo (VR)" | |
call :build BuildBoardKeysVr | |
:: ---- HOVERCAST --------------------------------------------- | |
call :setVr 0 "Hovercast Demo (Non-VR)" | |
call :build BuildCastCubesNonVr | |
call :setVr 1 "Hovercast Demo (VR)" | |
call :build BuildCastCubesVr | |
:: ---- CLEANUP ----------------------------------------------- | |
del Unity\ProjectSettings\*.bak | |
echo %DATE% %TIME% > Builds/Auto/timestamp.txt | |
timeout /t -1 | |
exit /b | |
:: ---- FUNCTIONS --------------------------------------------- | |
:setVr | |
if %1 == 1 ( | |
SET res=2 | |
SET aspect=0 | |
) else ( | |
SET res=1 | |
SET aspect=1 | |
) | |
SET file="Unity\ProjectSettings\ProjectSettings.asset" | |
@echo on | |
perl -i.bak -pe 's/productName: .+/productName: %2/' %file% | |
perl -i.bak -pe 's/virtualRealitySupported: \d/virtualRealitySupported: %1/' %file% | |
@echo off | |
perl -i.bak -pe 's/displayResolutionDialog: \d/displayResolutionDialog: %res%/' %file% | |
perl -i.bak -pe 's/4:3: \d/4:3: %aspect%/' %file% | |
perl -i.bak -pe 's/5:4: \d/5:4: %aspect%/' %file% | |
perl -i.bak -pe 's/Others: \d/Others: %aspect%/' %file% | |
goto :eof | |
:build | |
@echo on | |
C:\Zach\Programs\Dev\Unity5\Editor\Unity.exe -quit -batchmode -executeMethod Hover.Unity.Editor.AutomatedBuilds.%~1 | |
@echo off | |
goto :eof | |