mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance installation script for conditional build modes
- Updated the installation script to conditionally handle release builds by enabling debug information in the release profile. - Added logic to copy the PDB file alongside the executable to the installation directory, improving debugging capabilities.
This commit is contained in:
parent
9692c843e7
commit
a1cba88b94
1 changed files with 6 additions and 1 deletions
|
|
@ -5,7 +5,11 @@ param([string]$Mode = "release")
|
|||
$InstallDir = "C:\Program Files\Rojo"
|
||||
|
||||
Set-Location $PSScriptRoot
|
||||
cargo build "--$Mode"
|
||||
if ($Mode -eq "release") {
|
||||
cargo build --release --config "profile.release.debug=true"
|
||||
} else {
|
||||
cargo build "--$Mode"
|
||||
}
|
||||
$Rojo = ".\target\$Mode\rojo.exe"
|
||||
& "$Rojo" build plugin.project.json --plugin Rojo.rbxm
|
||||
if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" }
|
||||
|
|
@ -13,6 +17,7 @@ if ($LASTEXITCODE -ne 0) { throw "Plugin build failed" }
|
|||
gsudo Stop-Process -Name "rojo" -Force -ErrorAction SilentlyContinue
|
||||
gsudo New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
|
||||
gsudo Copy-Item "$Rojo" "$InstallDir\"
|
||||
gsudo Copy-Item ".\target\$Mode\rojo.pdb" "$InstallDir\"
|
||||
|
||||
$MachinePath = [Environment]::GetEnvironmentVariable("Path", "Machine")
|
||||
if ($MachinePath -notlike "*$InstallDir*") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue