11
22@ echo off
33
4+ rem Put the following text into the Post-build event command line:
5+ rem without the "rem":
6+
7+ rem start /D D:\Users\jbb\github\IFI-Life-Support /WAIT deploy.bat $(TargetDir) $(TargetFileName)
8+ rem
9+ rem if $(ConfigurationName) == Release (
10+ rem
11+ rem start /D D:\Users\jbb\github\IFI-Life-Support /WAIT buildRelease.bat $(TargetDir) $(TargetFileName)
12+ rem
13+ rem )
14+
15+
416rem Set variables here
517
18+ rem H is the destination game folder
19+ rem GAMEDIR is the name of the mod folder (usually the mod name)
20+ rem GAMEDATA is the name of the local GameData
21+ rem VERSIONFILE is the name of the version file, usually the same as GAMEDATA,
22+ rem but not always
23+ rem LICENSE is the license file
24+ rem README is the readme file
25+
26+
627set GAMEDIR = ProbeControlRoom
28+
29+ set GAMEDATA = " GameData\"
30+ set VERSIONFILE = %GAMEDIR% .version
731set LICENSE = License.txt
832set README = ReadMe.md
933
@@ -12,17 +36,17 @@ set ZIP="c:\Program Files\7-zip\7z.exe"
1236
1337rem Copy files to GameData locations
1438
39+ copy /Y " %1%2 " " %GAMEDATA% \%GAMEDIR% \Plugins"
40+ copy /Y %VERSIONFILE% %GAMEDATA% \%GAMEDIR%
41+ copy /Y ..\MiniAVC.dll %GAMEDATA% \%GAMEDIR%
1542
16- copy /Y " %1%2 " " GameData\%GAMEDIR% \Plugins"
17- copy /Y %GAMEDIR% .version GameData\%GAMEDIR%
18- copy /Y ..\MiniAVC.dll GameData\%GAMEDIR%
19-
20- if " %LICENSE% " NEQ " " copy /y %LICENSE% GameData\%GAMEDIR%
21- if " %README% " NEQ " " copy /Y %README% GameData\%GAMEDIR%
43+ if " %LICENSE% " NEQ " " copy /y %LICENSE% %GAMEDATA% \%GAMEDIR%
44+ if " %README% " NEQ " " copy /Y %README% %GAMEDATA% \%GAMEDIR%
2245
2346rem Get Version info
2447
25- set VERSIONFILE = %GAMEDIR% .version
48+ copy %VERSIONFILE% tmp.version
49+ set VERSIONFILE = tmp.version
2650rem The following requires the JQ program, available here: https://stedolan.github.io/jq/download/
2751c:\local\jq-win64 " .VERSION.MAJOR" %VERSIONFILE% > tmpfile
2852set /P major = < tmpfile
@@ -36,16 +60,18 @@ set /P patch=<tmpfile
3660c:\local\jq-win64 " .VERSION.BUILD" %VERSIONFILE% > tmpfile
3761set /P build = < tmpfile
3862del tmpfile
63+ del tmp.version
3964set VERSION = %major% .%minor% .%patch%
4065if " %build% " NEQ " 0" set VERSION = %VERSION% .%build%
4166
4267echo Version: %VERSION%
4368
4469
4570rem Build the zip FILE
71+ cd %GAMEDATA% \..
4672
4773set FILE = " %RELEASEDIR% \%GAMEDIR% -%VERSION% .zip"
4874IF EXIST %FILE% del /F %FILE%
4975%ZIP% a -tzip %FILE% GameData
5076
51- pause
77+ pause
0 commit comments