Doubao-powered voice input for Linux, Wayland and Omarchy
chore: unify installer entry point
quanru989011bcd071
diff --git a/.github/workflows/midscene-omarchy-4.0.3.yml b/.github/workflows/midscene-omarchy-4.0.3.ymlindex 15644d5..3c0b4c1 100644--- a/.github/workflows/midscene-omarchy-4.0.3.yml+++ b/.github/workflows/midscene-omarchy-4.0.3.yml@@ -16,7 +16,6 @@ on:- "src/**"- "manifest.json"- "install.sh"- - "install-user.sh"- "setup-omarchy.sh"- "start.sh"- "omarchy/**"@@ -34,7 +33,6 @@ on:- "src/**"- "manifest.json"- "install.sh"- - "install-user.sh"- "setup-omarchy.sh"- "start.sh"- "omarchy/**"diff --git a/Makefile b/Makefileindex 34e8bb0..dd99416 100644--- a/Makefile+++ b/Makefile@@ -18,7 +18,7 @@ compile:$(PYTHON) -m compileall -q src/doubao_input tests packagingshell:- bash -n install.sh setup-omarchy.sh install-user.sh start.sh+ bash -n install.sh setup-omarchy.sh start.shwhitespace:git diff --checkdiff --git a/install-user.sh b/install-user.shdeleted file mode 100755index f05a59a..0000000--- a/install-user.sh+++ /dev/null@@ -1,14 +0,0 @@-#!/bin/bash-# Register this checkout as a desktop application. Keep its directory in place.-set -euo pipefail-PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)-export PYTHONPATH="$PROJECT_DIR/src${PYTHONPATH:+:$PYTHONPATH}"-export PYTHONDONTWRITEBYTECODE=1-if [[ -x "$PROJECT_DIR/.venv/bin/python" ]]; then- PYTHON_BIN="$PROJECT_DIR/.venv/bin/python"-else- PYTHON_BIN=$(command -v python3)-fi-"$PYTHON_BIN" -c 'from doubao_input.settings import install_desktop; print("Installed launcher:", install_desktop())'-printf '%s\n' 'Open Doubao Say from your launcher, then Settings to configure keys and startup.' \- 'This installer does not change compositor bindings, install local models, or enable autostart.'diff --git a/install.sh b/install.shindex 9ae6dc3..79bc7b5 100755--- a/install.sh+++ b/install.sh@@ -116,7 +116,15 @@ elseif $CHECK_ONLY; thenexit 0fi- "$ROOT/install-user.sh"+ export PYTHONPATH="$ROOT/src${PYTHONPATH:+:$PYTHONPATH}"+ export PYTHONDONTWRITEBYTECODE=1+ if [[ -x "$ROOT/.venv/bin/python" ]]; then+ python_bin="$ROOT/.venv/bin/python"+ else+ python_bin=$(command -v python3)+ fi+ "$python_bin" -c \+ 'from doubao_input.settings import install_desktop; print("Installed launcher:", install_desktop())'plugin_root=${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/plugins/$PLUGIN_IDif $ENABLE_PLUGIN; thenif [[ $ROOT != "$plugin_root" ]]; thendiff --git a/packaging/check-marketplace.py b/packaging/check-marketplace.pyindex 1d3ca8d..493862a 100644--- a/packaging/check-marketplace.py+++ b/packaging/check-marketplace.py@@ -30,7 +30,7 @@ def check_documents(snapshot):version = tomllib.loads((snapshot / "pyproject.toml").read_text())["project"]["version"]if version != manifest["version"]:raise ValueError("Package and plugin versions differ")- for name in ("start.sh", "setup-omarchy.sh", "install-user.sh"):+ for name in ("start.sh", "setup-omarchy.sh", "install.sh"):if not (snapshot / name).stat().st_mode & 0o111:raise ValueError(f"Launcher is not executable: {name}")diff --git a/tests/manual_source_install.py b/tests/manual_source_install.pyindex 0da1824..2ea5cd1 100644--- a/tests/manual_source_install.py+++ b/tests/manual_source_install.py@@ -31,8 +31,7 @@ def main():PATH=str(runtime / "bin") + os.pathsep + os.environ["PATH"],PYTHONPATH="", PYTHONDONTWRITEBYTECODE="1")subprocess.run(["omarchy", "plugin", "validate", str(plugin)], check=True)- subprocess.run([str(plugin / "setup-omarchy.sh"), "--check"], env=env, check=True)- subprocess.run([str(plugin / "install-user.sh")], env=env, check=True)+ subprocess.run([str(plugin / "install.sh"), "--yes"], env=env, check=True)entry = root / "data/applications/doubao-say.desktop"assert str(plugin / "start.sh") in entry.read_text()assert "Name=Doubao Say" in entry.read_text()diff --git a/tests/midscene/run-omarchy-midscene.sh b/tests/midscene/run-omarchy-midscene.shindex d38906d..1027236 100755--- a/tests/midscene/run-omarchy-midscene.sh+++ b/tests/midscene/run-omarchy-midscene.sh@@ -95,7 +95,7 @@ ssh_guest true# guest's actual Hyprland session.echo "Creating the Omarchy plugin test payload."tar -C "$ROOT_DIR" --exclude='__pycache__' -cf "$PLUGIN_ARCHIVE" \- LICENSE README.md manifest.json install.sh install-user.sh setup-omarchy.sh start.sh \+ LICENSE README.md manifest.json install.sh setup-omarchy.sh start.sh \omarchy src tests/midscene/gtk_fixture.pyfor _copy_attempt in 1 2 3 4 5; dodiff --git a/tests/test_release.py b/tests/test_release.pyindex ad4b4cc..e8c46cf 100644--- a/tests/test_release.py+++ b/tests/test_release.py@@ -107,6 +107,10 @@ class ReleaseTest(unittest.TestCase):self.assertEqual([name for name in Settings.__dataclass_fields__ if name.endswith("_key")], ["doubao_key"])def test_unified_installer_has_valid_shell_syntax_and_help(self):+ self.assertEqual(+ sorted(path.name for path in ROOT.glob("install*.sh")),+ ["install.sh"],+ )subprocess.run(["bash", "-n", str(ROOT / "install.sh")], check=True)result = subprocess.run([str(ROOT / "install.sh"), "--help"], check=True,text=True, capture_output=True)