gd-tools/BUILDING.md

88 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

2024-02-04 18:24:04 +00:00
# Building with CMake
## Build
This project doesn't require any special command-line flags to build to keep
2024-02-14 13:10:03 +00:00
things simple.
If you're building without internet or on Guix System then use `-DGUIX=1`
2024-02-04 18:24:04 +00:00
Here are the steps for building in release mode with a single-configuration
generator, like the Unix Makefiles one:
2024-02-14 13:10:03 +00:00
2024-02-04 18:24:04 +00:00
```sh
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build
```
2024-02-14 13:10:03 +00:00
### 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
2024-02-04 18:24:04 +00:00
```sh
2024-02-14 13:10:03 +00:00
pacman -S mingw-w64-x86_64-marisa
cd build
mingw32-make.exe make
2024-02-14 14:31:24 +00:00
mingw32-make.exe install
2024-02-14 13:10:03 +00:00
```
Or use Cmake.
```sh
pacman -S mingw-w64-x86_64-marisa
2024-02-04 18:24:04 +00:00
cmake -S . -B build
```
2024-02-14 13:10:03 +00:00
###### Windows FAQ:
2024-02-04 18:24:04 +00:00
2024-02-14 13:10:03 +00:00
>Q: Still doesn't work!!!
2024-02-14 14:31:24 +00:00
>
2024-02-14 13:10:03 +00:00
>A: Download [Installer][3] here.
2024-02-04 18:24:04 +00:00
2024-02-14 13:10:03 +00:00
>Q: Where should I install it!!!
2024-02-14 14:31:24 +00:00
>
2024-02-14 13:10:03 +00:00
>A: Into Goldendict-ng root directory. Don't forget about "marisa_words.dic"
2024-02-04 18:24:04 +00:00
### Building on Apple Silicon
CMake supports building on Apple Silicon properly since 3.20.1. Make sure you
have the [latest version][1] installed.
2024-02-14 13:10:03 +00:00
#FIXME Mac Support Instructions
Building on Apple devices is not supported yet. But you can try.
2024-02-04 18:24:04 +00:00
## 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][2] was added.
Here is the command for installing the release mode artifacts with a
single-configuration generator, like the Unix Makefiles one:
```sh
cmake --install build
```
Here is the command for installing the release mode artifacts with a
multi-configuration generator, like the Visual Studio ones:
2024-02-14 13:10:03 +00:00
2024-02-04 18:24:04 +00:00
```sh
cmake --install build --config Release
```
[1]: https://cmake.org/download/
[2]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project
2024-02-14 13:10:03 +00:00
[3]: https://www.mediafire.com/file/h1v7owj7np9j7wg/gd-tools_windows.zip/file