mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor Windows install script to streamline executable path handling and improve readability. Updated the path variable for the executable and simplified the gsudo commands for stopping the process and copying the executable.
This commit is contained in:
parent
83bbf0ef6b
commit
cc7d2e3848
1 changed files with 4 additions and 5 deletions
|
|
@ -4,9 +4,8 @@ param([string]$Mode = "release")
|
|||
|
||||
Set-Location $PSScriptRoot
|
||||
cargo build "--$Mode"
|
||||
& ".\target\$Mode\rojo.exe" build plugin.project.json --plugin Rojo.rbxm
|
||||
$ExePath = ".\target\$Mode\rojo.exe"
|
||||
& "$ExePath" build plugin.project.json --plugin Rojo.rbxm
|
||||
if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" }
|
||||
gsudo {
|
||||
Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue
|
||||
Copy-Item ".\target\$Mode\rojo.exe" "C:\Program Files\Rojo\"
|
||||
}
|
||||
gsudo Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue
|
||||
gsudo Copy-Item "$ExePath" "C:\Program Files\Rojo\"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue