-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.ps1
More file actions
42 lines (37 loc) · 1.24 KB
/
Copy pathbuild.ps1
File metadata and controls
42 lines (37 loc) · 1.24 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
39
40
41
42
$ErrorActionPreference = "Stop"
$ProjectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$DistDir = Join-Path $ProjectRoot "dist"
$BuildDir = Join-Path $ProjectRoot "build"
$MainSource = Join-Path $ProjectRoot "src\luma_recorder.py"
$AdminSource = Join-Path $ProjectRoot "src\admin_launcher.py"
$MainVersion = Join-Path $ProjectRoot "packaging\version_main.txt"
$AdminVersion = Join-Path $ProjectRoot "packaging\version_admin.txt"
$Ffmpeg = (Get-Command ffmpeg.exe -ErrorAction Stop).Source
New-Item -ItemType Directory -Force -Path $DistDir | Out-Null
python -m PyInstaller `
--noconfirm `
--clean `
--windowed `
--onefile `
--name "LumaRecorder" `
--distpath "$DistDir" `
--workpath (Join-Path $BuildDir "main") `
--specpath "$ProjectRoot" `
--version-file "$MainVersion" `
--add-binary "$Ffmpeg;." `
"$MainSource"
python -m PyInstaller `
--noconfirm `
--clean `
--windowed `
--onefile `
--uac-admin `
--name "LumaRecorder_Admin" `
--distpath "$DistDir" `
--workpath (Join-Path $BuildDir "admin") `
--specpath "$ProjectRoot" `
--version-file "$AdminVersion" `
"$AdminSource"
Write-Host "Build complete:"
Write-Host (Join-Path $DistDir "LumaRecorder.exe")
Write-Host (Join-Path $DistDir "LumaRecorder_Admin.exe")