You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
760 B

$ErrorActionPreference = "Stop"
$projectRoot = $PSScriptRoot
$wailsCommand = Join-Path (go env GOPATH) "bin\wails.exe"
Set-Location -LiteralPath $projectRoot
if (-not (Test-Path -LiteralPath $wailsCommand)) {
throw "未找到 Wails CLI。请先执行:go install github.com/wailsapp/wails/v2/cmd/wails@v2.15.0"
}
& $wailsCommand build -clean -o "MultiClawController.exe"
if ($LASTEXITCODE -ne 0) {
throw "Wails 编译失败。请先退出正在运行的 MultiClawController,然后重试。"
}
$configTarget = Join-Path $projectRoot "build\bin\config"
Copy-Item -LiteralPath (Join-Path $projectRoot "config") -Destination $configTarget -Recurse -Force
Write-Host "编译完成:$(Join-Path $projectRoot 'build\bin\MultiClawController.exe')"