2016-07-05 11:38:54 +02:00
|
|
|
Running from source
|
|
|
|
--------------------
|
2012-12-21 08:51:59 +01:00
|
|
|
|
2016-07-05 11:38:54 +02:00
|
|
|
For non-developers who want to try this development code, the easiest way is
|
|
|
|
to use a binary package - please see:
|
2014-04-12 06:33:53 +02:00
|
|
|
|
2016-07-05 11:38:54 +02:00
|
|
|
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.
|
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
To start, make sure you have the following installed:
|
2016-07-05 11:38:54 +02:00
|
|
|
|
2018-06-07 03:36:11 +02:00
|
|
|
- Python 3.6+
|
2019-12-18 06:09:46 +01:00
|
|
|
- Qt 5.9.x or 5.11.x+
|
2019-12-18 05:43:40 +01:00
|
|
|
- portaudio
|
2017-10-02 09:24:03 +02:00
|
|
|
- mpv
|
2016-07-05 11:38:54 +02:00
|
|
|
- lame
|
2019-12-18 05:43:40 +01:00
|
|
|
- npm
|
2019-12-22 10:28:36 +01:00
|
|
|
- your platform's C compiler, eg gcc, Xcode or Visual Studio 2017.
|
|
|
|
- GNU make
|
2019-12-25 02:33:23 +01:00
|
|
|
- protoc v3 (https://github.com/protocolbuffers/protobuf/releases)
|
2019-12-24 09:38:04 +01:00
|
|
|
- rustup (https://rustup.rs/)
|
2019-12-25 02:33:23 +01:00
|
|
|
- pip 19+
|
2019-12-22 10:28:36 +01:00
|
|
|
|
|
|
|
Next, build a Python virtual environment and activate it:
|
|
|
|
|
|
|
|
$ python3 -m venv ~/pyenv
|
|
|
|
$ . ~/pyenv/bin/activate
|
2016-07-05 11:38:54 +02:00
|
|
|
|
2019-12-18 06:13:07 +01:00
|
|
|
If the distro you are using has PyQt5 installed, make sure you have the PyQt5
|
|
|
|
WebEngine module and development tools (eg pyqt5-dev-tools) installed as well.
|
2019-12-26 14:28:19 +01:00
|
|
|
When you use your distro's PyQt5, you have to use the --system-site-packages
|
|
|
|
option when setting up the virtual environment to give it access to the system
|
|
|
|
site-packages dir.
|
|
|
|
|
2019-12-19 00:34:31 +01:00
|
|
|
Otherwise, run:
|
|
|
|
|
|
|
|
$ pip install -r requirements.qt
|
2012-12-21 08:51:59 +01:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
Then to run the development version:
|
2014-04-12 06:33:53 +02:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
$ make run
|
|
|
|
|
|
|
|
If you get any errors please return to the top and check the requirements
|
|
|
|
again, and make sure you don't have another version of Anki installed.
|
2012-12-21 08:51:59 +01:00
|
|
|
|
2019-09-23 13:18:03 +02:00
|
|
|
If you want to use a language other than English, copy the locale/ folder
|
|
|
|
from a source tarball into the root of the repo.
|
2012-12-21 08:51:59 +01:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
To run the unit tests and checks:
|
2018-07-12 08:09:14 +02:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
$ make check
|
2018-07-12 08:09:14 +02:00
|
|
|
|
2016-08-16 07:07:29 +02:00
|
|
|
Before contributing code, please read README.contributing.
|
2012-12-21 08:51:59 +01:00
|
|
|
|
|
|
|
If you'd like to contribute translations, please see the translations section
|
|
|
|
of http://ankisrs.net/docs/manual.html#_contributing
|
2014-05-10 07:15:13 +02:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
Mac users
|
|
|
|
----------
|
2016-04-23 00:51:43 +02:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
You can use homebrew to install some dependencies:
|
2016-04-23 00:51:43 +02:00
|
|
|
|
2019-12-25 02:33:23 +01:00
|
|
|
$ brew install python mpv lame portaudio protobuf npm rustup-init
|
2016-04-23 00:51:43 +02:00
|
|
|
|
2019-12-18 05:43:40 +01:00
|
|
|
Windows users
|
|
|
|
--------------
|
2016-04-23 00:51:43 +02:00
|
|
|
|
2019-12-25 02:33:23 +01:00
|
|
|
The build process uses a GNU makefile, so you'll either need to run
|
|
|
|
GNU make via WSL (https://docs.microsoft.com/en-us/windows/wsl/install-win10)
|
|
|
|
or Cygwin, or manually execute the build steps.
|