Refactor executable path handling in Windows install script for improved clarity and consistency. Updated variable names for better readability and ensured correct path usage in gsudo commands.

This commit is contained in:
Joe 2025-12-20 20:59:30 -06:00
parent cc7d2e3848
commit 63f849e735

View file

@ -4,8 +4,8 @@ param([string]$Mode = "release")
Set-Location $PSScriptRoot
cargo build "--$Mode"
$ExePath = ".\target\$Mode\rojo.exe"
& "$ExePath" build plugin.project.json --plugin Rojo.rbxm
$Rojo = ".\target\$Mode\rojo.exe"
& "$Rojo" build plugin.project.json --plugin Rojo.rbxm
if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" }
gsudo Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue
gsudo Copy-Item "$ExePath" "C:\Program Files\Rojo\"
gsudo Copy-Item "$Rojo" "C:\Program Files\Rojo\"