-
Notifications
You must be signed in to change notification settings - Fork 6
/
make.bat
49 lines (41 loc) · 1.89 KB
/
make.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
47
48
49
@echo off
reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath
IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe
"%MSBUILDDIR%msbuild.exe" dcodeIO.RustWeb.sln /p:Configuration=Release
mkdir build\RustDedicated_Data\Managed
::Tools\ILMerge^
/lib:Dependencies^
/target:library^
/out:bin\Release\dcodeIO.RustWeb-bundle.dll^
bin\Release\dcodeIO.RustWeb.dll^
bin\Release\Community.CsharpSqlite.dll^
bin\Release\Community.CsharpSqlite.SQLiteClient.dll
copy bin\Release\dcodeIO.RustWeb.dll build\RustDedicated_Data\Managed\
copy Oxide.Ext.RustWeb\bin\Release\Oxide.Ext.RustWeb.dll build\RustDedicated_Data\Managed\
mkdir build\server\www
xcopy /S /I /Y www build\server\www
move /Y build\server\www\config.sample.json build\server\www\config.json
copy README.md build\README.md
copy FAQ.md build\FAQ.md
copy Oxide.Ext.RustWeb\README.md build\INSTALL-OXIDE2.md
call ccjs build\server\www\js\helpers.js > build\server\www\js\helpers.min.js
move /Y build\server\www\js\helpers.min.js build\server\www\js\helpers.js
call ccjs build\server\www\js\main.js > build\server\www\js\main.min.js
move /Y build\server\www\js\main.min.js build\server\www\js\main.js
call ccjs build\server\www\js\i18n.js > build\server\www\js\i18n.min.js
move /Y build\server\www\js\i18n.min.js build\server\www\js\i18n.js
goto:eof
::ERRORS
::---------------------
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%MSBUILDDIR%'
goto:eof