Skip to content

Divvun's macOS package manager for the Páhkat repository format

License

Notifications You must be signed in to change notification settings

divvun/divvun-manager-macos

Repository files navigation

Divvun Manager for macOS

Build Status

Overview

Divvun Manager is a macOS app that manages the installation and configuration of Divvun spellers, keyboards and text-to-speech voices via Pahkat.

  • Keyboards are installed in /Library/Keyboard Layouts/
  • Spellers are installed in /Library/Services/
  • Voices are installed in /Library/Speech/Synthesizers/Divvun, and exposed to the system via the app Divvun Speech.app

Download

Architecture

Divvun Manager installs and communicates with Pahkatd via RPC over a UNIX socket. Pahkatd is a service that manages package installation and removal. It is written in Rust and is available at divvun/pahkat.

flowchart TD
    DM[Divvun Manager] --RPC--> Pahkatd
    Pahkatd --HTTP--> PR[Pahkat Repositories]
Loading

Running Locally

To run everything locally, you must also run pahkat-rpc locally. To do this:

  1. Clone https://github.com/divvun/pahkat
  2. Make sure the socket path is the same between macOS and pahkat-rpc (you might need to temporarily change it in Pahkat to match the one in macOS)
  3. If you have Divvun Manager installed, make sure pahkatd is not running. The easiest way to do this is to delete /Applications/Divvun Manager.app/Contents/MacOS/pahkatd and kill pahkatd in Activity Monitor.app
  4. Run pahkat-rpc. Go to the pahkat-rpc dir and run cargo run --bin server --features macos
  5. Run Divvun Manager from Xcode.

You should see evidence that Divvun Manager is connecting to your locally running instance of pahkatd.

Generating Localisations

This project uses bbqsrc/i18n-eller to manage the generation of localisations.

If you make an update to anything in Sources/Support/LocalisationResources/, run from the divvun-manager-macos/ directory:

i18n-eller generate swift \
  Sources/Support/LocalisationResources/base.yaml \
  Sources/Support/LocalisationResources/{your target lang}.yaml \
  -o Sources/

Localisation of entries

  • language names: make PR here
  • package names/descriptions:
    • keyboards: add entries in keyboard-XXX/XXX.kbdgen/project.yaml
    • spellers: add entries in lang-XXX/manifest.toml.in

Logging

Log files can be bundled and exported in the help menu. It gather log files from Divvun Manager, Pahkatd and MacDivvun. Since the app is running as user, all log folders need to be accessible by others. (Pahkatd service checks folder permission on every launch)

Cleanup MacDivvun

If for some reason MacDivvun has been uninstalled or removed without the help of Divvun Manager, it can't be fixed automatically by it. To fix a situation like this, do as follows:

  • add the following url to the repo list in the Divvun Manager settings: https://pahkat.uit.no/tools
  • a section Divvun Tools should appear at the end of the All Repositories listing
  • uninstall MacDivvun Speller Engine by checkmarking it and run uninstall
  • reinstall MacDivvun Speller Engine by checkmarking it and run install
  • restart your computer

It should really not be necessary to do this. If it happens more than once, try to notice what caused it to happen, and file a bug report in issues.

License

GPLv3 — see LICENSE file.