forked from Source-Authors/Obsoletium
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcreate_hammer.bat
More file actions
42 lines (33 loc) · 1.19 KB
/
create_hammer.bat
File metadata and controls
42 lines (33 loc) · 1.19 KB
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
@ECHO OFF
Setlocal EnableDelayedExpansion
if ["%~1"]==[""] (
ECHO Please pass solution name as first argument.
EXIT /B 1
)
SET "SOLUTION_NAME=%~1"
SET "GROUP_NAME=%SOLUTION_NAME%"
SET "GAME_NAME=%SOLUTION_NAME%"
SET CMAKE_MSVC_ARCH_NAME=None
if ["%~2"]==["x86"] (
SET CMAKE_MSVC_ARCH_NAME=Win32
ECHO "Generating solution %SOLUTION_NAME% for x86"
SET "SOLUTION_NAME=%SOLUTION_NAME%_x86"
) else if ["%~2"]==["x64"] (
SET CMAKE_MSVC_ARCH_NAME=x64
ECHO "Generating solution %SOLUTION_NAME% for x64"
SET "SOLUTION_NAME=%SOLUTION_NAME%_x64"
) else (
ECHO Please pass CPU architecture as second argument. Supported x86 and x64.
EXIT /B 1
)
SET "WIN_X64= "
if ["%CMAKE_MSVC_ARCH_NAME%"]==["x64"] (
SET "WIN_X64=/windows"
echo Add /windows arg to VPC as generating x64 solution.
)
REM Finally create solution.
devtools\bin\vpc.exe /2022 %WIN_X64% /define:WORKSHOP_IMPORT_DISABLE /define:SIXENSE_DISABLE /define:NO_X360_XDK /define:RAD_TELEMETRY_DISABLED /define:DISABLE_ETW /define:NO_STEAM /define:NO_ATI_COMPRESS /define:NO_NVTC /define:LTCG /no_ceg /nofpo +%GROUP_NAME% /mksln %SOLUTION_NAME% /slnitems .slnitems
if ERRORLEVEL 1 (
ECHO MSBuild for %SOLUTION_NAME%.sln failed.
EXIT /B 1
)