diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 00000000..ffbdb1b9 --- /dev/null +++ b/install.ps1 @@ -0,0 +1,14 @@ +#Requires -Version 5.1 + +param([string]$Mode = "release") +$DeployFolder = "C:\Program Files\Rojo" + +Set-Location $PSScriptRoot +cargo build "--$Mode" +& ".\target\$Mode\rojo.exe" build plugin.project.json --plugin Rojo.rbxm +if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" } +gsudo { + Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue + Remove-Item "$DeployFolder\*" -Recurse -Force + Copy-Item ".\target\$Mode\rojo.exe" "$DeployFolder\" +}