diff --git a/local-tool/scripts/bootstrap-windows.ps1 b/local-tool/scripts/bootstrap-windows.ps1 index ae49899..206d9f9 100644 --- a/local-tool/scripts/bootstrap-windows.ps1 +++ b/local-tool/scripts/bootstrap-windows.ps1 @@ -1,4 +1,4 @@ -# visionA-local — Windows 10/11 x86_64 一鍵 build +# visionA-local — Windows 10/11 x86_64 一鍵 build # # 使用方式(PowerShell 以「系統管理員」開啟): # git clone https://github.com/jim800121/visionA.git @@ -76,17 +76,21 @@ $projectPath = (Get-Location).Path $msysPath = '/' + $projectPath.Substring(0,1).ToLower() + '/' + ` ($projectPath.Substring(3) -replace '\\','/') -$bashCmd = "cd '$msysPath' && " + - "export VISIONA_ALLOW_GPL_FFMPEG=1 && " + - "make vendor-python-windows vendor-wheels-windows vendor-ffmpeg-windows vendor-ytdlp-windows && " + - "make payload-windows" +$bashParts = @( + "cd '$msysPath'", + 'export VISIONA_ALLOW_GPL_FFMPEG=1', + 'make vendor-python-windows vendor-wheels-windows vendor-ffmpeg-windows vendor-ytdlp-windows', + 'make payload-windows' +) switch ($Target) { 'payload-windows' { } - 'wails-windows' { $bashCmd += ' && make wails-windows' } - default { $bashCmd += ' && make wails-windows && make exe' } + 'wails-windows' { $bashParts += 'make wails-windows' } + default { $bashParts += 'make wails-windows'; $bashParts += 'make exe' } } +$bashCmd = $bashParts -join ' && ' + & 'C:\msys64\usr\bin\bash.exe' -lc $bashCmd if ($LASTEXITCODE -ne 0) { Fail "build 失敗,exit code=$LASTEXITCODE" }