diff --git a/docs/development.md b/docs/development.md index defe9ef1e..8f8405219 100644 --- a/docs/development.md +++ b/docs/development.md @@ -195,7 +195,53 @@ If ANKI_PROFILE_CODE is set, Python profiling data will be written on exit. - The anki-release package is created/published with the scripts in qt/release. - The installer/launcher is created with the build scripts in qt/launcher/{platform}. -## Mixing development and study +## Building + +The steps to build the launcher vary slightly depending on your operating +system. First, you have to navigate to the appropriate folder: + +| Operating System | Path | Env variables | +| ---------------- | ------------------ | ------------- | +| Linux | ./qt/launcher/lin/ | - | +| MacOS | ./qt/launcher/mac/ | `NODMG=1` | +| Windows | .\qt\launcher\win\ | `NOCOMP=1` | + +If you are on Windows or MacOS, you will now have to set the environment +variables as outlined in the table above. `NOCOMP=1` skips code signing +and compression, whereas `NODMG=1` skips the slow bundling / code signing. + +Next, run the `build.sh` script (on Linux and MacOS) or the `build.bat` script +(on Windows). + +For example, on Linux, you can build the launcher by following these steps: + +``` +cd ./qt/launcher/lin/ +./build.sh +``` + +## Issues During Building + +If you are experiencing issues building the launcher, make sure that all dependencies +are installed. See [Building from source](#building-from-source) for more info. + +## Running + +Once the launcher is built, you can find the executable under `out/launcher` +(located in the project root). In that folder, you will find the binary file of +the launcher. + +On linux, you will find a `launcher.amd64` and a `launcher.arm64` binary file. +Select the one matching your architecture and run it to test your changes. + +For example, on Linux, after following the build steps above, you can run the +amd64 launcher via this command: + +``` +../../../out/launcher/anki-launcher-25.09.2-linux/launcher.amd64 +``` + +# Mixing development and study You may wish to create a separate profile with File>Switch Profile for use during development. You can pass the arguments "-p [profile name]" when starting diff --git a/docs/linux.md b/docs/linux.md index 55794e074..a4d3bdc28 100644 --- a/docs/linux.md +++ b/docs/linux.md @@ -41,6 +41,14 @@ On some distros such as Arch Linux and Fedora, you may need to install the error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory ``` +## Dependencies for Building the Launcher + +If you want to build the launcher, you will need to install the following dependency: + +``` +sudo apt install gcc-aarch64-linux-gnu +``` + ## Audio To play and record audio during development, install mpv and lame.