Compare commits

...

6 Commits

Author SHA1 Message Date
43379f1b09 fix path in release step 2025-01-24 01:41:40 +00:00
dc9ac5ddc3 add name to download action 2025-01-24 01:31:27 +00:00
9764b9d827 upd workflow 2025-01-24 01:05:57 +00:00
d95a2280c6 minor bump
update README with example bits in config
2025-01-24 00:49:55 +00:00
5534381981 reduce min supported version to 2022.1.0 (unsure if this is earliest it will work so we'll see) 2025-01-24 00:49:41 +00:00
0522b69420 read bits from config, defaults to cdll.BITS
reflect change in script_announce_voicemeeter_version
2025-01-24 00:48:59 +00:00
8 changed files with 36 additions and 47 deletions

View File

@ -15,50 +15,46 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm sync -d -G build
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
- name: building addon
run: pdm run scons
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
sudo apt-get update -y
sudo apt-get install -y gettext
- name: Code checks
run: export SKIP=no-commit-to-branch; pre-commit run --all
- name: building addon
run: scons
- uses: actions/upload-artifact@v3
with:
name: packaged_addon
path: ./*.nvda-addon
- uses: actions/upload-artifact@v4
with:
name: packaged_addon
path: ./*.nvda-addon
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: download releases files
uses: actions/download-artifact@v4.1.7
with:
name: packaged_addon
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: softprops/action-gh-release@v1
with:
files: packaged_addon/*.nvda-addon
files: ./*.nvda-addon
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}

View File

@ -85,6 +85,7 @@ example:
```json
{
"voicemeeter": "banana",
"bits": 64,
"keybinds": {
"NVDA+alt+k": "strip_mode",
"NVDA+alt+l": "bus_mode",
@ -120,6 +121,7 @@ example:
Would make the following changes:
- load the plugin in `banana` mode (default is potato)
- override the bits of Voicemeeter GUI to 64 (default is 32)
- change the `strip_mode` and `bus_mode` binds to `NVDA+alt+k` and `NVDA+alt+l` respectively
- change the `announce_voicemeeter_version` bind to `NVDA+shift+z`
- changes the bus assignment binds to `NVDA+control+number`

View File

@ -43,7 +43,4 @@ dll_path = vm_parent.joinpath(DLL_NAME)
if not dll_path.is_file():
raise VMError(f'Could not find {dll_path}')
if BITS == 64:
libc = ct.CDLL(str(dll_path))
else:
libc = ct.WinDLL(str(dll_path))
libc = ct.WinDLL(str(dll_path))

View File

@ -8,7 +8,7 @@ class CommandsMixin:
### ANNOUNCEMENTS ###
def script_announce_voicemeeter_version(self, _):
ui.message(f'Running Voicemeeter {self.kind} {self.controller.version}')
ui.message(f'Running Voicemeeter {self.kind} {self.controller.version} {self.controller.bits} bit')
def script_announce_controller(self, _):
ui.message(f'Controller for {self.controller.ctx.strategy} {self.controller.ctx.index + 1}')

View File

@ -2,6 +2,7 @@ import ctypes as ct
from logHandler import log
from . import config
from .binds import Binds
from .cdll import BITS
from .context import Context, StripStrategy
@ -11,6 +12,7 @@ from .kinds import KindId
class Controller(Binds):
def __init__(self):
self.ctx = Context(StripStrategy(self, 0))
self.bits = config.get('bits', BITS)
def login(self):
retval = self.call(self.bind_login, ok=(0, 1))
@ -40,8 +42,8 @@ class Controller(Binds):
def run_voicemeeter(self, kind_id):
val = kind_id.value
if val == 3 and BITS == 64:
val = 6
if self.bits == 64:
val += 3
self.call(self.bind_run_voicemeeter, val)
def __clear(self):

View File

@ -14,11 +14,6 @@ class KindId(Enum):
@dataclass
class KindMapClass:
name: str
ins: tuple
outs: tuple
vban: tuple
asio: tuple
insert: int
@property
def phys_in(self) -> int:
@ -50,7 +45,6 @@ class KindMapClass:
@dataclass
class BasicMap(KindMapClass):
name: str
ins: tuple = (2, 1)
outs: tuple = (1, 1)
vban: tuple = (4, 4, 1, 1)
@ -60,7 +54,6 @@ class BasicMap(KindMapClass):
@dataclass
class BananaMap(KindMapClass):
name: str
ins: tuple = (3, 2)
outs: tuple = (3, 2)
vban: tuple = (8, 8, 1, 1)
@ -70,7 +63,6 @@ class BananaMap(KindMapClass):
@dataclass
class PotatoMap(KindMapClass):
name: str
ins: tuple = (5, 3)
outs: tuple = (5, 3)
vban: tuple = (8, 8, 1, 1)

View File

@ -28,7 +28,7 @@ addon_info = {
The add-on requires Voicemeeter to be installed."""
),
# version
'addon_version': '1.0.0',
'addon_version': '1.1.0',
# Author(s)
'addon_author': 'onyx-and-iris <code@onyxandiris.online>',
# URL for the add-on documentation support
@ -38,7 +38,7 @@ The add-on requires Voicemeeter to be installed."""
# Documentation file name
'addon_docFileName': 'readme.html',
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
'addon_minimumNVDAVersion': '2024.4.0',
'addon_minimumNVDAVersion': '2022.1.0',
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
'addon_lastTestedNVDAVersion': '2024.4.2',
# Add-on update channel (default is None, denoting stable releases,

View File

@ -1,6 +1,6 @@
[project]
name = "nvda-addon-voicemeeter"
version = "1.0.0"
version = "1.1.0"
description = "A GUI-less NVDA Addon for Voicemeeter using the Remote API"
authors = [
{name = "Onyx and Iris", email = "code@onyxandiris.online"},
@ -51,8 +51,8 @@ exclude = [
line-length = 120
indent-width = 4
# Assume Python 3.10
target-version = "py310"
# Assume Python 3.11
target-version = "py311"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.