spiegel-keyman/docs/build/old/core-desktop-notes.md
2022-02-24 17:34:23 -06:00

4.3 KiB

Common/Core/Desktop configuration notes

WARNING: these are old configuration notes. See index.md for current steps.

  • Bash (for Windows, included with Git for Windows)
  • Python 3
  • Meson build system 0.45+ (0.56+ for WASM)
  • ninja 1.8+
  • C++14 or later compiler (VC++ 2019 or later for Windows).
  • lib std::fs
  • kmcomp (for tests) -- must be added to path

For WASM builds:

Windows

Windows environment

On Windows you may need to set SDKVER environment variable to the current Windows SDK version, if it cannot be automatically detected.

export SDKVER=10.0.19041.0

kmcomp

Note on paths for kmcomp:

The search path can be edited through System settings / Advanced system settings / Environment Variables / User environment variables.

If you have Keyman Developer installed, kmcomp should be on the path already; otherwise add %KeymanDeveloperPath% to your path.

If you do not have Keyman Developer installed, add the path where you extracted the kmcomp archive.

Linux

Ubuntu and Debian

You may also need the kmcomp wrapper - see below.

Other Linux distributions

  • Install Python 3 and pip

    You will be able to install a python3 package in any reputable recent version of linux using its package manager if it's not already installed. Ensure that pip is also installed.

  • Install meson:

    python3 -m pip install meson
    
  • Install Enscripten (WASM builds): https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install

  • Add emcc to PATH (probably upstream/enscripten)

You may also need the kmcomp wrapper - see below.

kmcomp - All Linux platforms

If you want to rebuild keyboards for tests, you need a wrapper kmcomp shell script:

#!/usr/bin/env bash
wine `dirname "$0"`/kmcomp.exe "$@"

Place this in the same folder as you extracted kmcomp.exe, and chmod +x kmcomp. Add the folder to the path (e.g. export PATH=/path/to/kmcomp:$PATH, which you can add to .bashrc).

macOS

kmcomp

If you want to rebuild keyboards for tests, you'll also need WINE:

brew tap homebrew/cask-versions
brew install --cask --no-quarantine wine-stable

And you will also need a wrapper kmcomp shell script:

#!/usr/bin/env bash
wine64 `dirname "$0"`/kmcomp.exe "$@"

Place this in the same folder as you extracted kmcomp.exe, and chmod +x kmcomp. Add the folder to the path (e.g. export PATH=/path/to/kmcomp:$PATH, which you can add to .bashrc).

Building -- all platforms

On all platforms, use build.sh.

  • To build native libraries and tests:

    ./build.sh --debug
    
  • To build WASM libraries and tests:

    ./build.sh --platform wasm