Updated build docs

This commit is contained in:
Xieamoe 2024-02-14 05:10:03 -08:00
parent 729a5bd5b8
commit db0bbdd302
No known key found for this signature in database
GPG key ID: 5B82D290CCD94C6D
2 changed files with 44 additions and 12 deletions

View file

@ -3,36 +3,61 @@
## Build ## Build
This project doesn't require any special command-line flags to build to keep This project doesn't require any special command-line flags to build to keep
things simple. 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 Here are the steps for building in release mode with a single-configuration
generator, like the Unix Makefiles one: generator, like the Unix Makefiles one:
```sh ```sh
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build cmake --build build
``` ```
Here are the steps for building in release mode with a multi-configuration ### Building with MSVC / Windows
generator, like the Visual Studio ones:
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
```sh ```sh
cmake -S . -B build pacman -S mingw-w64-x86_64-marisa
cmake --build build --config Release cd build
mingw32-make.exe make
mingw32-make.exe make install
``` ```
### Building with MSVC Or use Cmake.
Note that MSVC by default is not standards compliant and you need to pass some ```sh
flags to make it behave properly. See the `flags-windows` preset in the pacman -S mingw-w64-x86_64-marisa
[CMakePresets.json](CMakePresets.json) file for the flags and with what cmake -S . -B build
variable to provide them to CMake during configuration. ```
###### Windows FAQ:
>Q: Still doesn't work!!!
>A: Download [Installer][3] here.
>Q: Where should I install it!!!
>A: Into Goldendict-ng root directory. Don't forget about "marisa_words.dic"
### Building on Apple Silicon ### Building on Apple Silicon
CMake supports building on Apple Silicon properly since 3.20.1. Make sure you CMake supports building on Apple Silicon properly since 3.20.1. Make sure you
have the [latest version][1] installed. have the [latest version][1] installed.
#FIXME Mac Support Instructions
Building on Apple devices is not supported yet. But you can try.
## Install ## Install
This project doesn't require any special command-line flags to install to keep This project doesn't require any special command-line flags to install to keep
@ -51,10 +76,11 @@ cmake --install build
Here is the command for installing the release mode artifacts with a Here is the command for installing the release mode artifacts with a
multi-configuration generator, like the Visual Studio ones: multi-configuration generator, like the Visual Studio ones:
```sh ```sh
cmake --install build --config Release cmake --install build --config Release
``` ```
[1]: https://cmake.org/download/ [1]: https://cmake.org/download/
[2]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project [2]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project
[3]: https://www.mediafire.com/file/h1v7owj7np9j7wg/gd-tools_windows.zip/file

View file

@ -27,9 +27,15 @@ First, [install goldendict-ng](https://tatsumoto-ren.github.io/blog/setting-up-g
### Gnu Guix ### Gnu Guix
gd-tools is available in our [channel](https://codeberg.org/hashirama/ajatt-tools-guix) gd-tools is available in our [channel](https://codeberg.org/hashirama/ajatt-tools-guix)
### Microsoft Windows
Refer to [Build on MinGW](BUIDLING.md) in Build Instructions
### Apple Mac
Refer to [Build on Mac](BUIDLING.md) in Build Instructions
### Other Unix systems ### Other Unix systems
[Build instructions](https://codeberg.org/hashirama/gd-tools/src/branch/main/BUILDING.md) [Build instructions](BUILDING.md)
## Setup ## Setup