-
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
RisingOrange edited this page Aug 25, 2021
·
8 revisions
Building is done using aab (the Anki add-on builder package by Glutanimate)
pip install -r requirements.txt
aab build -d ankiweb
or
aab build -d local
aab...
- cleans the build (deletes all files that were not commited from the build)
- copies the license
- creates a manifest.json file
- version is set to the current tag from git
- you can declare values in addon.json which will be copied into the manifest.json (for example min and max compatible anki versions (see https://github.com/glutanimate/anki-addon-builder/blob/main/aab/schema.json for a reference)
- builds ui and resource files (resulting .py files are put into src//gui/forms/anki21 and src//gui/resources/anki21 respectively)
- packages everything into .ankiaddon file (result will be in build/)
To build just the UI (compile .ui, .qrc files), run this in the project root directory:
pip install -r requirements.txt
aab build ui
Use the "create release" GitHub action. It...
- creates a "Bump version to " commit with the version you declared when starting the action
- creates a new tag
- builds .ankiaddon file and uploads it as a release to GitHub
- used by aab, will not be present in a build (values from here are used to create the manifest.json file which will be in the build)
- see https://github.com/glutanimate/anki-addon-builder/blob/main/aab/schema.json for a listing of possible values
files from here will be compiled (by aab) into the forms and resources folders in src/*/gui/
- contains the .ui files created using QtDesigner
- there is an options.ui file that contains the design for an Anking options menu with icons that take you to anking/ankipalace webpages/socials when clicked
contains qt resource files (.qrc), for the icons in the options menu (see above)
- defines the Anking menu and options dialog
- uses AnkingOptions class from anking_options.py which sets up the anking menu and openWeb actions for the link icons and provides buttons for saving, cancelling and resetting to default settings
src/*/libaddon (link)
this is an Anki add-on development package by Glutanimate
it is currently only used for the options menu and config
libaddon...
- contains useful classes for dialogs and widgets
- standardizes config managment
- standardizes the retrieval of data about Anki and the add-on
- provides utilities for logging, third-party add-on imports, etc.
defines the config manager of the project (using libaddon.anki.config.manager)