From 9c8f961731d4554f69c4914f9780873bd4b34118 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Thu, 15 Oct 2026 00:33:00 +0800 Subject: [PATCH] Wiki: build an executable (en, da, ms) --- Install-da.md | 14 ++++++++++++++ Install-ms.md | 14 ++++++++++++++ Install.md | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/Install-da.md b/Install-da.md index b58c6ab..6b07bfe 100644 --- a/Install-da.md +++ b/Install-da.md @@ -56,6 +56,20 @@ python -m pytest Vinduestesten i `tests/e2e/` springes over, når der ikke er en skærm. +## Byg en programfil (Windows) + +```powershell +python -m pip install -e ".[build,speech]" +python tools/build_executable.py +``` + +Scriptet bruger PyInstaller og skriver `dist/flash-card.exe`: én fil uden konsolvindue, med billeder, ordliste og udtalen indeni. Dobbeltklik for at starte; Python er ikke nødvendigt for at køre den. + +- Din fremgang gemmes i en `data/`-mappe ved siden af programfilen (`data/words_to_learn.csv`). +- En `data/ms-da.csv` ved siden af programfilen erstatter ordlisten indeni. +- `python tools/build_executable.py --no-speech` udelader talepakkerne; `--clean` bygger forfra. +- Programfilen er ikke i repositoryet. Byg den på det system, hvor den skal køre; Windows kan vise en SmartScreen-advarsel, fordi filen ikke er signeret. + ## Dokumentation af kildekoden ```bash diff --git a/Install-ms.md b/Install-ms.md index d457ad5..18ef8b4 100644 --- a/Install-ms.md +++ b/Install-ms.md @@ -56,6 +56,20 @@ python -m pytest Ujian tetingkap dalam `tests/e2e/` dilangkau apabila tiada paparan. +## Bina fail boleh laku (Windows) + +```powershell +python -m pip install -e ".[build,speech]" +python tools/build_executable.py +``` + +Skrip menggunakan PyInstaller dan menulis `dist/flash-card.exe`: satu fail tanpa tetingkap konsol, dengan imej, senarai perkataan dan suara di dalamnya. Klik dua kali untuk memulakan; Python tidak diperlukan untuk menjalankannya. + +- Kemajuan anda disimpan dalam folder `data/` di sebelah fail boleh laku (`data/words_to_learn.csv`). +- `data/ms-da.csv` di sebelah fail boleh laku menggantikan senarai perkataan di dalamnya. +- `python tools/build_executable.py --no-speech` meninggalkan pakej suara; `--clean` membina semula dari awal. +- Fail boleh laku tidak disimpan dalam repositori. Bina di sistem tempat ia akan dijalankan; Windows mungkin menunjukkan amaran SmartScreen kerana fail tidak ditandatangani. + ## Dokumentasi kod sumber ```bash diff --git a/Install.md b/Install.md index 45a04f4..e597f8a 100644 --- a/Install.md +++ b/Install.md @@ -56,6 +56,20 @@ python -m pytest The window test in `tests/e2e/` is skipped when no display is available. +## Build an executable (Windows) + +```powershell +python -m pip install -e ".[build,speech]" +python tools/build_executable.py +``` + +The script uses PyInstaller and writes `dist/flash-card.exe`: one file, no console window, with the images, the word list and the spoken word inside. Double-click it to start; Python is not needed to run it. + +- Your progress is kept in a `data/` folder next to the executable (`data/words_to_learn.csv`). +- A `data/ms-da.csv` next to the executable replaces the word list inside it. +- `python tools/build_executable.py --no-speech` leaves the speech packages out; `--clean` rebuilds from scratch. +- The executable is not committed to the repository. Build it on the system you want to run it on; Windows may show a SmartScreen warning because the file is not signed. + ## Documentation of the source code ```bash