|
| 1 | +# |
| 2 | +# KSPtoMars Windows Modpack v1.5.0 |
| 3 | +# Written by Sven Frenzel ([email protected]) with some contributions by Darko Pilav ([email protected]) |
| 4 | +# |
| 5 | +# The MIT License (MIT) |
| 6 | +# |
| 7 | +# Copyright (c) 2015 Sven Frenzel ([email protected]) |
| 8 | +# |
| 9 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 10 | +# of this software and associated documentation files (the "Software"), to deal |
| 11 | +# in the Software without restriction, including without limitation the rights |
| 12 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 13 | +# copies of the Software, and to permit persons to whom the Software is |
| 14 | +# furnished to do so, subject to the following conditions: |
| 15 | +# |
| 16 | +# The above copyright notice and this permission notice shall be included in |
| 17 | +# all copies or substantial portions of the Software. |
| 18 | +# |
| 19 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 20 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 21 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 22 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 23 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 24 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 25 | +# THE SOFTWARE. |
| 26 | +# |
| 27 | +# |
| 28 | +# |
| 29 | +# ChangeLog |
| 30 | +# |
| 31 | +# v1.5.2 (2015-06-28) |
| 32 | +# - started work on removing further unnecessary parts. So far removed: |
| 33 | +# * EngineIgnitor Parts |
| 34 | +# * DMagic Universal Storage Parts |
| 35 | +# |
| 36 | +# v1.5.1 (2015-06-28) |
| 37 | +# - updated all mods to their newest versions |
| 38 | +# |
| 39 | + |
| 40 | +[CmdletBinding()] |
| 41 | +Param( |
| 42 | + [Parameter(Mandatory=$True,Position=1)] |
| 43 | + [string]$k, |
| 44 | + [switch]$b, |
| 45 | + [switch]$c, |
| 46 | + [switch]$f |
| 47 | +) |
| 48 | + |
| 49 | +#Definition of function for easy unzipping later on |
| 50 | +function unzip($file) { |
| 51 | + Add-Type -assembly "system.io.compression.filesystem" |
| 52 | + [io.compression.zipfile]::ExtractToDirectory($file, $pwd) |
| 53 | +} |
| 54 | + |
| 55 | +Write-Output "`r`nThis is v1.5.0 of the ksp2mars modpack script for windows.`r`n`r`n" |
| 56 | + |
| 57 | +$startingPath = $PWD |
| 58 | + |
| 59 | +if (Test-Path $k/GameData) { |
| 60 | + Set-Location $k |
| 61 | + Move-Item GameData/Squad Squad_bak |
| 62 | + Remove-Item -Recurse -Force GameData |
| 63 | + new-item -itemtype directory GameData > $null |
| 64 | + Move-Item Squad_bak GameData/Squad |
| 65 | +}else{ |
| 66 | + Write-Output "The specified path does not seem to contain a valid install of KSP." |
| 67 | + exit |
| 68 | +} |
| 69 | + |
| 70 | +# Create folders |
| 71 | +if (Test-Path ksp2m_mods){ |
| 72 | + Remove-Item -Recurse -Force ksp2m_mods |
| 73 | +} |
| 74 | + |
| 75 | +new-item -itemtype directory ksp2m_mods > $null |
| 76 | +Set-Location ksp2m_mods |
| 77 | + |
| 78 | +If ($b){ |
| 79 | + Write-Output "Preparing beauty install." |
| 80 | +}ElseIf ($c){ |
| 81 | + Write-Output "Preparing base install." |
| 82 | +}ElseIf ($f){ |
| 83 | + Write-Output "Preparing full install." |
| 84 | +}Else{ |
| 85 | + Write-Output "Preparing developer install." |
| 86 | +} |
| 87 | + |
| 88 | +# Download base mods! |
| 89 | +Write-Output "`r`nDownloading all mods. This will take a while." |
| 90 | + |
| 91 | +$baseModPack = @( |
| 92 | + @("http://github.com/camlost2/AJE/releases/download/2.2.1/Advanced_Jet_Engine-2.2.1.zip", "Advanced_Jet_Engine.zip"), |
| 93 | + @("http://github.com/ferram4/BetterBuoyancy/releases/download/v1.3/BetterBuoyancy_v1.3.zip", "BetterBuoyancy.zip"), |
| 94 | + @("http://github.com/BobPalmer/CommunityResourcePack/releases/download/0.4.2/CRP_0.4.2.zip", "CRP.zip"), |
| 95 | + @("http://github.com/codepoetpbowden/ConnectedLivingSpace/releases/download/1.1.3.1/Connected_Living_Space-1.1.3.1.zip", "Connected_Living_Space.zip"), |
| 96 | + @("http://github.com/NathanKell/CrossFeedEnabler/releases/download/v3.3/CrossFeedEnabler_v3.3.zip", "CrossFeedEnabler.zip"), |
| 97 | + @("http://github.com/Starwaster/DeadlyReentry/releases/download/v7.1.0/DeadlyReentry_7.1.0_The_Melificent_Edition.zip", "DeadlyReentry.zip"), |
| 98 | + @("http://kerbalstuff.com/mod/27/FASA/download/5.35", "FASA.zip"), |
| 99 | + @("http://github.com/ferram4/Ferram-Aerospace-Research/releases/download/v0.15_3_1_Garabedian/FAR_0_15_3_1_Garabedian.zip", "FAR.zip"), |
| 100 | + @("http://github.com/ferram4/Kerbal-Joint-Reinforcement/releases/download/v3.1.4/KerbalJointReinforcement_v3.1.4.zip", "KerbalJointReinforcement.zip"), |
| 101 | + @("http://kerbal.curseforge.com/ksp-mods/220462-ksp-avc-add-on-version-checker/files/2216818/download", "ksp-avc.zip"), |
| 102 | + @("http://beta.kerbalstuff.com/mod/67/KW%20Rocketry/download/2.7", "KWRocketry.zip"), |
| 103 | + @("http://github.com/KSP-RO/SolverEngines/releases/download/v1.4/SolverEngines_v1.4.zip", "SolverEngines.zip"), |
| 104 | + @("http://kerbalstuff.com/mod/26/NovaPunch/download/2.09", "NovaPunch2.zip"), |
| 105 | + @("http://github.com/e-dog/ProceduralFairings/releases/download/v3.15/ProcFairings_3.15.zip", "ProcFairings.zip"), |
| 106 | + @("http://github.com/Mihara/RasterPropMonitor/releases/download/v0.20.0/RasterPropMonitor.0.20.0.zip", "RasterPropMonitor.zip"), |
| 107 | + @("http://kerbalstuff.com/mod/71/RealChute%20Parachute%20Systems/download/1.3.2.3", "RealChute.zip"), |
| 108 | + @("http://github.com/NathanKell/ModularFuelSystem/releases/download/rf-v10.4.1/RealFuels_v10.4.1.zip", "RealFuels.zip"), |
| 109 | + @("http://github.com/KSP-RO/RealismOverhaul/releases/download/v10.0.0/RealismOverhaul-v10.0.0.zip", "RealismOverhaul.zip"), |
| 110 | + @("http://github.com/KSP-RO/RealSolarSystem/releases/download/v10.0.2/RealSolarSystem_v10.0.2.zip", "RealSolarSystem.zip"), |
| 111 | + @("http://github.com/RemoteTechnologiesGroup/RemoteTech/releases/download/1.6.5/RemoteTech-1.6.5.zip", "RemoteTech.zip"), |
| 112 | + @("http://github.com/KSP-RO/RSS-Textures/releases/download/v10.0/2048.zip", "2048.zip"), |
| 113 | + @("http://github.com/Crzyrndm/RW-Saturatable/releases/download/1.10.1/Saturatable.RW.v1.10.1.zip", "Saturatable.RW.zip"), |
| 114 | + @("http://github.com/taraniselsu/TacLifeSupport/releases/download/v0.11.1.20/TacLifeSupport_0.11.1.20.zip", "TacLifeSupport.zip"), |
| 115 | + @("http://github.com/ducakar/TextureReplacer/releases/download/v2.4.6/TextureReplacer-2.4.6.zip", "TextureReplacer.zip"), |
| 116 | + @("http://blizzy.de/toolbar/Toolbar-1.7.9.zip", "Toolbar.zip"), |
| 117 | + @("http://kerbal.curseforge.com/ksp-mods/220213-taurus-hcv-3-75-m-csm-system/files/2239849/download", "Taurus.zip"), |
| 118 | + @("http://github.com/DMagic1/Orbital-Science/releases/download/v1.0.4/DMagic_Orbital_Science-1.0.4.zip", "DMagic_Orbital_Science.zip"), |
| 119 | + @("http://kerbalstuff.com/mod/84/Engine%20Ignitor/download/3.4.1.1", "EngineIgnitor.zip"), |
| 120 | + @("http://ksptomars.org/public/EngineIgnitor.dll", "EngineIgnitor.dll"), |
| 121 | + @("http://kerbal.curseforge.com/ksp-mods/228561-kerbal-inventory-system-kis/files/2240842/download", "KIS.zip"), |
| 122 | + @("http://kerbal.curseforge.com/ksp-mods/223900-kerbal-attachment-system-kas/files/2240844/download", "KAS.zip"), |
| 123 | + @("http://github.com/timmersuk/Timmers_KSP/releases/download/0.7.3.2/KeepFit-0.7.3.2.zip", "KeepFit.zip"), |
| 124 | + @("http://kerbalstuff.com/mod/8/Magic%20Smoke%20Industries%20Infernal%20Robotics/download/0.21.2", "InfernalRobotics.zip"), |
| 125 | + @("http://github.com/ClawKSP/KSP-Stock-Bug-Fix-Modules/releases/download/v1.0.2e.3/StockBugFixModules.v1.0.2e.3.zip", "StockBugFixModules.zip"), |
| 126 | + @("http://github.com/ClawKSP/KSP-Stock-Bug-Fix-Modules/releases/download/v1.0.2e.3/StockPlusController.cfg", "StockPlusController.cfg"), |
| 127 | + @("http://github.com/KSP-KOS/KOS/releases/download/v0.17.3/kOS-v0.17.3.zip", "kOS.zip"), |
| 128 | + @("http://github.com/UbioWeldingLtd/UbioWeldContinued/releases/download/2.1.3/UbioWeldContinued-2.1.3.zip", "UbioWeldContinued.zip"), |
| 129 | + @("http://kerbalstuff.com/mod/250/Universal%20Storage/download/1.1.0.6", "UniversalStorage.zip"), |
| 130 | + @("http://kerbalstuff.com/mod/344/TweakScale%20-%20Rescale%20Everything%21/download/v2.2.1", "TweakScale.zip"), |
| 131 | + @("http://github.com/BobPalmer/MKS/releases/download/0.31.4/UKS_0.31.4.zip", "UKS.zip"), |
| 132 | + @("http://kerbalstuff.com/mod/668/PersistentRotation/download/0.5.3", "PersistentRotation.zip"), |
| 133 | + @("http://kerbalstuff.com/mod/515/B9%20Aerospace%20Procedural%20Parts/download/0.40", "B9ProcParts.zip"), |
| 134 | + @("http://kerbalstuff.com/mod/255/TweakableEverything/download/1.12", "TweakableEverything.zip"), |
| 135 | + @("http://ksptomars.org/public/HabitatPack_04.1.zip", "HabitatPack.zip"), |
| 136 | + @("http://kerbalstuff.com/mod/450/Hullcam%20VDS/download/0.40", "HullcaMove-ItemDS.zip"), |
| 137 | + @("http://dl.orangedox.com/ilvCeXLsPxxWNdz1VY/JDiminishingRTG_v1.3a.zip?dl=1", "JDiminishingRTG.zip"), |
| 138 | + @("http://ksptomars.org/public/AIES_Aerospace151.zip", "AIES_Aerospace151.zip"), |
| 139 | + @("http://dl.dropboxusercontent.com/u/72893034/AIES_Patches/AIES_Node_Patch.cfg.zip", "AIES_Node_Patch.cfg.zip"), |
| 140 | + @("http://kerbalstuff.com/mod/361/NEBULA%20Decals/download/1.01", "NebulaDecals.zip") |
| 141 | +) |
| 142 | + |
| 143 | +Write-Output "Downloading Base Mods." |
| 144 | +$index = 0 |
| 145 | +foreach ($baseMod in $baseModPack) { |
| 146 | + $index = $index+1 |
| 147 | + Write-Output "[$index of $($baseModPack.count)]: $($baseMod[1])" |
| 148 | + Invoke-WebRequest -Uri $baseMod[0] -OutFile $baseMod[1] |
| 149 | +} |
| 150 | + |
| 151 | +# Dev mods! |
| 152 | +if (-not $b -and -not $c){ |
| 153 | + $devModPack = @( |
| 154 | + @("http://kerbal.curseforge.com/ksp-mods/220221-mechjeb/files/2238724/download", "mechjeb2.zip"), |
| 155 | + @("http://github.com/malahx/QuickSearch/releases/download/v1.13/QuickSearch-1.13.zip", "QuickSearch.zip"), |
| 156 | + @("http://github.com/snjo/FShangarExtender/releases/download/v3.3/FShangarExtender_3_3.zip", "FShangarExtender.zip"), |
| 157 | + @("http://github.com/Crzyrndm/FilterExtension/releases/download/2.3.0/Filter.Extensions.v2.3.0.1.zip", "Filter.Extensions.zip"), |
| 158 | + @("http://github.com/Swamp-Ig/ProceduralParts/releases/download/v1.1.6/ProceduralParts-1.1.6.zip", "ProceduralParts.zip"), |
| 159 | + @("http://ksptomars.org/public/HyperEdit-1.4.1_for-KSP-1.0.zip", "HyperEdit.zip"), |
| 160 | + @("http://github.com/malahx/QuickScroll/releases/download/v1.31/QuickScroll-1.31.zip", "QuickScroll.zip"), |
| 161 | + @("http://github.com/MachXXV/EditorExtensions/releases/download/v2.12/EditorExtensions_v2.12.zip", "EditorExtensions.zip"), |
| 162 | + @("http://github.com/nodrog6/LightsOut/releases/download/v0.1.4/LightsOut-v0.1.4.zip", "LightsOut.zip"), |
| 163 | + @("http://kerbal.curseforge.com/ksp-mods/220602-rcs-build-aid/files/2243090/download", "RCSbuildAid.zip"), |
| 164 | + @("http://kerbalstuff.com/mod/414/StripSymmetry/download/v1.6", "StripSymmetry.zip"), |
| 165 | + @("http://kerbal.curseforge.com/ksp-mods/220530-part-wizard/files/2237849/download", "PartWizard.zip"), |
| 166 | + @("http://kerbalstuff.com/mod/731/Vessel%20Viewer/download/0.71", "VesselViewer.zip"), |
| 167 | + @("http://kerbalstuff.com/mod/776/Take%20Command/download/1.1.4", "TakeCommand.zip") |
| 168 | + ) |
| 169 | + |
| 170 | + Write-Output "Downloading Dev Mods." |
| 171 | + $index = 0 |
| 172 | + foreach ($devMod in $devModPack) { |
| 173 | + $index = $index+1 |
| 174 | + Write-Output "[$index of $($devModPack.count)]: $($devMod[1])" |
| 175 | + Invoke-WebRequest -Uri $devMod[0] -OutFile $devMod[1] |
| 176 | + } |
| 177 | +} |
| 178 | + |
| 179 | +# Beauty mods! |
| 180 | +if ($b -or $f){ |
| 181 | + Remove-Item -force 2048.zip #Remove low resolution RSS textures. |
| 182 | + |
| 183 | + $beautyModPack = @( |
| 184 | + @("http://github.com/KSP-RO/RSS-Textures/releases/download/v10.0/8192.zip", "8192.zip"), |
| 185 | + @("http://kerbal.curseforge.com/ksp-mods/224876-planetshine/files/2237465/download", "PlanetShine.zip"), |
| 186 | + @("http://github.com/MOARdV/DistantObject/releases/download/v1.5.6/DistantObject_1.5.6.zip", "DistantObject.zip"), |
| 187 | + @("http://beta.kerbalstuff.com/mod/124/Chatterer/download/0.9.5", "Chatterer.zip"), |
| 188 | + @("http://kerbalstuff.com/mod/190/Camera%20Tools/download/v1.3", "CameraTools.zip"), |
| 189 | + @("http://kerbalstuff.com/mod/381/Collision%20FX/download/3.2", "CollisionFX.zip"), |
| 190 | + @("http://kerbalstuff.com/mod/817/EngineLighting/download/1.3.6", "EngineLighting.zip"), |
| 191 | + @("http://kerbal.curseforge.com/ksp-mods/220207-hotrockets-particle-fx-replacement/files/2244672/download", "hotrocket.zip"), |
| 192 | + @("http://kerbalstuff.com/mod/743/Improved%20Chase%20Camera/download/v1.5.1", "ImprovedChaseCam.zip"), |
| 193 | + @("http://kerbalstuff.com/mod/224/Rover%20Wheel%20Sounds/download/1.2", "RoverWheelSounds.zip"), |
| 194 | + @("http://kerbalstuff.com/mod/700/Scatterer/download/0.151", "Scatterer.zip"), |
| 195 | + @("http://github.com/HappyFaceIndustries/BetterTimeWarp/releases/download/2.0/BetterTimeWarp_2.0.zip", "BetterTimeWarp.zip"), |
| 196 | + @("http://ksp.sarbian.com/jenkins/job/SmokeScreen/40/artifact/SmokeScreen-2.6.3.0.zip", "SmokeScreen.zip"), |
| 197 | + @("http://github.com/richardbunt/Telemachus/releases/download/v1.4.29.0/Telemachus_1_4_29_0.zip", "Telemachus.zip") |
| 198 | + ) |
| 199 | + |
| 200 | + Write-Output "Downloading Dev Mods." |
| 201 | + $index = 0 |
| 202 | + foreach ($beautyMod in $beautyModPack) { |
| 203 | + $index = $index+1 |
| 204 | + Write-Output "[$index of $($beautyModPack.count)]: $($beautyMod[1])" |
| 205 | + Invoke-WebRequest -Uri $beautyMod[0] -OutFile $beautyMod[1] |
| 206 | + } |
| 207 | +} |
| 208 | + |
| 209 | +# Unzip all the mods |
| 210 | + |
| 211 | +Write-Output "Extracting Mods" |
| 212 | +$childItems = Get-ChildItem ./ -Filter *.zip |
| 213 | +$index = 0 |
| 214 | +$childItems | |
| 215 | +foreach-Object { |
| 216 | + $index = $index + 1 |
| 217 | + $dirname = $_.FullName | %{$_ -replace ".zip",""} |
| 218 | + new-item -itemtype directory $dirname > $null |
| 219 | + if ($?){ |
| 220 | + Set-Location $dirname |
| 221 | + if ($?){ |
| 222 | + Write-Output "[$index of $($childItems.count)]: $_" |
| 223 | + unzip $_.FullName > $null |
| 224 | + Set-Location .. |
| 225 | + }else{ |
| 226 | + Write-Output "Could not unpack $_ - Set-Location failed" |
| 227 | + } |
| 228 | + }else{ |
| 229 | + Write-Output "Could not unpack $_ - new-item -itemtype directory failed" |
| 230 | + } |
| 231 | +} |
| 232 | + |
| 233 | +# Move all the mods to GameData folder |
| 234 | +Write-Output "Moving Mods" |
| 235 | +Get-ChildItem ./*/* -Filter GameData | |
| 236 | +foreach-Object { |
| 237 | + Copy-Item -force -recurse $_/* ../GameData |
| 238 | +} |
| 239 | +Set-Location .. |
| 240 | + |
| 241 | +# Custom move for base install |
| 242 | +Copy-Item -force -recurse ksp2m_mods/CrossFeedEnabler/* GameData |
| 243 | +Copy-Item -force -recurse ksp2m_mods/DeadlyReentry/* GameData |
| 244 | +Copy-Item -force -recurse ksp2m_mods/RealFuels/* GameData |
| 245 | +Copy-Item -force -recurse ksp2m_mods/RealSolarSystem/* GameData |
| 246 | +Copy-Item -force -recurse ksp2m_mods/Toolbar/Toolbar-1.7.9/GameData/* GameData |
| 247 | +Copy-Item -force -recurse ksp2m_mods/ksp-avc/* GameData |
| 248 | +Copy-Item -force -recurse ksp2m_mods/EngineIgnitor/* GameData |
| 249 | +Copy-Item -force -recurse "ksp2m_mods/KWRocketry/KW Release Package v2.7 (Open this, don't extract it)/GameData/*" GameData |
| 250 | +Copy-Item -force -recurse ksp2m_mods/UniversalStorage/* GameData |
| 251 | +Copy-Item -force -recurse ksp2m_mods/StockBugFixModules/* GameData |
| 252 | +Copy-Item -force -recurse ksp2m_mods/AIES_Aerospace151/* GameData |
| 253 | +Copy-Item -force -recurse ksp2m_mods/HullcaMove-ItemDS/* GameData |
| 254 | +Copy-Item -force -recurse ksp2m_mods/JDiminishingRTG/JDiminishingRTG_v1_3a/GameData/* GameData |
| 255 | +Copy-Item -force -recurse ksp2m_mods/NebulaDecals/NEBULA/* GameData |
| 256 | + |
| 257 | +# Custom move for dev |
| 258 | +if (-not $b -and -not $c){ |
| 259 | +Copy-Item -force -recurse ksp2m_mods/mechjeb2/* GameData |
| 260 | +Copy-Item -force -recurse ksp2m_mods/VesselViewer/* GameData |
| 261 | +Copy-Item -force -recurse ksp2m_mods/FShangarExtender/* GameData |
| 262 | +Copy-Item -force -recurse ksp2m_mods/PartWizard/* GameData |
| 263 | +Copy-Item -force -recurse ksp2m_mods/RCSbuildAid/* GameData |
| 264 | +Copy-Item -force -recurse ksp2m_mods/StripSymmetry/Gamedata/* GameData |
| 265 | +Copy-Item -force -recurse ksp2m_mods/EditorExtensions/* GameData |
| 266 | +} |
| 267 | + |
| 268 | +# Custom move for beauty |
| 269 | +if ($b -or $f){ |
| 270 | +Copy-Item -force -recurse ksp2m_mods/hotrocket/* GameData |
| 271 | +Copy-Item -force -recurse "ksp2m_mods/DistantObject/Alternate Planet Color Configs/Real Solar System (metaphor's PlanetFactory config)/*" GameData |
| 272 | +Copy-Item -force -recurse ksp2m_mods/EngineLighting/EngineLight/GameData/* GameData |
| 273 | +Copy-Item -force -recurse ksp2m_mods/ImprovedChaseCam/* GameData |
| 274 | +Copy-Item -force -recurse "ksp2m_mods/PlanetShine/Alternate Colors/Real Solar System/*" GameData |
| 275 | +Copy-Item -force -recurse ksp2m_mods/RoverWheelSounds/* GameData |
| 276 | +} |
| 277 | + |
| 278 | +# Fix some configs |
| 279 | +Write-Output "Adapting Configs" |
| 280 | +Copy-Item -recurse -force ksp2m_mods/RealismOverhaul/GameData/* GameData #We do this to make sure that we use the RO/RSS configs and not the configs provided by plugins installed after RO/RSS |
| 281 | +Copy-Item -force ksp2m_mods/RealismOverhaul/GameData/RealismOverhaul/RemoteTech_Settings.cfg GameData/RemoteTech/RemoteTech_Settings.cfg |
| 282 | +Copy-Item -force ksp2m_mods/EngineIgnitor.dll GameData/EngineIgnitor/Plugins/EngineIgnitor.dll |
| 283 | +Copy-Item -force ksp2m_mods/TextureReplacer/Extras/MM_ReflectionPluginWrapper.cfg GameData |
| 284 | +Copy-Item -force ksp2m_mods/StockPlusController.cfg GameData |
| 285 | +Copy-Item -force ksp2m_mods/AIES_Node_Patch.cfg/AIES_Node_Patch.cfg GameData |
| 286 | + |
| 287 | +# Clean up |
| 288 | +Write-Output "Starting Clean up" |
| 289 | +Remove-Item -Recurse -Force ksp2m_mods |
| 290 | +Set-Location GameData |
| 291 | +new-item -itemtype directory licensesAndReadmes |
| 292 | +if (Test-Path *.txt){ |
| 293 | +Move-Item *.txt licensesAndReadmes |
| 294 | +} |
| 295 | +if (Test-Path *.md){ |
| 296 | +Move-Item *.md licensesAndReadmes |
| 297 | +} |
| 298 | +if (Test-Path *.pdf){ |
| 299 | +Move-Item *.pdf licensesAndReadmes |
| 300 | +} |
| 301 | +if (Test-Path *.htm){ |
| 302 | +Move-Item *.htm licensesAndReadmes |
| 303 | +} |
| 304 | + |
| 305 | +#Remove-Item ModuleManager.2.5.1.dll |
| 306 | +Write-Output "Removing old ModuleManager Versions" |
| 307 | +Remove-Item ModuleManager.2.6.1.dll, ModuleManager.2.6.2.dll, ModuleManager.2.6.3.dll |
| 308 | + |
| 309 | +# Remove unneded parts |
| 310 | +Write-Output "Removing unneeded parts" |
| 311 | +# HabitatPack |
| 312 | +Remove-Item -Recurse -Force HabitatPack/Parts/Basemount |
| 313 | + |
| 314 | +# FASA |
| 315 | +Set-Location FASA |
| 316 | +Remove-Item -Recurse -Force Agencies, Flags, ICBM, Mercury, Resources |
| 317 | +Set-Location Apollo |
| 318 | +Remove-Item -Recurse -Force ApolloCSM, FASA_Apollo_Fairings, FASA_Apollo_Str, Science |
| 319 | +Set-Location LEM |
| 320 | +Remove-Item -Recurse -Force Antennas, AscentStage, DescentStage, DockingCone, InterStage, LandingLegs |
| 321 | +Set-Location ../../Gemini2 |
| 322 | +Remove-Item -Recurse -Force FASA_ASAS_MiniComp, FASA_Fairings_Plate_2m, FASA_Gemini_BigG, FASA_Gemini_Dec_Dark, FASA_Gemini_Engine_Fuel2, FASA_Gemini_LES, FASA_Gemini_LFT, FASA_Gemini_LFTLong, FASA_Gemini_Lander_Eng, FASA_Gemini_Lander_Legs, FASA_Gemini_Lander_Pod, FASA_Gemini_MOL, FASA_Gemini_NoseCone2, FASA_Gemini_Parachute2, FASA_Gemini_Pod2, FASA_Gemini_RCS_Thruster, FASA_Gemini_SAS_RCS, FASA_WingGemini, SmallGearBay |
| 323 | +Set-Location ../Probes |
| 324 | +Remove-Item -Recurse -Force Explorer, Pioneer, Probe_Parachute_Box |
| 325 | +Set-Location ../.. |
| 326 | + |
| 327 | +# Engine Ignitor |
| 328 | +Set-Location EngineIgnitor |
| 329 | +Remove-Item -Recurse -Force Parts |
| 330 | +Set-Location .. |
| 331 | + |
| 332 | +# DMagic -> UniversalStorage Parts |
| 333 | +Set-Location DMagicOrbitalScience |
| 334 | +Remove-Item -Recurse -Force UniversalStorage |
| 335 | +Set-Location .. |
| 336 | + |
| 337 | +# KW Rocketry |
| 338 | +Set-Location ../../KWRocketry/Parts |
| 339 | +Set-Location Fuel |
| 340 | +Remove-Item -Recurse -Force KW_Universal_Tanks |
| 341 | +Set-Location ../Structural |
| 342 | +Remove-Item -Recurse -Force KWFuelAdapter, KWFlatadapter* |
| 343 | +Set-Location ../../.. |
| 344 | + |
| 345 | +# NovaPunch2 |
| 346 | +Set-Location NovaPunch2 |
| 347 | +Remove-Item -Recurse -Force Agencies, Flags |
| 348 | +Set-Location Parts |
| 349 | +Remove-Item -Recurse -Force ControlPods, Fairings, FuelTanks, NoseCone, SAS, YawmasterCSM |
| 350 | +Set-Location CouplersAndAdapters |
| 351 | +Remove-Item -Recurse -Force NP_interstage* |
| 352 | +Set-Location ../Freyja |
| 353 | +Remove-Item -Recurse -Force FreyjaEng, FreyjaRCS, FreyjaTrunk |
| 354 | +Set-Location ../Odin2 |
| 355 | +Remove-Item -Recurse -Force OdinFairings, OdinPod, OdinRCS, OdinServiceModule |
| 356 | +Set-Location ../../.. |
| 357 | + |
| 358 | +# UKS/MKS |
| 359 | +Set-Location UmbraSpaceIndustries/Kolonization |
| 360 | +Remove-Item -Recurse -Force Flags |
| 361 | +Set-Location Parts |
| 362 | +Remove-Item -force MK3*, MKS_A*, MKS_C*, MKS_D*, MKS_E*, MKS_F*, MKS_K*, MKS_L*, MKS_M*, MKS_P*, MKS_S*, MKS_W*, MKV_Ag*, MKV_B*, MKV_L*, MKV_Pod.cfg, MKV_W*, MiniRover.cfg, OKS_A*, OKS_Col*, OKS_Ha*, OKS_K*, OKS_P*, OKS_S*, OKS_W*, OctoLander.cfg, ScanOMatic.cfg |
| 363 | +Set-Location ../../.. |
| 364 | + |
| 365 | +# UniversalStorage |
| 366 | +Set-Location UniversalStorage |
| 367 | +Remove-Item -Recurse -Force Flags |
| 368 | +Set-Location .. |
| 369 | + |
| 370 | +Set-Location $startingPath |
| 371 | + |
| 372 | +Write-Output "Finished!" |
0 commit comments