forked from OpenXRay/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xr_pack_build.cmd
93 lines (81 loc) · 2.02 KB
/
xr_pack_build.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
if "%CONFIGURATION%"=="Debug" (
if %PLATFORM%==x86 (
set PLATFORM_FOLDER=Win32
set EDITION_NAME=Debug 32-bit
goto :START
)
)
if "%CONFIGURATION%"=="Debug" (
if %PLATFORM%==x64 (
set PLATFORM_FOLDER=Win64
set EDITION_NAME=Debug 64-bit
goto :START
)
)
if "%CONFIGURATION%"=="Mixed" (
if %PLATFORM%==x86 (
set PLATFORM_FOLDER=Win32
set EDITION_NAME=Mixed 32-bit
goto :START
)
)
if "%CONFIGURATION%"=="Mixed" (
if %PLATFORM%==x64 (
set PLATFORM_FOLDER=Win64
set EDITION_NAME=Mixed 64-bit
goto :START
)
)
if "%CONFIGURATION%"=="Release" (
if %PLATFORM%==x86 (
set PLATFORM_FOLDER=Win32
set EDITION_NAME=Release 32-bit
goto :START
)
)
if "%CONFIGURATION%"=="Release" (
if %PLATFORM%==x64 (
set PLATFORM_FOLDER=Win64
set EDITION_NAME=Release 64-bit
goto :START
)
)
if "%CONFIGURATION%"=="Release Master Gold" (
if %PLATFORM%==x86 (
set PLATFORM_FOLDER=Win32
set EDITION_NAME=Gold 32-bit
goto :START
)
)
if "%CONFIGURATION%"=="Release Master Gold" (
if %PLATFORM%==x64 (
set PLATFORM_FOLDER=Win64
set EDITION_NAME=Gold 64-bit
goto :START
)
)
echo ! Unknown configuration and/or platform
goto :EOF
:START
md res\bin\
md res\bin\utils
call :COPY_ENGINE
cd res
7z a "OpenXRay.%EDITION_NAME%.7z" * -xr!.* -xr!*.pdb -x!bin\utils
7z a "Symbols.%EDITION_NAME%.7z" bin\*.pdb -i!License.txt -i!README.md -xr!.*
7z a "Utils.%EDITION_NAME%.7z" bin\utils\* -i!License.txt -i!README.md -xr!.*
cd ..
rem Return edition name
set NEED_OUTPUT=%1
if defined NEED_OUTPUT (
set %~1=%EDITION_NAME%
)
goto :EOF
:COPY_ENGINE
copy "bin\%PLATFORM_FOLDER%\%CONFIGURATION%\*.dll" res\bin\
copy "bin\%PLATFORM_FOLDER%\%CONFIGURATION%\*.exe" res\bin\
copy "bin\%PLATFORM_FOLDER%\%CONFIGURATION%\*.pdb" res\bin\
copy "bin\%PLATFORM_FOLDER%\%CONFIGURATION%\utils\*" res\bin\utils\
copy License.txt res\
copy README.md res\
goto :EOF