This repository was archived by the owner on Jun 25, 2021. It is now read-only.
forked from Heinrich19800/DayZ-PermissionsFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.bat
More file actions
44 lines (32 loc) · 1.14 KB
/
deploy.bat
File metadata and controls
44 lines (32 loc) · 1.14 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
@echo off
taskkill /F /IM DayZ_x64.exe /T
taskkill /F /IM DayZServer_x64.exe /T
taskkill /F /IM DZSALModServer.exe /T
timeout 1
set workspaceDir=%cd%
set gameDir=%~1
set serverDir=%~2
set modName=%~3
set tempFolder=%workspaceDir%\BIN
set makePBO=%workspaceDir%\Tools\MakePbo.exe
set signFile=%workspaceDir%\Tools\DSSignFile.exe
set keysLoc=%workspaceDir%\..\Keys
set privateKey=JacobMango.biprivatekey
set publicKey=JacobMango.bikey
echo "Clearing current mods"
RD /s /q "%tempFolder%" > NUL
RD /s /q "%gameDir%\%modName%" > NUL
RD /s /q "%serverDir%\%modName%" > NUL
echo "Packaging Addons"
xcopy /s/e /y /i "%workspaceDir%\%modName%" "%tempFolder%" > NUL
for /D %%s in ("%tempFolder%\Addons\*") do (
%makePBO% -U -P -D -N "%%s" "%%s.pbo"
%signFile% "%keysLoc%\%privateKey%" "%%s.pbo"
RD /s /q "%%s" > NUL
)
xcopy /s/e /y /i "%tempFolder%" "%gameDir%\%modName%" > NUL
xcopy /s/e /y /i "%tempFolder%" "%serverDir%\%modName%" > NUL
echo "Copying public key"
xcopy /y "%keysLoc%\%publicKey%" "%tempFolder%\Keys\%publicKey%*" > NUL
xcopy /y "%keysLoc%\%publicKey%" "%serverDir%\%modName%\Keys\%publicKey%*" > NUL
echo "Finished copying to DayZ Server"