mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2025-04-19 20:13:46 +01:00
Compare commits
No commits in common. "dev" and "v1.0.0" have entirely different histories.
40
Taskfile.yml
40
Taskfile.yml
@ -1,40 +0,0 @@
|
|||||||
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
|
import nvda_voicemeeter
|
||||||
|
|
||||||
KIND_ID = 'potato'
|
KIND_ID = "potato"
|
||||||
|
|
||||||
with voicemeeterlib.api(KIND_ID) as vm:
|
with voicemeeterlib.api(KIND_ID) as vm:
|
||||||
with nvda_voicemeeter.draw(KIND_ID, vm) as window:
|
with nvda_voicemeeter.draw(KIND_ID, vm) as window:
|
||||||
|
23
build.ps1
Normal file
23
build.ps1
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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]
|
[project.scripts]
|
||||||
gui-basic-nvda = "nvda_voicemeeter.gui.basic:run"
|
gui-basic = "nvda_voicemeeter.gui.basic:run"
|
||||||
gui-banana-nvda = "nvda_voicemeeter.gui.banana:run"
|
gui-banana = "nvda_voicemeeter.gui.banana:run"
|
||||||
gui-potato-nvda = "nvda_voicemeeter.gui.potato:run"
|
gui-potato = "nvda_voicemeeter.gui.potato:run"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["pdm-backend"]
|
requires = ["pdm-backend"]
|
||||||
@ -31,9 +31,7 @@ build-backend = "pdm.backend"
|
|||||||
distribution = true
|
distribution = true
|
||||||
|
|
||||||
[tool.pdm.scripts]
|
[tool.pdm.scripts]
|
||||||
build = {shell = "task build"}
|
build = {shell = "pwsh build.ps1"}
|
||||||
compress = {shell = "task compress"}
|
|
||||||
release = {composite = ["build", "compress"]}
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
exclude = [
|
exclude = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user