mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
document optimized builds and add helper script
This commit is contained in:
parent
fcdc51aace
commit
bce1f56dde
7 changed files with 43 additions and 3 deletions
|
@ -59,6 +59,17 @@ dependencies. When the build is complete, Anki will automatically start.
|
||||||
To play audio, install mpv. At the time of writing, recording is
|
To play audio, install mpv. At the time of writing, recording is
|
||||||
not yet supported, as currently pyaudio is not being installed.
|
not yet supported, as currently pyaudio is not being installed.
|
||||||
|
|
||||||
|
## Optimized builds
|
||||||
|
|
||||||
|
The `./run` command will create a non-optimized build by default. This is faster
|
||||||
|
to compile, but will mean Anki will run considerably slower.
|
||||||
|
|
||||||
|
To run Anki in optimized mode, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
./scripts/runopt
|
||||||
|
```
|
||||||
|
|
||||||
## More
|
## More
|
||||||
|
|
||||||
For info on running tests, building wheels and so on, please see [Development](./development.md).
|
For info on running tests, building wheels and so on, please see [Development](./development.md).
|
||||||
|
|
11
docs/mac.md
11
docs/mac.md
|
@ -53,6 +53,17 @@ dependencies. When the build is complete, Anki will automatically start.
|
||||||
To play audio, use Homebrew to install mpv. At the time of writing, recording is
|
To play audio, use Homebrew to install mpv. At the time of writing, recording is
|
||||||
not yet supported, as currently pyaudio is not being installed.
|
not yet supported, as currently pyaudio is not being installed.
|
||||||
|
|
||||||
|
## Optimized builds
|
||||||
|
|
||||||
|
The `./run` command will create a non-optimized build by default. This is faster
|
||||||
|
to compile, but will mean Anki will run considerably slower.
|
||||||
|
|
||||||
|
To run Anki in optimized mode, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
./scripts/runopt
|
||||||
|
```
|
||||||
|
|
||||||
## More
|
## More
|
||||||
|
|
||||||
For info on running tests, building wheels and so on, please see [Development](./development.md).
|
For info on running tests, building wheels and so on, please see [Development](./development.md).
|
||||||
|
|
|
@ -85,6 +85,17 @@ To play audio, mpv.exe or mplayer.exe must be on the path. At the time
|
||||||
of writing, recording is not yet supported, as currently pyaudio is
|
of writing, recording is not yet supported, as currently pyaudio is
|
||||||
not being installed.
|
not being installed.
|
||||||
|
|
||||||
|
## Optimized builds
|
||||||
|
|
||||||
|
The `.\run` command will create a non-optimized build by default. This is faster
|
||||||
|
to compile, but will mean Anki will run considerably slower.
|
||||||
|
|
||||||
|
To run Anki in optimized mode, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
.\scripts\runopt
|
||||||
|
```
|
||||||
|
|
||||||
## More
|
## More
|
||||||
|
|
||||||
For info on running tests, building wheels and so on, please see
|
For info on running tests, building wheels and so on, please see
|
||||||
|
|
4
run
4
run
|
@ -3,14 +3,14 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
run_linux() {
|
run_linux() {
|
||||||
bazel run //qt:runanki -- $*
|
bazel run $BUILDARGS //qt:runanki -- $*
|
||||||
}
|
}
|
||||||
|
|
||||||
run_mac() {
|
run_mac() {
|
||||||
# QtWebEngineProcess is unable to locate icudtl.dat from a symlinked tree,
|
# QtWebEngineProcess is unable to locate icudtl.dat from a symlinked tree,
|
||||||
# so we need to copy the files into a working folder before running on a Mac.
|
# so we need to copy the files into a working folder before running on a Mac.
|
||||||
workspace=$(dirname $0)
|
workspace=$(dirname $0)
|
||||||
bazel build //qt:runanki && \
|
bazel build $BUILDARGS //qt:runanki && \
|
||||||
rsync -aiL --exclude=anki/external --exclude=__pycache__ --delete \
|
rsync -aiL --exclude=anki/external --exclude=__pycache__ --delete \
|
||||||
$workspace/bazel-bin/qt/runanki* $workspace/bazel-copy/ && \
|
$workspace/bazel-bin/qt/runanki* $workspace/bazel-copy/ && \
|
||||||
$workspace/bazel-copy/runanki $*
|
$workspace/bazel-copy/runanki $*
|
||||||
|
|
2
run.bat
2
run.bat
|
@ -1 +1 @@
|
||||||
call .\bazel.bat run //qt:runanki -k -- %*
|
call .\bazel.bat run %BUILDARGS% //qt:runanki -k -- %*
|
||||||
|
|
5
scripts/runopt
Executable file
5
scripts/runopt
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BUILDARGS="-c opt" $(dirname $0)/../run
|
2
scripts/runopt.bat
Executable file
2
scripts/runopt.bat
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
set BUILDARGS=-c opt
|
||||||
|
call .\run.bat %*
|
Loading…
Reference in a new issue