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

@ -4,35 +4,60 @@
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:
```sh
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build
```
Here are the steps for building in release mode with a multi-configuration
generator, like the Visual Studio ones:
### 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
```sh
cmake -S . -B build
cmake --build build --config Release
pacman -S mingw-w64-x86_64-marisa
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
flags to make it behave properly. See the `flags-windows` preset in the
[CMakePresets.json](CMakePresets.json) file for the flags and with what
variable to provide them to CMake during configuration.
```sh
pacman -S mingw-w64-x86_64-marisa
cmake -S . -B build
```
###### 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
CMake supports building on Apple Silicon properly since 3.20.1. Make sure you
have the [latest version][1] 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
@ -58,3 +83,4 @@ cmake --install build --config Release
[1]: https://cmake.org/download/
[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
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
[Build instructions](https://codeberg.org/hashirama/gd-tools/src/branch/main/BUILDING.md)
[Build instructions](BUILDING.md)
## Setup