mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2025-01-18 04:10:46 +00:00
upd spec path
This commit is contained in:
parent
f459cdee44
commit
70c225bda3
19
build.ps1
19
build.ps1
@ -4,36 +4,37 @@ param(
|
||||
[string]$theme
|
||||
)
|
||||
|
||||
function Format-Path {
|
||||
param($Kind)
|
||||
function Format-SpecName {
|
||||
param(
|
||||
[string]$Kind
|
||||
)
|
||||
return @(
|
||||
$prefix,
|
||||
(& { if ($theme) { $theme } else { "" } }),
|
||||
"${Kind}"
|
||||
$Kind
|
||||
).Where({ $_ -ne "" }) -Join "_"
|
||||
}
|
||||
|
||||
function Compress-Builds {
|
||||
$target = Join-Path -Path $PSScriptRoot -ChildPath "dist"
|
||||
@("basic", "banana", "potato") | ForEach-Object {
|
||||
$compress_path = Format-Path -Kind $_
|
||||
Compress-Archive -Path $(Join-Path -Path $target -ChildPath $compress_path) -DestinationPath $(Join-Path -Path $target -ChildPath "${compress_path}.zip") -Force
|
||||
$compressPath = Format-SpecName -Kind $_
|
||||
Compress-Archive -Path (Join-Path -Path $target -ChildPath $compressPath) -DestinationPath (Join-Path -Path $target -ChildPath "${compressPath}.zip") -Force
|
||||
}
|
||||
}
|
||||
|
||||
function Get-Builds {
|
||||
@("basic", "banana", "potato") | ForEach-Object {
|
||||
$spec_path = Format-Path -Kind $_
|
||||
$specName = Format-SpecName -Kind $_
|
||||
|
||||
"building $spec_path" | Write-Host
|
||||
Write-Host "building $specName"
|
||||
|
||||
poetry run pyinstaller "$spec_path.spec" --noconfirm
|
||||
poetry run pyinstaller --noconfirm --distpath (Join-Path -Path "dist" -ChildPath $specName) (Join-Path -Path "spec" -ChildPath "${specName}.spec")
|
||||
}
|
||||
}
|
||||
|
||||
function main {
|
||||
Get-Builds
|
||||
|
||||
Compress-Builds
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user