forked from psmoveservice/PSMoveService
-
Notifications
You must be signed in to change notification settings - Fork 9
/
CreateRelease.bat
46 lines (34 loc) · 1.52 KB
/
CreateRelease.bat
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
:: Abort if theres no build available.
IF NOT EXIST build goto no_build
:: Remove old zip and temp folder file.
IF EXIST ".\release\PSMoveService.zip" del /S /Q ".\release\PSMoveService.zip"
IF EXIST ".\release\PSMoveService\" rmdir /S /Q ".\release\PSMoveService\"
:: Create temp folders.
IF NOT EXIST ".\release\PSMoveService\" mkdir ".\release\PSMoveService\"
IF NOT EXIST ".\release\PSMoveService\testing\" mkdir ".\release\PSMoveService\testing\"
IF NOT EXIST ".\release\PSMoveService\assets\calibration\" mkdir ".\release\PSMoveService\assets\calibration\"
:: Copy misc calibration files to psmoveconfigtool.
xcopy /S /I /Y ".\misc\calibration" ".\release\PSMoveService\assets\calibration"
:: Move files to release.
copy /Y ".\build\src\psmoveclient\Release\*.dll" ".\release\PSMoveService\"
copy /Y ".\build\src\psmoveservice\Release\*.exe" ".\release\PSMoveService\"
copy /Y ".\build\src\psmoveconfigtool\Release\*.exe" ".\release\PSMoveService\"
xcopy /S /I /Y ".\src\psmoveconfigtool\assets" ".\release\PSMoveService\assets"
:: Move testing binaries to testing directory.
copy /Y ".\build\src\psmoveclient\Release\*.dll" ".\release\PSMoveService\testing\"
copy /Y ".\build\src\tests\Release\*.exe" ".\release\PSMoveService\testing\"
:: Copy LICENSE.
copy /Y ".\LICENSE" ".\release\PSMoveService\LICENSE.txt"
:: Create zip file
.\7zip\7za.exe a -tzip ".\release\PSMoveService.zip" -w ".\release\PSMoveService"
pause
goto exit
:no_build
echo No build directory found!
goto failure
:exit
EXIT /B 0
:failure
pause
EXIT /B 1