Wiki: build an executable (en, da, ms)
+14
@@ -56,6 +56,20 @@ python -m pytest
|
|||||||
|
|
||||||
Vinduestesten i `tests/e2e/` springes over, når der ikke er en skærm.
|
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
|
## Dokumentation af kildekoden
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
+14
@@ -56,6 +56,20 @@ python -m pytest
|
|||||||
|
|
||||||
Ujian tetingkap dalam `tests/e2e/` dilangkau apabila tiada paparan.
|
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
|
## Dokumentasi kod sumber
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
+14
@@ -56,6 +56,20 @@ python -m pytest
|
|||||||
|
|
||||||
The window test in `tests/e2e/` is skipped when no display is available.
|
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
|
## Documentation of the source code
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user