1
0

build.ps1 1.2 KB

123456789101112131415161718192021222324252627282930
  1. $pboProject = (Get-ItemProperty "HKCU:\Software\Mikero\pboProject\").exe
  2. $output = $(Join-Path $(Get-Location) "@501st Community Auxiliary Mod")
  3. $mods = @("501st_Helmets","RD501_Compositions","RD501_Droids","RD501_Droid_Dispenser","RD501_EMP","RD501_Helmets")#,"RD501_Jumppack","RD501_Main","RD501_Markers","RD501_Particle_Effects","RD501_RDS","RD501_Units","RD501_Vehicles","RD501_Vehicle_Weapons","RD501_Weapons","RD501_Zeus","VenMK2")
  4. ForEach ($mod in $mods)
  5. {
  6. $target = "$output\addons\$mod.pbo"
  7. $LastModified = (Get-ChildItem "addons\$mod" -File -Recurse | Sort-Object LastWriteTime | Select-Object -Last 1).LastWriteTime
  8. $exists = Test-Path $target
  9. if($exists){ $LastBuilt = (Get-ChildItem $target).LastWriteTime }
  10. if($exists -And $LastBuilt -gt $LastModified)
  11. {
  12. Write-Verbose "$mod Up to Date, skipping."
  13. }
  14. else
  15. {
  16. Write-Output "==Building $mod=="
  17. & "$pboProject" "-M=$output" "P:\$mod"
  18. Wait-Process pboProject
  19. if(Test-Path $target)
  20. {
  21. Write-Output " Successfully Built $mod."
  22. }
  23. else
  24. {
  25. Write-Output " $mod Build Failed."
  26. Write-Output $(Get-Content "P:\temp\$mod.packing.log")
  27. }
  28. }
  29. }