mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2026-04-08 17:03:32 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cf3205a86f | |||
| c0416d5b7c | |||
| a952f64bab | |||
| 3f6172c4bf | |||
| 96f3fbbee1 | |||
| 0bc566fa00 | |||
| c9b7f89453 | |||
| bdba07694b | |||
| 462301cd4e | |||
| 768fed217b | |||
| 34299ad84e | |||
| 7a78d7233e | |||
| 971b4a4601 | |||
| b219511ef8 |
53
.github/workflows/publish.yml
vendored
Normal file
53
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
pip install poetry==2.3.1
|
||||
poetry --version
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
poetry install --only-root
|
||||
poetry build
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: ./dist
|
||||
|
||||
pypi-publish:
|
||||
needs: build
|
||||
name: Upload release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/project/voicemeeter-compact/
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: ./dist
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: ./dist
|
||||
76
.github/workflows/release.yml
vendored
76
.github/workflows/release.yml
vendored
@@ -28,11 +28,9 @@ jobs:
|
||||
virtualenvs-in-project: true
|
||||
|
||||
- name: Install Task
|
||||
run: |
|
||||
Invoke-WebRequest -OutFile go-task.zip -Uri "https://github.com/go-task/task/releases/latest/download/task_windows_amd64.zip"
|
||||
Expand-Archive -Path go-task.zip -DestinationPath .
|
||||
Move-Item task.exe C:\Windows\System32\
|
||||
shell: pwsh
|
||||
uses: go-task/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
|
||||
- name: Download Forest TTK Theme
|
||||
run: |
|
||||
@@ -68,14 +66,31 @@ jobs:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- name: Install Poetry plugins
|
||||
run: poetry self add poethepoet
|
||||
shell: bash
|
||||
|
||||
- name: Replace path dependencies with PyPI versions
|
||||
run: |
|
||||
poetry remove voicemeeter-api vban-cmd || true
|
||||
poetry add voicemeeter-api vban-cmd
|
||||
shell: bash
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install --with build
|
||||
shell: bash
|
||||
|
||||
- name: Build artifacts with dynamic taskfile
|
||||
run: task --taskfile Taskfile.dynamic.yml build-all
|
||||
shell: bash
|
||||
env:
|
||||
POETRY_BIN: /c/Users/runneradmin/.local/bin/poetry
|
||||
|
||||
- name: Create release archives
|
||||
run: task --taskfile Taskfile.dynamic.yml compress-all
|
||||
shell: bash
|
||||
env:
|
||||
POETRY_BIN: /c/Users/runneradmin/.local/bin/poetry
|
||||
|
||||
# Sunvalley theme variants
|
||||
- name: Upload build artifacts - Sunvalley Basic
|
||||
@@ -100,77 +115,77 @@ jobs:
|
||||
- name: Upload build artifacts - Forest Basic Dark
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: forest-basic-dark
|
||||
path: dist/forest-basic-dark.zip
|
||||
name: forest-dark-basic
|
||||
path: dist/forest-dark-basic.zip
|
||||
|
||||
- name: Upload build artifacts - Forest Banana Dark
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: forest-banana-dark
|
||||
path: dist/forest-banana-dark.zip
|
||||
name: forest-dark-banana
|
||||
path: dist/forest-dark-banana.zip
|
||||
|
||||
- name: Upload build artifacts - Forest Potato Dark
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: forest-potato-dark
|
||||
path: dist/forest-potato-dark.zip
|
||||
name: forest-dark-potato
|
||||
path: dist/forest-dark-potato.zip
|
||||
|
||||
# Forest theme variants (light)
|
||||
- name: Upload build artifacts - Forest Basic Light
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: forest-basic-light
|
||||
path: dist/forest-basic-light.zip
|
||||
name: forest-light-basic
|
||||
path: dist/forest-light-basic.zip
|
||||
|
||||
- name: Upload build artifacts - Forest Banana Light
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: forest-banana-light
|
||||
path: dist/forest-banana-light.zip
|
||||
name: forest-light-banana
|
||||
path: dist/forest-light-banana.zip
|
||||
|
||||
- name: Upload build artifacts - Forest Potato Light
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: forest-potato-light
|
||||
path: dist/forest-potato-light.zip
|
||||
name: forest-light-potato
|
||||
path: dist/forest-light-potato.zip
|
||||
|
||||
# Azure theme variants (dark)
|
||||
- name: Upload build artifacts - Azure Basic Dark
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: azure-basic-dark
|
||||
path: dist/azure-basic-dark.zip
|
||||
name: azure-dark-basic
|
||||
path: dist/azure-dark-basic.zip
|
||||
|
||||
- name: Upload build artifacts - Azure Banana Dark
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: azure-banana-dark
|
||||
path: dist/azure-banana-dark.zip
|
||||
name: azure-dark-banana
|
||||
path: dist/azure-dark-banana.zip
|
||||
|
||||
- name: Upload build artifacts - Azure Potato Dark
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: azure-potato-dark
|
||||
path: dist/azure-potato-dark.zip
|
||||
name: azure-dark-potato
|
||||
path: dist/azure-dark-potato.zip
|
||||
|
||||
# Azure theme variants (light)
|
||||
- name: Upload build artifacts - Azure Basic Light
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: azure-basic-light
|
||||
path: dist/azure-basic-light.zip
|
||||
name: azure-light-basic
|
||||
path: dist/azure-light-basic.zip
|
||||
|
||||
- name: Upload build artifacts - Azure Banana Light
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: azure-banana-light
|
||||
path: dist/azure-banana-light.zip
|
||||
name: azure-light-banana
|
||||
path: dist/azure-light-banana.zip
|
||||
|
||||
- name: Upload build artifacts - Azure Potato Light
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: azure-potato-light
|
||||
path: dist/azure-potato-light.zip
|
||||
name: azure-light-potato
|
||||
path: dist/azure-light-potato.zip
|
||||
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
@@ -180,6 +195,9 @@ jobs:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
|
||||
19
.github/workflows/ruff.yml
vendored
Normal file
19
.github/workflows/ruff.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Ruff
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: astral-sh/ruff-action@v3
|
||||
with:
|
||||
args: 'format --check --diff'
|
||||
@@ -11,27 +11,27 @@ tasks:
|
||||
build:
|
||||
desc: Build specified themes dynamically (no spec files needed)
|
||||
cmds:
|
||||
- poetry run python tools/dynamic_builder.py {{.THEMES}}
|
||||
- ${POETRY_BIN:-poetry} run python tools/dynamic_builder.py {{.THEMES}}
|
||||
|
||||
build-all:
|
||||
desc: Build all themes
|
||||
cmds:
|
||||
- poetry run python tools/dynamic_builder.py all
|
||||
- ${POETRY_BIN:-poetry} run python tools/dynamic_builder.py all
|
||||
|
||||
build-azure:
|
||||
desc: Build only azure theme
|
||||
cmds:
|
||||
- poetry run python tools/dynamic_builder.py azure
|
||||
- ${POETRY_BIN:-poetry} run python tools/dynamic_builder.py azure
|
||||
|
||||
build-forest:
|
||||
desc: Build only forest theme
|
||||
cmds:
|
||||
- poetry run python tools/dynamic_builder.py forest
|
||||
- ${POETRY_BIN:-poetry} run python tools/dynamic_builder.py forest
|
||||
|
||||
build-sunvalley:
|
||||
desc: Build only sunvalley theme
|
||||
cmds:
|
||||
- poetry run python tools/dynamic_builder.py sunvalley
|
||||
- ${POETRY_BIN:-poetry} run python tools/dynamic_builder.py sunvalley
|
||||
|
||||
compress:
|
||||
desc: Compress artifacts for specified theme
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "voicemeeter-compact"
|
||||
version = "1.9.8"
|
||||
version = "1.10.0"
|
||||
description = "A Compact Voicemeeter Remote App"
|
||||
authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }]
|
||||
license = { text = "MIT" }
|
||||
@@ -14,9 +14,9 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
gui-basic-compact = "vmcompact.gui.basic:run"
|
||||
gui-banana-compact = "vmcompact.gui.banana:run"
|
||||
gui-potato-compact = "vmcompact.gui.potato:run"
|
||||
voicemeeter-compact-basic = "vmcompact.gui.basic:run"
|
||||
voicemeeter-compact-banana = "vmcompact.gui.banana:run"
|
||||
voicemeeter-compact-potato = "vmcompact.gui.potato:run"
|
||||
|
||||
[tool.poetry]
|
||||
packages = [{ include = "vmcompact" }]
|
||||
|
||||
@@ -5,6 +5,7 @@ Generates spec files on-the-fly and builds executables without storing intermedi
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -164,8 +165,9 @@ class DynamicBuilder:
|
||||
|
||||
# Build with PyInstaller
|
||||
dist_path = self.dist_dir / f'{theme_variant}-{kind}'
|
||||
poetry_bin = os.getenv('POETRY_BIN', 'poetry')
|
||||
cmd = [
|
||||
'poetry',
|
||||
poetry_bin,
|
||||
'run',
|
||||
'pyinstaller',
|
||||
'--noconfirm',
|
||||
@@ -179,14 +181,14 @@ class DynamicBuilder:
|
||||
cmd, cwd=self.base_dir, capture_output=True, text=True
|
||||
)
|
||||
if result.returncode == 0:
|
||||
print(f'✓ Built {theme_variant}-{kind}')
|
||||
print(f'[OK] Built {theme_variant}-{kind}')
|
||||
return True
|
||||
else:
|
||||
print(f'✗ Failed to build {theme_variant}-{kind}')
|
||||
print(f'[FAIL] Failed to build {theme_variant}-{kind}')
|
||||
print(f'Error: {result.stderr}')
|
||||
return False
|
||||
except Exception as e:
|
||||
print(f'✗ Exception building {theme_variant}-{kind}: {e}')
|
||||
print(f'[ERROR] Exception building {theme_variant}-{kind}: {e}')
|
||||
return False
|
||||
|
||||
def build_theme(self, theme_family: str) -> Dict[str, bool]:
|
||||
@@ -211,8 +213,9 @@ def run_rewriter(theme_family: str, base_dir: Path) -> bool:
|
||||
"""Run the theme rewriter if needed."""
|
||||
if theme_family in ['azure', 'forest']:
|
||||
print(f'Running rewriter for {theme_family} theme...')
|
||||
poetry_bin = os.getenv('POETRY_BIN', 'poetry')
|
||||
cmd = [
|
||||
'poetry',
|
||||
poetry_bin,
|
||||
'run',
|
||||
'python',
|
||||
'tools/rewriter.py',
|
||||
@@ -232,7 +235,8 @@ def run_rewriter(theme_family: str, base_dir: Path) -> bool:
|
||||
def restore_rewriter(base_dir: Path) -> bool:
|
||||
"""Restore files after rewriter."""
|
||||
print('Restoring rewriter changes...')
|
||||
cmd = ['poetry', 'run', 'python', 'tools/rewriter.py', '--restore']
|
||||
poetry_bin = os.getenv('POETRY_BIN', 'poetry')
|
||||
cmd = [poetry_bin, 'run', 'python', 'tools/rewriter.py', '--restore']
|
||||
try:
|
||||
result = subprocess.run(cmd, cwd=base_dir)
|
||||
return result.returncode == 0
|
||||
@@ -298,7 +302,7 @@ def main():
|
||||
total_count = 0
|
||||
|
||||
for build_name, success in all_results.items():
|
||||
status = '✓' if success else '✗'
|
||||
status = '[OK]' if success else '[FAIL]'
|
||||
print(f'{status} {build_name}')
|
||||
if success:
|
||||
success_count += 1
|
||||
|
||||
Reference in New Issue
Block a user