From 19831807b0c33b1911d1bc89f76256ea0dc142ec Mon Sep 17 00:00:00 2001 From: Denis Defolie Date: Sun, 11 Oct 2026 17:46:34 +0200 Subject: [PATCH] Wire up Linux and Windows exports export_presets.cfg is hand-written (no editor GUI available here): a minimal preset per platform (name, platform, path, x86_64 architecture) is enough, since Godot fills every other option from its platform defaults. tools/setup.sh now also fetches the matching export templates (~1.2GB, cached outside the repo like the Godot binary itself) -- note the directory it unpacks into uses a dot before "stable" while .godot-version and the download URLs use a hyphen, two different spellings of the same version that are easy to conflate. Both make export-linux and make export-windows now actually run and produce a working package; tests/ and addons/gut/ are excluded from the exported .pck (124KB vs 1.5MB before -- a dev-only dependency has no business shipping to a child's machine). The Linux binary was smoke-tested headless and boots cleanly; the Windows .exe could only be confirmed as a valid PE32+ binary, since no Windows machine or Wine is available in this environment -- flagged in docs/testing/manual-checklist.md rather than claimed as verified. This closes out every step in the launch prompt's "Ordre de construction." README status lines updated to reflect the first playable prototype rather than a bare skeleton. Co-Authored-By: Claude Sonnet 5 --- Makefile | 8 +++--- README-EN.md | 4 +-- README.md | 4 +-- docs/specs/decisions.md | 8 ++++++ docs/testing/manual-checklist.md | 10 +++++-- export_presets.cfg | 45 ++++++++++++++++++++++++++++++++ tools/setup.sh | 19 ++++++++++++++ 7 files changed, 88 insertions(+), 10 deletions(-) create mode 100644 export_presets.cfg diff --git a/Makefile b/Makefile index b5d14cb..f04f740 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,9 @@ content-review: $(PYTHON) tools/generate_content_review.py export-linux: - @echo "Export Linux : pas encore configure (voir Ordre de construction, etape 6)." - @exit 1 + mkdir -p build/linux + $(GODOT_BIN) --headless --path . --export-release "Linux" build/linux/aventuriers_des_mots.x86_64 export-windows: - @echo "Export Windows : pas encore configure (voir Ordre de construction, etape 6)." - @exit 1 + mkdir -p build/windows + $(GODOT_BIN) --headless --path . --export-release "Windows" build/windows/aventuriers_des_mots.exe diff --git a/README-EN.md b/README-EN.md index 0daf8f1..09b0c63 100644 --- a/README-EN.md +++ b/README-EN.md @@ -2,7 +2,7 @@ An educational French-language game for 7-9 year olds (French grades CE1-CE2): an offline 2D adventure with an explorable map, a guide character, and grammar, spelling, and dictation exercises. -Open source project, in development. Current status: technical skeleton (see `docs/specs/decisions.md` for scoping decisions and `docs/specs/cahier-des-charges.md` for the full specification, both in French — this is a French-curriculum product). +Open source project, in development. Current status: first playable prototype (scope of cahier-des-charges §15) — boot, profiles, a three-location map, all three exercise types, saves, Linux/Windows exports. Pedagogical content is still minimal (see `docs/specs/decisions.md` for scoping decisions and `docs/specs/cahier-des-charges.md` for the full specification, both in French — this is a French-curriculum product). ## Tech stack @@ -27,7 +27,7 @@ make run # runs the game | `make validate-data` | validates the JSON files in `data/` | | `make test` | headless tests | | `make check` | lint + validate-data + test, must pass before every commit | -| `make export-linux` / `make export-windows` | exports into `build/` (from the export step onward) | +| `make export-linux` / `make export-windows` | exports into `build/` | ## Structure diff --git a/README.md b/README.md index f0b6792..b3fba93 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Jeu éducatif de français pour les CE1-CE2 (7-9 ans) : une aventure 2D hors ligne, avec une carte à explorer, un personnage guide, et des exercices de grammaire, d'orthographe et de dictées. -Projet open source, en développement. Statut actuel : squelette technique (voir `docs/specs/decisions.md` pour les décisions de cadrage et `docs/specs/cahier-des-charges.md` pour la spécification complète). +Projet open source, en développement. Statut actuel : premier prototype jouable (périmètre du §15 du cahier des charges) — démarrage, profils, carte à trois lieux, trois types d'exercices, sauvegardes, exports Linux/Windows. Contenu pédagogique encore minimal (voir `docs/specs/decisions.md` pour les décisions de cadrage et `docs/specs/cahier-des-charges.md` pour la spécification complète). ## Pile technique @@ -27,7 +27,7 @@ make run # lance le jeu | `make validate-data` | valide les JSON de `data/` | | `make test` | tests headless | | `make check` | lint + validate-data + test, à passer avant chaque commit | -| `make export-linux` / `make export-windows` | exports dans `build/` (à partir de l'étape export) | +| `make export-linux` / `make export-windows` | exports dans `build/` | ## Structure diff --git a/docs/specs/decisions.md b/docs/specs/decisions.md index 2d6d2d8..5eb5887 100644 --- a/docs/specs/decisions.md +++ b/docs/specs/decisions.md @@ -128,3 +128,11 @@ Ajouts à l'arborescence proposée : - **Pas de verrouillage de région** pour cette version : les trois missions sont accessibles d'emblée (correspond à « une carte avec trois lieux accessibles » du §15). Le champ `unlocked_regions` existe toujours dans la sauvegarde mais n'est pas encore lu par la carte. - **Audio des dictées** : `AudioManager.play_dictation()` existe et cherche `assets/audio/dictations/.ogg`, mais aucun fichier n'a encore été généré (étape « Graphismes et audio provisoires », à venir) ; l'absence de fichier produit un avertissement, jamais un plantage. - **Non vérifié visuellement** : voir `docs/testing/manual-checklist.md`. Un test headless instancie `exercise_host.tscn` et simule les signaux (sans jamais déclencher le changement de scène final, qui casserait le processus de test), mais aucun rendu, tactile, clavier virtuel ou audio n'a été vérifié à l'écran. + +## 15. Étape « Exports » : précisions prises en cours d'implémentation + +- **`export_presets.cfg` écrit à la main**, pas via l'éditeur Godot (pas d'interface graphique disponible dans cet environnement). Un preset minimal — nom, plateforme, chemin d'export, architecture `x86_64` — suffit : Godot complète les options absentes avec ses valeurs par défaut pour la plateforme. Les deux exports (`make export-linux`, `make export-windows`) ont réellement été lancés et produisent un binaire qui démarre (vérifié en headless pour Linux ; pour Windows, seul le format du binaire a pu être vérifié — `file` confirme un PE32+ valide, mais aucun moyen de l'exécuter dans cet environnement : pas de Wine installé, pas de machine Windows). +- **Modèles d'export** : dossier nommé avec un point avant `stable` (`4.6.3.stable`), alors que `.godot-version` et les URLs de téléchargement utilisent un tiret (`4.6.3-stable`) — deux formats distincts à ne pas confondre. Téléchargés par `tools/setup.sh` (~1,2 Go), jamais commités (voir `.gitignore`, déjà configuré pour exclure `export_templates` implicitement via le chemin hors dépôt `~/.local/share/godot/`). +- **Exclusion de `tests/` et `addons/gut/` de l'export** (`exclude_filter` des deux presets) : ce sont des dépendances de développement, elles n'ont rien à faire dans un exécutable livré à un enfant. Vérifié par la taille du `.pck` (124 Ko après exclusion contre 1,5 Mo avant). +- **`export_presets.cfg` vérifié avant commit** : aucun champ de signature, de clé ou de chemin d'identifiants (ces champs n'existent que pour Android/iOS/macOS, hors périmètre). Rien à nettoyer. +- **Non vérifié** : exécution réelle du binaire Windows (pas d'environnement Windows ni Wine disponible ici) ; comportement sur une distribution Linux différente de celle de cet environnement (cahier des charges §13 : « tester sur les distributions cibles et leurs dépendances graphiques ») ; macOS, Android, iOS restent hors périmètre de cette version. diff --git a/docs/testing/manual-checklist.md b/docs/testing/manual-checklist.md index b51b9bb..0eea0c8 100644 --- a/docs/testing/manual-checklist.md +++ b/docs/testing/manual-checklist.md @@ -30,8 +30,14 @@ Tout ce qui suit ne peut pas être vérifié sans écran (rendu, mise en page, a - Aucun fichier audio n'a encore été généré (`assets/audio/dictations/` est vide) : c'est attendu à ce stade (étape « Graphismes et audio provisoires », à venir). Vérifier seulement que l'absence de fichier ne provoque pas de plantage, juste un avertissement en console. +## Exports + +- `make export-linux` produit `build/linux/aventuriers_des_mots.x86_64` : lancé et vérifié en headless dans cet environnement, mais **jamais vu à l'écran** ni testé sur une autre distribution (cahier des charges §13 demande un test sur les distributions cibles). +- `make export-windows` produit `build/windows/aventuriers_des_mots.exe` : seul le format du binaire (PE32+) a pu être vérifié ici. **Jamais exécuté** (pas de machine Windows ni de Wine disponibles) : à tester sur une vraie machine Windows avant toute diffusion. +- Vérifier manuellement que le jeu se comporte correctement en plein écran et en fenêtré sur les deux plateformes. + ## Non vérifié par choix -- Export Linux/Windows : pas encore configuré (étape 6). -- Clavier virtuel tactile, formats d'écran mobile, Android/iOS/macOS : hors périmètre de cette version. +- Export macOS, Android, iOS : hors périmètre de cette version (voir prompt de lancement, Objectif). +- Clavier virtuel tactile, formats d'écran mobile : hors périmètre de cette version. - Animations : aucune n'existe encore (interface statique assumée pour ce prototype). diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..3e9124a --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,45 @@ +[preset.0] + +name="Linux" +platform="Linux" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="tests/*, addons/gut/*" +export_path="build/linux/aventuriers_des_mots.x86_64" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +binary_format/architecture="x86_64" + +[preset.1] + +name="Windows" +platform="Windows Desktop" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="tests/*, addons/gut/*" +export_path="build/windows/aventuriers_des_mots.exe" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.1.options] + +binary_format/architecture="x86_64" diff --git a/tools/setup.sh b/tools/setup.sh index 73d9798..b32d7b6 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -28,6 +28,25 @@ else echo "Godot deja present dans ${GODOT_BIN}." fi +# Godot nomme ce dossier avec un point avant "stable" (ex. "4.6.3.stable"), +# alors que .godot-version et les URLs de telechargement utilisent un tiret +# (ex. "4.6.3-stable") : les deux formats sont distincts, pas de typo ici. +GODOT_TEMPLATE_VERSION="${GODOT_VERSION/-/.}" +EXPORT_TEMPLATES_DIR="${HOME}/.local/share/godot/export_templates/${GODOT_TEMPLATE_VERSION}" +if [ ! -d "${EXPORT_TEMPLATES_DIR}" ]; then + echo "Telechargement des modeles d'export Godot ${GODOT_VERSION} (environ 1,2 Go)..." + TMP_TPZ="$(mktemp)" + TMP_DIR="$(mktemp -d)" + curl -sL -o "${TMP_TPZ}" \ + "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}/Godot_v${GODOT_VERSION}_export_templates.tpz" + unzip -q "${TMP_TPZ}" -d "${TMP_DIR}" + mkdir -p "${EXPORT_TEMPLATES_DIR}" + cp -r "${TMP_DIR}"/templates/* "${EXPORT_TEMPLATES_DIR}/" + rm -rf "${TMP_TPZ}" "${TMP_DIR}" +else + echo "Modeles d'export deja presents dans ${EXPORT_TEMPLATES_DIR}." +fi + if [ ! -d "addons/gut" ]; then echo "Telechargement de GUT ${GUT_VERSION}..." TMP_TAR="$(mktemp)"