rojo/install.ps1
Joe b2e03f07c7 Add vscode-rojo installation script execution to install scripts
- Updated `install.ps1` to include execution of the vscode-rojo installation script.
- Modified `install.sh` to change directory and run the vscode-rojo installation script, ensuring proper setup during installation.
2026-02-08 16:30:55 -06:00

30 lines
997 B
PowerShell

#Requires -Version 5.1
param([string]$Mode = "release")
$InstallDir = "C:\Program Files\Atlas"
Set-Location $PSScriptRoot
if ($Mode -eq "release") {
cargo build --release --config "profile.release.debug=true"
} else {
cargo build "--$Mode"
}
$Atlas = ".\target\$Mode\atlas.exe"
& "$Atlas" build plugin.project.json --plugin Atlas.rbxm
if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" }
gsudo Stop-Process -Name "atlas" -Force -ErrorAction SilentlyContinue
gsudo New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
gsudo Copy-Item "$Atlas" "$InstallDir\"
gsudo Copy-Item ".\target\$Mode\atlas.pdb" "$InstallDir\"
$MachinePath = [Environment]::GetEnvironmentVariable("Path", "Machine")
if ($MachinePath -notlike "*$InstallDir*") {
gsudo [Environment]::SetEnvironmentVariable "Path" "$MachinePath;$InstallDir" "Machine"
Write-Host "Added '$InstallDir' to system PATH"
}
Push-Location "$PSScriptRoot\vscode-rojo"
& "$PSScriptRoot\vscode-rojo\install.ps1"
Pop-Location