30 lines
743 B
PowerShell
30 lines
743 B
PowerShell
# Stop on errors
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
# Directory of this script
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
|
|
# Detect OS architecture (not process architecture)
|
|
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
|
|
|
|
switch ($arch) {
|
|
"X64" {
|
|
$targetExe = Join-Path $ScriptDir "..\ViVeTool\IntelAMD\ViVeTool.exe"
|
|
}
|
|
"Arm64" {
|
|
$targetExe = Join-Path $ScriptDir "..\ViVeTool\Snapdragon\ViVeTool.exe"
|
|
}
|
|
default {
|
|
Write-Error "Unsupported architecture: $arch"
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
# Resolve full canonical path
|
|
$targetExe = (Resolve-Path $targetExe).Path
|
|
|
|
# Forward all arguments exactly
|
|
& $targetExe @args
|
|
|
|
# Return child exit code
|
|
exit $LASTEXITCODE |