-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.bat
More file actions
55 lines (45 loc) · 1.65 KB
/
Copy pathdeploy.bat
File metadata and controls
55 lines (45 loc) · 1.65 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
@echo off
set "root=%cd%"
set "deploy=%root%\deploy"
set "file=SandlingInvasion.dll"
set "zip=SandlingInvasion.zip"
:: Where to auto-deploy mod for testing.
set "modFolder=C:\Users\Dark\AppData\Roaming\r2modmanPlus-local\ETG\profiles\Default\BepInEx\plugins"
set "modName=SandlingInvasion"
:: Delete deploy folder if it exists
if exist "%deploy%" (
rmdir /s /q "%deploy%"
)
:: Delete ZIP file if it exists
if exist "%zip%" (
del /f /q "%zip%"
)
:: Recreate deploy folder
mkdir "%deploy%"
:: Remove "README" overwriting if you want mod to have description, different from the one on Github.
xcopy /y "%root%\README.md" "%deploy%"
xcopy /y "%root%\CHANGELOG.md" "%deploy%"
xcopy /y "%root%\icon.png" "%deploy%"
xcopy /y "%root%\manifest.json" "%deploy%"
xcopy /y "%root%\bin\Debug\%file%" "%deploy%"
xcopy /y "%root%\bin\Debug\KCPCoreFramework35.dll" "%deploy%"
xcopy /y "%root%\bin\Debug\KCPClientFramework35.dll" "%deploy%"
call "%root%\move.bat" -target "%root%\plugins" -destination "%deploy%\plugins"
:: WinRAR's "a" = add files to archive
:: -afzip = force ZIP format (default is RAR)
:: -ep1 = exclude base folder, include only contents
:: -r = recursive
start "" /wait winrar a -afzip -ep1 -r "%root%\%zip%" "%deploy%\*"
:: Test mod deployment.
if exist "C:\Users\Dark" (
:: Auto-deploy zip as an internal mod for testing.
if exist "%modFolder%\%modName%" (
rmdir /s /q "%modFolder%\%modName%"
)
mkdir "%modFolder%\%modName%"
start "" /wait winrar x -r -o+ "%root%\%zip%" "%modFolder%\%modName%"
if exist "%modFolder%\%modName%\plugins" (
xcopy "%modFolder%\%modName%\plugins\*" "%modFolder%\%modName%" /E /H /Y
rmdir /s /q "%modFolder%\%modName%\plugins"
)
)