Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ninja to the list of required tools #2498

Merged
merged 3 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Slint comes with a CMake integration that automates the compilation step of the
offers a CMake target for convenient linkage.

*Note*: We recommend using the Ninja generator of CMake for the most efficient build and `.slint` dependency tracking.
You can select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.
Install [Ninja](https://ninja-build.org) and select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.

### Building from Sources

Expand Down
2 changes: 1 addition & 1 deletion api/cpp/docs/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Slint comes with a CMake integration that automates the compilation step of the
offers a CMake target for convenient linkage.

*Note*: We recommend using the Ninja generator of CMake for the most efficient build and `.slint` dependency tracking.
You can select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.
Install [Ninja](https://ninja-build.org) and select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.

## Binary Packages

Expand Down
1 change: 1 addition & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ environment variable `RUST_FONTCONFIG_DLOPEN=on`. This can be useful for [cross-
To use Slint from C++, the following extra dependencies are needed:

- **[cmake](https://cmake.org/download/)** (3.21 or newer)
- **[Ninja](https://ninja-build.org)** (Optional, or remove the `-GNinja` when invoking `cmake`)
- A C++ compiler that supports C++20 (e.g., **MSVC 2022 17.3** on Windows, or **GCC 10**)

### Node.js API (optional)
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorial/cpp/src/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
In this tutorial, we use C++ as the host programming language. We also support other programming languages like
[Rust](https://slint-ui.com/docs/rust/slint/) or [JavaScript](https://slint-ui.com/docs/node/).

You will need a development environment that can compile C++20 with CMake 3.21.
You will need a development environment that can compile C++20, [CMake 3.21](https://cmake.org/download/),
and we recommend [Ninja](https://ninja-build.org) for `-GNinja`.
We don't provide binaries of Slint yet, so we will use the CMake integration that will automatically build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now do provide binaries, and it might be easier and faster for newbies to install our binaries than installing rust and compile slint from source.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have binaries for Linux and Windows, but not for macOS. We could invest the time to make the macOS binaries work and then change the tutorials to use Slint binary packages. That's what you meant, right?

I suggest to create an issue to track that. I'd think it's best-case 1-2 days of work, worst case 2-3 weeks (macOS binaries may need signing, which may require acquiring a certificate, and we have to build binaries for Apple Silicon as well as x86-64 - ideally combined, but more likely two separate packages to start with).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tutorial is not only for macos. We could recommand Windows and Linux user to use our binaries.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so you mean to document it like this: If you're on Linux and Windows, use our binaries, if you're on macOS build from source?

In any case, no objections from my side. I think time spent on polishing the C++ tutorial is time well spent.

the tools and library from source. Since it's implemented in the Rust programming language, this means that
you also need to install a Rust compiler (1.66 or newer). You can easily install a Rust compiler
Expand Down