-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
63 lines (53 loc) · 1.34 KB
/
build.bat
File metadata and controls
63 lines (53 loc) · 1.34 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
@echo off
setlocal
echo ===============================
echo Building DrawLayerMod
echo ===============================
echo Removing Release folder
rmdir /s /q Release
if errorlevel 1 (
echo ERROR: Failed to remove the Release folder
exit /b 1
)
echo Creating Release folder
mkdir Release
if errorlevel 1 (
echo ERROR: Failed to create the Release folder
exit /b 1
)
mkdir Release\DrawLayerMod
if errorlevel 1 (
echo ERROR: Failed to create the Mod folder
exit /b 1
)
echo Building Mod DLL
dotnet build
if errorlevel 1 (
echo ERROR: Failed to build the Mod DLL
exit /b 1
)
echo Copying Mod dll files
copy /y "Output\bin\DrawLayerMod.dll" "Release\DrawLayerMod"
if errorlevel 1 (
echo ERROR: Failed to copy the Mod DLL
exit /b 1
)
echo Copying Config file
copy /y "draw_layer.cfg" "Release\DrawLayerMod"
if errorlevel 1 (
echo ERROR: Failed to copy the Config file
exit /b 1
)
echo Zipping Mod
powershell -Command "Compress-Archive -Path 'Release\DrawLayerMod\*' -DestinationPath 'Release\DrawLayerMod.zip' -Force"
if errorlevel 1 (
echo ERROR: Failed to zip the Mod
exit /b 1
)
echo Removing Mod folder
rmdir /s /q Release\DrawLayerMod
if errorlevel 1 (
echo ERROR: Failed to remove the Mod folder
exit /b 1
)
echo Build Complete