Haiku: native Interface Kit user interface
Same workflow as the GTK interface: vehicle list, adding a vehicle by VIN, available updates, download folder, resumable download with progress, USB stick selection with an erase confirmation, writing, installation guide. Also a Preferences window (folder, language, automatic new-version check), an About window and the manual new-version check. Worker threads post closures to the window through a non-blocking queue (BMessenger with a zero timeout). Translations use gettext with the GTK catalogs; the default language comes from the Locale preferences. The executable gets its signature and version from a generated .rdef. Validated in the Haiku R1/beta6 VM against a mock Majestic server: full flow down to a FAT32 stick with license/, both archives and no UpdateInfo.xml; French interface; GitHub new-version check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
1 parent
e5af8ea27d
commit
155545660e
13 files changed
+2266
-372
No files matched your search
@@ -21,7 +21,7 @@ It is an alternative to the official "Peugeot Update" application (Windows/macOS
|
||||
- [x] Versioning (`--version`, About dialog, `vX.Y.Z` tags, GitHub releases)
|
||||
- [x] gettext translations (English, French)
|
||||
- [x] Haiku: core library, CLI and USB support (Storage Kit), validated in a Haiku R1/beta6 VM
|
||||
- [ ] Haiku UI
|
||||
- [x] Haiku UI (Interface Kit): complete workflow, preferences, new-version check
|
||||
- [x] GitHub Actions continuous integration (Linux x86_64 + arm64)
|
||||
- [ ] Linux packages: `.deb`, Flatpak and AppImage; Haiku: `.hpkg`
|
||||
- [ ] x86_64 + arm64 binaries attached to every release (from 1.0.0 on)
|
||||
@@ -52,6 +52,16 @@ tools/e2e-usb.sh ../build-openpu/debug/src/cli/openpu-cli --license X.key update
|
||||
When running from the build tree, `OPENPU_LOCALEDIR=../build-openpu/debug/locale` lets the
|
||||
interface find its translations.
|
||||
|
||||
## Building (Haiku)
|
||||
```sh
|
||||
pkgman install cmake ninja curl_devel libarchive_devel nlohmann_json gettext gettext_libintl_devel
|
||||
cmake -S . -B build -G Ninja && cmake --build build && build/tests/openpu_tests
|
||||
OPENPU_LOCALEDIR=build/locale build/src/ui-haiku/OpenPU # graphical interface
|
||||
build/src/cli/openpu-cli usb-list
|
||||
```
|
||||
`tools/haiku-vm.sh` installs and runs a Haiku R1/beta6 VM under QEMU/KVM (from WSL or Linux), with
|
||||
a virtual USB stick; `sync` copies the working tree into it and `ssh` runs commands there.
|
||||
|
||||
## Versioning
|
||||
- The reference version is `project(openpu VERSION x.y.z)` in `CMakeLists.txt`. On every build,
|
||||
`git describe` produces the displayed description (for example `0.2.0+3.g1a2b3c4.dirty`).
|
||||
@@ -60,13 +70,15 @@ interface find its translations.
|
||||
commits, tags, pushes to every remote and creates the release.
|
||||
|
||||
## Translations
|
||||
Source strings are in English and translations use gettext (`po/<language>.po`). To add a
|
||||
language:
|
||||
Source strings are in English and translations use gettext (`po/<language>.po`), on Linux and on
|
||||
Haiku: both interfaces share the same catalogs. On Haiku the default language is the first one of
|
||||
the Locale preferences. To add a language:
|
||||
1. update the template with `cmake --build <build> --target pot`, or with
|
||||
`python3 tools/extract_strings.py po/openpu.pot src/ui-gtk/main_window.cpp` if gettext is not
|
||||
installed;
|
||||
`python3 tools/extract_strings.py po/openpu.pot src/ui-gtk/main_window.cpp src/ui-haiku/main_window.cpp`
|
||||
if gettext is not installed;
|
||||
2. copy `po/openpu.pot` to `po/<language>.po` and translate it;
|
||||
3. add the language to `po/LINGUAS` and to the list in the Preferences dialog.
|
||||
3. add the language to `po/LINGUAS` and to the language list of the Preferences window of both
|
||||
interfaces.
|
||||
|
||||
## Tools
|
||||
- `tools/asar_extract.py`: minimal, read-only asar extractor used to study the reference
|
||||
|
||||
Reference in new issue
Block a user