-
Notifications
You must be signed in to change notification settings - Fork 0
/
rgo-deploy.bat
77 lines (63 loc) · 2.28 KB
/
rgo-deploy.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
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
@echo off
REM Command: "rgo-deploy" (and optionally a version string)
REM This calls the "rgo-pack.bat" batch file and then moves the generated file directly to the PAK directory
SETLOCAL EnableDelayedExpansion
REM This variables defines that the script is run from the deploy file
SET "IS_DEPLOY=1"
REM *********************************************
REM *** Call the pack batch file
REM *********************************************
REM Check if the PATH variable is set or the script is run from inside the directory
WHERE /q rgo-pack.bat
IF ERRORLEVEL 1 (
echo=
echo Couldn't find rgo-pack.bat^^!
echo Please make sure it's in the same directory as this file or is available within
echo one of the direcotries added to the PATH variable^^!
pause
GOTO :EOF
)
CALL rgo-pack.bat %1
IF ERRORLEVEL 1 (
GOTO :EOF
)
REM *********************************************
REM *** Copy the file to the PAK folder
REM *********************************************
echo=
echo Moving the generated .pak file to the game's PAK directory...
move /Y "%PAK_FILE_WITH_PATH%" "%GAME_PAK_DIR%"
IF NOT ERRORLEVEL 1 (
echo=
echo=
echo SUCCESS^^!
echo Deployed to "%GAME_PAK_DIR%"
echo=
) ELSE (
echo=
echo=
echo -------------------------------------------------------------------------------------
echo ERROR^^!
echo Something failed^^!
echo -------------------------------------------------------------------------------------
echo=
echo The .pak file was created, but it couldn't be moved to the game directory.
echo Maybe the directory is write protected or you do not have sufficient permissions to
echo access it.
echo The latter could be the case if you're trying to access a folder inside the
echo "C:\Program Files" directory, there only programs/scripts with administrator rights
echo can create files.
echo This could be the case if you're running the Steam version of the game.
echo=
echo You could try to run the script in administrator mode ^(not recommended^), or you
echo could manually copy the generated file to the game's PAKS folder.
echo=
echo The generated file:
echo "%PAK_FILE_WITH_PATH%"
echo=
echo The game's PAKS directory path:
echo "%GAME_PAK_DIR%"
echo=
echo=
pause
)