23 lines
927 B
PowerShell
23 lines
927 B
PowerShell
# Kopiert dist\ in den Spielordner (64-Bit-Version). Entfernen: install.ps1 -Uninstall
|
|
param(
|
|
[string]$Game = "F:\SteamLibrary\steamapps\common\Bus-Simulator 2012",
|
|
[switch]$Uninstall
|
|
)
|
|
$ErrorActionPreference = "Stop"
|
|
$bin = Join-Path $Game "Bin_High_Win64"
|
|
if (-not (Test-Path "$bin\BusSimulator2012.exe")) { throw "Spiel nicht gefunden: $bin" }
|
|
|
|
if ($Uninstall) {
|
|
Remove-Item "$bin\dinput8.dll" -ErrorAction SilentlyContinue
|
|
Remove-Item "$bin\BSO" -Recurse -ErrorAction SilentlyContinue
|
|
Write-Host "BSO entfernt aus $bin"
|
|
return
|
|
}
|
|
|
|
$dist = Join-Path $PSScriptRoot "dist"
|
|
if (-not (Test-Path "$dist\dinput8.dll")) { throw "Erst build.ps1 ausfuehren" }
|
|
New-Item -ItemType Directory -Force "$bin\BSO" | Out-Null
|
|
Copy-Item "$dist\dinput8.dll" $bin -Force
|
|
Copy-Item "$dist\BSO\BSO.dll", "$dist\BSO\BSO.runtimeconfig.json", "$dist\BSO\BSO.deps.json" "$bin\BSO" -Force
|
|
Write-Host "BSO installiert nach $bin"
|