-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild_LV_CAD_Debug.ps1
More file actions
38 lines (30 loc) · 1.52 KB
/
Build_LV_CAD_Debug.ps1
File metadata and controls
38 lines (30 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Param()
Write-Host "==============================================="
Write-Host " LV CAD PowerShell Build (DEBUG console)"
Write-Host "==============================================="
if (!(Test-Path .\app)) { Write-Host "ERROR: 'app' folder not found here." -ForegroundColor Red; exit 1 }
if (!(Test-Path .\app\boot.py)) { Write-Host "ERROR: app\boot.py missing." -ForegroundColor Red; exit 1 }
$py = "py"
try { & $py -V | Out-Null } catch { $py = "python" }
try { & $py -V | Out-Null } catch { Write-Host "ERROR: Python not found." -ForegroundColor Red; exit 1 }
Write-Host "Installing build requirements (pip, PySide6, ezdxf, packaging, pyinstaller) ..."
& $py -m pip install --upgrade pip
& $py -m pip install PySide6 ezdxf packaging pyinstaller
Write-Host "Building LV_CAD_Debug.exe (console visible) ..."
& $py -m PyInstaller --noconfirm --clean --console --name LV_CAD_Debug --paths . --add-data "VERSION.txt;." `
--hidden-import app `
--hidden-import app.main `
--hidden-import app.minwin `
--hidden-import app.scene `
--hidden-import app.device `
--hidden-import app.catalog `
--hidden-import app.tools `
--hidden-import app.tools.draw `
--hidden-import core.logger `
--hidden-import core.logger_bridge `
--hidden-import core.error_hook `
--hidden-import updater.auto_update `
app\boot.py
if ($LASTEXITCODE -ne 0) { Write-Host "ERROR: PyInstaller failed." -ForegroundColor Red; exit 1 }
Write-Host "Run this to see live logs and errors:" -ForegroundColor Yellow
Write-Host ".\dist\LV_CAD_Debug\LV_CAD_Debug.exe"