/
build.bat
38 lines (30 loc) · 977 Bytes
/
build.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
@ECHO OFF
SETLOCAL
SET target_output_directory=E:\ArmaWork\#Exports\@VanguardTIOWAddonDev\addons
SET target_sign_file="E:\Steam\steamapps\common\Arma 3 Tools\DSSignFile\Dolf.biprivatekey"
SET target_exclude_directory= ^
'.git',^
'vng_terrain',^
'vng_alive'
SET target_pbo_exclude=^
-x "*.blend" ^
-x "*.blend1" ^
-x "*.psd" ^
-x "*.png" ^
-x "*.hpp" ^
-x "*.fbx"
FOR /F "usebackq tokens=*" %%d IN (`powershell.exe -NoProfile -Command "Get-ChildItem -Directory -Filter '*' -Exclude %target_exclude_directory% | ForEach-Object { $_.Name }"`) DO (
ECHO Building directory: %%d
if exist "%target_output_directory%\%%d.pbo" (
del "%target_output_directory%\%%d.pbo"
)
armake_w64.exe build -f -z %target_pbo_exclude% -k %target_sign_file% %%d "%target_output_directory%\%%d.pbo"
if exist "%target_output_directory%\%%d.pbo" (
ECHO Build success
)
)
if exist "*.tmp" (
ECHO Removing armake tmp files.
FOR %%G IN ("*tmp") DO DEL %%G
)
ENDLOCAL