gd-tools/BUILDING.md
2024-02-14 14:31:24 +00:00

2.2 KiB

Building with CMake

Build

This project doesn't require any special command-line flags to build to keep things simple. If you're building without internet or on Guix System then use -DGUIX=1

Here are the steps for building in release mode with a single-configuration generator, like the Unix Makefiles one:

cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build

Building with MSVC / Windows

MSVC is not supported because it has an outdated C++ compiler. Use Mingw64 to build.

Building with MinGW / Windows

  • Download cmake and generate a mingw make file.
  • Install or download marisa-trie package.

Use MinGW to build it. After generating build directory enter it and execute

pacman -S mingw-w64-x86_64-marisa
cd build
mingw32-make.exe make
mingw32-make.exe install

Or use Cmake.

pacman -S mingw-w64-x86_64-marisa
cmake -S . -B build
Windows FAQ:

Q: Still doesn't work!!!

A: Download Installer here.

Q: Where should I install it!!!

A: Into Goldendict-ng root directory. Don't forget about "marisa_words.dic"

Building on Apple Silicon

CMake supports building on Apple Silicon properly since 3.20.1. Make sure you have the latest version installed.

#FIXME Mac Support Instructions

Building on Apple devices is not supported yet. But you can try.

Install

This project doesn't require any special command-line flags to install to keep things simple. As a prerequisite, the project has to be built with the above commands already.

The below commands require at least CMake 3.15 to run, because that is the version in which Install a Project was added.

Here is the command for installing the release mode artifacts with a single-configuration generator, like the Unix Makefiles one:

cmake --install build

Here is the command for installing the release mode artifacts with a multi-configuration generator, like the Visual Studio ones:

cmake --install build --config Release