-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGenProject.bat
More file actions
120 lines (81 loc) · 2.78 KB
/
GenProject.bat
File metadata and controls
120 lines (81 loc) · 2.78 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
@echo off
REM ========================================================
REM configure ark api directory
REM ========================================================
set ARK_API_DIR=""
REM ========================================================
REM configure project name
REM ========================================================
set ProjectName=BlockBuilding
REM ========================================================
REM configure description
REM ========================================================
set Description=blocks building of S+ fence
REM ========================================================
REM configure Version
REM ========================================================
set Version=1.0
REM ========================================================
REM configure min api version
REM ========================================================
set MinApiVersion=2.6
REM ========================================================
REM configure ResourceId
REM ========================================================
set ResourceId=42
set MAIN_DIR=%cd%
mkdir workspace
cd workspace
set WORKSPACE_DIR=%cd%
if not exist %ARK_API_DIR% (
echo #
echo # no ark api directory configured
echo #
if not exist %cd%\ARK-Server-API (
echo #
echo # start cloning ark api from git repository
echo #
git clone https://github.com/Michidu/ARK-Server-API
)
set ARK_API_DIR=%cd%/ARK-Server-API
echo #
echo # ark api directory set to %cd%\ARK-Server-API
echo #
)
cmake .. -G "Visual Studio 15 Win64" ^
-DProjectName=%ProjectName% ^
-DPATH_ARK_API=%ARK_API_DIR%
if errorlevel 1 pause % exit /b
echo #
echo # solution has been created in
echo # %WORKSPACE_DIR%
echo #
echo #
echo # building the project in directory
echo # %WORKSPACE_DIR%
echo #
cmake --build . --target ALL_BUILD --config Release
if errorlevel 1 pause % exit /b
echo #
echo # finished! solution has been created in
echo # %WORKSPACE_DIR%\Release
echo #
if not exist %WORKSPACE_DIR%\Release\config.json (
copy %MAIN_DIR%\config\config.json %WORKSPACE_DIR%\Release
)
REM ========================================================
REM PluginInfo description
REM ========================================================
if exist %WORKSPACE_DIR%\Release\PluginInfo.json (
del %WORKSPACE_DIR%\Release\PluginInfo.json
)
cd %WORKSPACE_DIR%\Release
echo { >> PluginInfo.json
echo "FullName":"%ProjectName%", >> PluginInfo.json
echo "Description":"%Description%", >> PluginInfo.json
echo "Version":%Version%, >> PluginInfo.json
echo "MinApiVersion":%MinApiVersion%, >> PluginInfo.json
echo "ResourceId":%ResourceId% >> PluginInfo.json
echo } >> PluginInfo.json
explorer %WORKSPACE_DIR%\Release
Pause