Artifact c6d7fcb496241b28c21b6c243fd7b2a5e36a9f925a7d2b4f204896d5e76c90df:
- File doc/build.md — part of check-in [4a9fbc565b] at 2020-04-06 09:16:31 on branch trunk — [doc] build Grammalecte update (user: olr, size: 1728) [annotate] [blame] [check-ins using]
Building Grammalecte
How to build Grammalecte
Required
For building:
- Python 3.7+ download
- NodeJS download
- npm (should be installed with NodeJS)
- web-ext instructions
For testing:
Commands
Build a language
make.py LANG
Generate the LibreOffice extension and the package folder. LANG is the lang code (ISO 639). This script uses the file
config.ini
in the foldergc_lang/LANG
.
First build
make.py LANG -js
This command is required to generate all necessary files.
Options
-b --build_data
Launch the script
build_data.py
in the foldergc_lang/LANG
.
-d --dict
Generate the indexable binary dictionary from the lexicon in the folder
lexicons
.
-js --javascript
Also generate JavaScript extensions. Without this option, only Python modules, data and extensions are generated.
-t --tests
Run unit tests.
-i --install
Install the LibreOffice extension.
-fx --firefox
Launch Firefox Developper. Unit tests can be launched from the menu (Tests section).
-we --webext
Launch Firefox Nightly. Unit tests can be launched from the menu (Tests section).
-tb --thunderbird
Launch Thunderbird.
Examples
Full rebuild:
make.py LANG -b -d -js
After modifying grammar rules:
make.py LANG -t
If you modify the lexicon:
make.py LANG -d -js
If you modify your script build_data.py
:
make.py LANG -b -js