Parcourir la source

Added build script

Hobnob il y a 3 ans
Parent
commit
f103220910
2 fichiers modifiés avec 33 ajouts et 0 suppressions
  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