2026-03-18 09:04:37 +08:00
|
|
|
# Build WoW_MultiTool.exe (GUI)
|
|
|
|
|
# Usage: .\build_exe.ps1
|
|
|
|
|
|
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
Set-Location $PSScriptRoot
|
|
|
|
|
|
|
|
|
|
Write-Host "Checking dependencies..." -ForegroundColor Cyan
|
|
|
|
|
& pip show pyinstaller 2>$null | Out-Null
|
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
|
Write-Host "Installing dependencies..." -ForegroundColor Yellow
|
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Write-Host "Building WoW_MultiTool.exe ..." -ForegroundColor Cyan
|
|
|
|
|
pyinstaller --noconfirm build_wow_multikey.spec
|
|
|
|
|
if ($LASTEXITCODE -ne 0) { exit 1 }
|
|
|
|
|
|
2026-04-19 15:53:45 +08:00
|
|
|
$outExe = "dist\Chrome_Updater.exe"
|
2026-03-18 09:04:37 +08:00
|
|
|
|
|
|
|
|
Write-Host "Copying recorder folder to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "dist\recorder") { Remove-Item "dist\recorder" -Recurse -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "recorder") { Copy-Item "recorder" "dist\recorder" -Recurse -Force }
|
|
|
|
|
|
|
|
|
|
Write-Host "Copying game_state_config.json to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "game_state_config.json") { Copy-Item "game_state_config.json" "dist\game_state_config.json" -Force }
|
|
|
|
|
|
2026-04-19 15:53:45 +08:00
|
|
|
Write-Host "Copying ddl folder to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "dist\ddl") { Remove-Item "dist\ddl" -Recurse -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "ddl") { Copy-Item "ddl" "dist\ddl" -Recurse -Force }
|
|
|
|
|
|
2026-05-07 15:19:59 +08:00
|
|
|
Write-Host "Copying Ghostbox_ddl folder to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "dist\Ghostbox_ddl") { Remove-Item "dist\Ghostbox_ddl" -Recurse -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "Ghostbox_ddl") { Copy-Item "Ghostbox_ddl" "dist\Ghostbox_ddl" -Recurse -Force }
|
|
|
|
|
|
2026-04-19 15:53:45 +08:00
|
|
|
Write-Host "Copying images folder to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "dist\images") { Remove-Item "dist\images" -Recurse -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "images") { Copy-Item "images" "dist\images" -Recurse -Force }
|
|
|
|
|
|
|
|
|
|
Write-Host "Copying combat_loops folder to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "dist\combat_loops") { Remove-Item "dist\combat_loops" -Recurse -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "combat_loops") { Copy-Item "combat_loops" "dist\combat_loops" -Recurse -Force }
|
|
|
|
|
|
|
|
|
|
Write-Host "Copying loot_path.json to dist..." -ForegroundColor Cyan
|
|
|
|
|
if (Test-Path "loot_path.json") { Copy-Item "loot_path.json" "dist\loot_path.json" -Force }
|
|
|
|
|
|
2026-03-18 09:04:37 +08:00
|
|
|
# Optional cleanup of old outputs
|
|
|
|
|
if (Test-Path "dist\AutoBotMove.exe") { Remove-Item "dist\AutoBotMove.exe" -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "dist\vendor.json") { Remove-Item "dist\vendor.json" -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
if (Test-Path "dist\waypoints.json") { Remove-Item "dist\waypoints.json" -Force -ErrorAction SilentlyContinue }
|
|
|
|
|
|
|
|
|
|
if (Test-Path $outExe) {
|
|
|
|
|
Write-Host "`nBuild done!" -ForegroundColor Green
|
|
|
|
|
Write-Host "Output: $outExe" -ForegroundColor Green
|
|
|
|
|
if (Test-Path "dist\recorder") { Write-Host "Copied: dist\recorder" -ForegroundColor Green }
|
|
|
|
|
exit 0
|
|
|
|
|
} else {
|
|
|
|
|
Write-Host "Build failed: $outExe not found." -ForegroundColor Red
|
|
|
|
|
exit 1
|
|
|
|
|
}
|