2020-01-02 10:55:27 +01:00
|
|
|
For non-developers who want to try this development code, the easiest way is
|
|
|
|
to use a binary package - please see:
|
|
|
|
|
|
|
|
https://anki.tenderapp.com/discussions/beta-testing
|
|
|
|
|
|
|
|
You are welcome to run Anki from source instead, but it is expected that you
|
|
|
|
can sort out all dependencies and issues by yourself - we are not able to
|
|
|
|
provide support for problems you encounter when running from source.
|
|
|
|
|
|
|
|
To start, make sure you have the following installed:
|
|
|
|
|
|
|
|
- Python 3.6+
|
|
|
|
- portaudio
|
|
|
|
- mpv
|
|
|
|
- lame
|
|
|
|
- npm
|
|
|
|
- your platform's C compiler, eg gcc, Xcode or Visual Studio 2017.
|
|
|
|
- GNU make
|
|
|
|
- protoc v3 (https://github.com/protocolbuffers/protobuf/releases)
|
|
|
|
- rustup (https://rustup.rs/)
|
2020-01-02 11:52:12 +01:00
|
|
|
- gettext
|
2020-01-04 01:44:26 +01:00
|
|
|
- rename
|
2020-01-02 10:55:27 +01:00
|
|
|
|
|
|
|
The build scripts assume a UNIX-like environment, so on Windows you will
|
|
|
|
need to use WSL or Cygwin to use them.
|
|
|
|
|
|
|
|
Once you've installed the above components, execute ./run in this repo,
|
2020-01-04 01:44:26 +01:00
|
|
|
which will build the subcomponents, and start Anki. Any arguments included
|
|
|
|
on the command line will be passed on to Anki.
|
2020-01-02 10:55:27 +01:00
|
|
|
|
|
|
|
Before contributing code, please read README.contributing.
|
|
|
|
|
|
|
|
If you'd like to contribute translations, please see the translations section
|
|
|
|
of http://ankisrs.net/docs/manual.html#_contributing
|
|
|
|
|
|
|
|
Subcomponents
|
|
|
|
--------------
|
|
|
|
|
2020-01-02 22:48:38 +01:00
|
|
|
- pylib contains a Python module (anki) with most of the non-GUI code.
|
|
|
|
- qt contains the Qt GUI implementation (aqt).
|
|
|
|
- rspy contains a Python module (ankirspy) for accessing the Rust code.
|
|
|
|
- rslib contains the parts of the code implemented in Rust. This
|
|
|
|
is only a tiny subsection at the moment.
|
2020-01-02 10:55:27 +01:00
|
|
|
- proto contains the interface used to communicate between the Rust and
|
|
|
|
Python code.
|
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
Makefile
|
2020-01-02 10:55:27 +01:00
|
|
|
--------------
|
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
Use 'make check' to run unit tests, type checking and linting on all of the
|
|
|
|
subcomponents.
|
2020-01-02 10:55:27 +01:00
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
Use 'make fix' to fix any formatting issues that were found with 'make check'.
|
2020-01-02 10:55:27 +01:00
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
Use 'make build' to output Python wheels of the subcomponents into the dist/
|
|
|
|
folder.
|
2020-01-02 10:55:27 +01:00
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
Use 'make clean' to remove some generated files.
|
2020-01-02 10:55:27 +01:00
|
|
|
|
|
|
|
PyQt
|
|
|
|
-----
|
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
The build scripts will use PyQt/Qt from PyPI by default. If you wish to use a
|
2020-01-02 10:55:27 +01:00
|
|
|
system install, you will need to set up the pyenv folder yourself, making sure
|
|
|
|
you have PyQt5, the WebEngine module and development tools (eg pyqt5-dev-tools)
|
|
|
|
installed as well. You'll need to create the venv with --system-site-packages.
|
|
|
|
|
|
|
|
Mac users
|
|
|
|
----------
|
|
|
|
|
|
|
|
You can use homebrew to install some dependencies:
|
|
|
|
|
2020-01-04 01:44:26 +01:00
|
|
|
$ brew install python mpv lame portaudio protobuf npm rustup-init gettext rename
|
|
|
|
|