mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2025-04-12 00:23:48 +01:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
cc0a1de07b | |||
9ee0dac610 | |||
c7b8622aac | |||
2706338fcb | |||
ff98aa5f89 | |||
03252fe30f |
40
Taskfile.yml
Normal file
40
Taskfile.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
SHELL: pwsh
|
||||
|
||||
tasks:
|
||||
default:
|
||||
desc: Prepare artifacts for release
|
||||
cmds:
|
||||
- task: release
|
||||
|
||||
release:
|
||||
desc: Build and compress all artifacts
|
||||
cmds:
|
||||
- task: build
|
||||
- task: compress
|
||||
|
||||
build:
|
||||
desc: Build the project
|
||||
cmds:
|
||||
- for:
|
||||
matrix:
|
||||
KIND: [basic, banana, potato]
|
||||
cmd: pdm run pyinstaller --noconfirm --distpath dist/{{.ITEM.KIND}} spec/{{.ITEM.KIND}}.spec
|
||||
|
||||
compress:
|
||||
desc: Compress the build artifacts
|
||||
cmds:
|
||||
- for:
|
||||
matrix:
|
||||
KIND: [basic, banana, potato]
|
||||
cmd: '{{.SHELL}} -Command "Compress-Archive -Path dist/{{.ITEM.KIND}} -DestinationPath dist/{{.ITEM.KIND}}.zip -Force"'
|
||||
|
||||
clean:
|
||||
desc: Clean the project
|
||||
cmds:
|
||||
- |
|
||||
{{.SHELL}} -Command "
|
||||
Remove-Item -Recurse -Force build/basic,build/banana,build/potato
|
||||
Remove-Item -Recurse -Force dist/*"
|
@ -2,7 +2,7 @@ import voicemeeterlib
|
||||
|
||||
import nvda_voicemeeter
|
||||
|
||||
KIND_ID = "potato"
|
||||
KIND_ID = 'potato'
|
||||
|
||||
with voicemeeterlib.api(KIND_ID) as vm:
|
||||
with nvda_voicemeeter.draw(KIND_ID, vm) as window:
|
||||
|
23
build.ps1
23
build.ps1
@ -1,23 +0,0 @@
|
||||
function Compress-Builds {
|
||||
$target = Join-Path -Path $PSScriptRoot -ChildPath "dist"
|
||||
@("basic", "banana", "potato") | ForEach-Object {
|
||||
Compress-Archive -Path $(Join-Path -Path $target -ChildPath $_) -DestinationPath $(Join-Path -Path $target -ChildPath "${_}.zip") -Force
|
||||
}
|
||||
}
|
||||
|
||||
function Get-Builds {
|
||||
@("basic", "banana", "potato") | ForEach-Object {
|
||||
$specName = $_
|
||||
|
||||
Write-Host "building $specName"
|
||||
|
||||
pdm run pyinstaller --noconfirm --distpath (Join-Path -Path "dist" -ChildPath $specName) (Join-Path -Path "spec" -ChildPath "${specName}.spec")
|
||||
}
|
||||
}
|
||||
|
||||
function main {
|
||||
Get-Builds
|
||||
Compress-Builds
|
||||
}
|
||||
|
||||
if ($MyInvocation.InvocationName -ne '.') { main }
|
@ -19,9 +19,9 @@ build = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
gui-basic = "nvda_voicemeeter.gui.basic:run"
|
||||
gui-banana = "nvda_voicemeeter.gui.banana:run"
|
||||
gui-potato = "nvda_voicemeeter.gui.potato:run"
|
||||
gui-basic-nvda = "nvda_voicemeeter.gui.basic:run"
|
||||
gui-banana-nvda = "nvda_voicemeeter.gui.banana:run"
|
||||
gui-potato-nvda = "nvda_voicemeeter.gui.potato:run"
|
||||
|
||||
[build-system]
|
||||
requires = ["pdm-backend"]
|
||||
@ -31,7 +31,9 @@ build-backend = "pdm.backend"
|
||||
distribution = true
|
||||
|
||||
[tool.pdm.scripts]
|
||||
build = {shell = "pwsh build.ps1"}
|
||||
build = {shell = "task build"}
|
||||
compress = {shell = "task compress"}
|
||||
release = {composite = ["build", "compress"]}
|
||||
|
||||
[tool.ruff]
|
||||
exclude = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user