1
0
Hobnob 3 роки тому
батько
коміт
f103220910
2 змінених файлів з 33 додано та 0 видалено
  1. 32 0
      build.ps1
  2. 1 0
      include.txt

+ 32 - 0
build.ps1

@@ -0,0 +1,32 @@
+param ([String[]] $only)
+
+# Create folders
+$buildPath = '.\@501st Community Auxiliary Mod\addons'
+New-Item $buildPath -ItemType Directory -Force
+
+$buildPath = Resolve-Path $buildPath
+$includePath = Resolve-Path '.\include.txt'
+
+$addonBuilder = Join-Path (Get-ItemProperty "HKCU:\Software\Bohemia Interactive\Arma 3 Tools").path "AddonBuilder\AddonBuilder.exe"
+
+function Build-Addon
+{
+    param ([string] $addonFolder)
+    $addonPath = Resolve-Path ".\addons - Copy\$addonFolder"
+    & "$addonBuilder" $addonPath $buildPath -prefix="rd501" -clear -include="$includePath"
+}
+
+if ($PSBoundParameters.ContainsKey('only'))
+{
+    foreach($addonFolder in $only)
+    {
+        Build-Addon -addonFolder $addonFolder
+    }
+}
+else
+{
+    foreach($addonFolder in Get-ChildItem -Directory '.\addons - Copy')
+    {
+        Build-Addon -addonFolder $addonFolder
+    }
+}

+ 1 - 0
include.txt

@@ -0,0 +1 @@
+*.p3d;*.paa;*.ogg;*.rvmat;*.sqf;*.xml;*.jpg;*.wss