Compare commits

...

6 Commits
v1.0.0 ... dev

Author SHA1 Message Date
cc0a1de07b call task from pdm
remove build.ps1
2025-02-13 16:47:20 +00:00
9ee0dac610 run through formatter 2025-02-07 23:00:07 +00:00
c7b8622aac Merge branch 'dev' of https://github.com/onyx-and-iris/nvda-voicemeeter into dev 2025-02-07 16:07:51 +00:00
2706338fcb add Taskfile 2025-02-07 16:07:45 +00:00
ff98aa5f89 run through ruff 2025-02-03 00:14:41 +00:00
03252fe30f rename entry points 2025-01-25 15:08:55 +00:00
4 changed files with 47 additions and 28 deletions

40
Taskfile.yml Normal file
View 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/*"

View File

@ -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:

View File

@ -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 }

View File

@ -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 = [