mirror of
https://github.com/OLmatter/glm-coding-helper.git
synced 2026-10-07 16:28:29 +08:00
PS 5.1 on Chinese Windows reads non-BOM files as the system ANSI codepage (GBK), so UTF-8 Chinese bytes corrupt parsing and surface as 'Missing expression after comma' at param blocks. Adding EF BB BF BOM forces PS 5.1 to interpret as UTF-8. Affects one_click_start.ps1 (the .cmd entry), bootstrap_windows.ps1, start_backend.ps1, setup_backend.ps1, start-backend-pipeline-gui.ps1, and the release scripts.
24 lines
599 B
PowerShell
24 lines
599 B
PowerShell
param(
|
|
[ValidateSet("auto", "cpu", "gpu", "both")]
|
|
[string]$Target = "auto",
|
|
[switch]$Recreate,
|
|
[switch]$SkipInstall,
|
|
[switch]$NoSmokeTest,
|
|
[string[]]$PipArg = @()
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$Root = Split-Path -Parent $PSScriptRoot
|
|
Set-Location $Root
|
|
|
|
$argsList = @("scripts\setup_backend.py", "--target", $Target)
|
|
if ($Recreate) { $argsList += "--recreate" }
|
|
if ($SkipInstall) { $argsList += "--skip-install" }
|
|
if ($NoSmokeTest) { $argsList += "--no-smoke-test" }
|
|
foreach ($arg in $PipArg) {
|
|
$argsList += "--pip-arg"
|
|
$argsList += $arg
|
|
}
|
|
|
|
python @argsList
|