gtk: interface GTK4, préférences, versions, traductions, licence MIT

- interface gtkmm-4 : véhicules, ajout par VIN, mises à jour, dossier,
  téléchargement avec reprise et arrêt, choix de la clé, confirmation,
  écriture avec progression, fin avec guide d'installation ; travail
  dans un thread, résultats renvoyés via Glib::Dispatcher
- préférences : dossier de téléchargement, langue (système par défaut),
  recherche automatique de nouvelle version d'OpenPU
- recherche de nouvelle version (releases GitHub, format tags Gitea
  accepté) avec ouverture de la page dans le navigateur ;
  openpu-cli app-update
- versions : project(VERSION) + git describe régénéré à chaque build,
  openpu-cli --version, À propos, User-Agent, CHANGELOG, tools/release.sh
  (étiquette annotée, push vers tous les remotes, release GitHub)
- traductions gettext : textes anglais, fr.po complet (96 chaînes),
  extracteur de secours sans xgettext
- core : module job (téléchargement licence/fw/carte), liens des guides
  PDF, ordre des véhicules conservé (ordered_json)
- licence MIT (LICENSE, en-têtes SPDX) ; dépôt principal sur GitHub
- validé dans WSLg : parcours complet jusqu'à l'écriture d'une clé loop
  (FAT32 propre, fichiers téléchargés supprimés)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
yann64andClaude Opus 5.5 committed 2026-11-28 19:54:04 +01:00
1 parent 6a7a2f1ee9
commit 384aaf78c6
62 files changed
+3029 -20

No files matched your search

+24 -1
View File
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: MIT
// openpu-cli — command-line front-end of libopenpu.
#include "openpu/api_client.hpp"
#include "openpu/app_update.hpp"
#include "openpu/archive.hpp"
#include "openpu/download.hpp"
#include "openpu/storage.hpp"
#include "openpu/usb.hpp"
#include "openpu/version.hpp"
#include "openpu/vin.hpp"
#include <algorithm>
@@ -30,6 +33,7 @@ extern "C" void onSignal(int /*sig*/)
void usage()
{
std::cerr << "usage: openpu-cli [--verbose] <command> [args]\n"
" openpu-cli --version\n"
"\n"
"commands:\n"
" check <VIN> identify the head unit and list available updates\n"
@@ -43,6 +47,7 @@ void usage()
" ERASE <device>, format FAT32 and write the update\n"
" write-dir <dir> [--license F] <archive.tar>...\n"
" write the update into an existing directory\n"
" app-update check for a newer OpenPU (exit status 10 if any)\n"
" raw-devices <VIN> print the raw devices/{VIN} response\n"
" raw-updates <VIN> print the raw getAvailableUpdate response\n"
"\n"
@@ -361,6 +366,22 @@ int run(std::vector<std::string> args)
curlOptions.verbose = true;
args.erase(args.begin());
}
if (args.size() == 1 && (args[0] == "--version" || args[0] == "version")) {
std::cout << "openpu-cli " << openpu::versionDescription() << '\n';
return 0;
}
if (args.size() == 1 && args[0] == "app-update") {
auto transport = openpu::makeCurlTransport(curlOptions);
const auto release = openpu::checkForNewerRelease(*transport, openpu::AppUpdateConfig::fromEnvironment(),
openpu::version());
if (!release) {
std::cout << "OpenPU " << openpu::version() << " is up to date\n";
return 0;
}
std::cout << "OpenPU " << release->version.toString() << " is available (this is " << openpu::version()
<< "): " << release->pageUrl << '\n';
return 10;
}
if (args.size() == 1 && args[0] == "usb-list")
return cmdUsbList();
if (args.size() < 2) {
@@ -418,7 +439,9 @@ int main(int argc, char** argv)
<< "): " << e.what() << '\n';
} catch (const openpu::UsbError& e) {
std::cerr << "\nUSB error: " << e.what() << '\n';
} catch (const openpu::StorageError& e) {
} catch (const openpu::NetworkError& e) {
std::cerr << "network error: " << e.what() << '\n';
} catch (const std::runtime_error& e) { // StorageError, ParseError, app-update errors...
std::cerr << "error: " << e.what() << '\n';
}
return 1;