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

Add Ninja to the list of required tools #2498

merged 3 commits into from
Apr 11, 2023

Conversation

tronical
Copy link
Member

@tronical tronical commented Apr 6, 2023

We have plenty of command lines that explicitly use -GNinja, so let's make Ninja a tool that is required. That's easier than changing all the command lines to have two variants (use XX or YY if you have Ninja installed), and we know that the dependency handling works best with Ninja.

Fixes #2495

@tronical tronical added a:documentation Improvements or additions to documentation (infrastructure and text itself) (mN,bS) candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran labels Apr 6, 2023
We have plenty of command lines that explicitly use `-GNinja`, so let's
make Ninja a tool that is required. That's easier than changing all the
command lines to have two variants (use XX or YY if you have Ninja
installed), and we know that the dependency handling works best with
Ninja.

Fixes #2495
Copy link
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

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

I would still like to keep it as optional.

And btw, there is a bunch of other dependencies that are needed, especially on Linux like all the X11 dev libs.

I think we need a central requirements page for building from source that can be linked from the other ones (currently it is in building.md but it should be separate)
What do you think?

@@ -3,7 +3,7 @@
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 [Ninja](https://ninja-build.org).
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.

docs/building.md Outdated Show resolved Hide resolved
docs/tutorial/cpp/src/getting_started.md Outdated Show resolved Hide resolved
tronical and others added 2 commits April 6, 2023 10:50
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
@tronical tronical merged commit a5bea16 into master Apr 11, 2023
@tronical tronical deleted the simon/docs-ninja branch April 11, 2023 14:35
@ogoffart ogoffart removed the candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:documentation Improvements or additions to documentation (infrastructure and text itself) (mN,bS)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C++ API Build not working
2 participants