Skip to content

Commit 2d4ff01

Browse files
Hofer-Julianbilelmoussaoui
authored andcommitted
book: Remove all mentions of meson and flatpak
1 parent 8a4e552 commit 2d4ff01

File tree

3 files changed

+13
-72
lines changed

3 files changed

+13
-72
lines changed

book/src/installation_linux.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
# Linux
22

3-
## Flatpak
4-
5-
If you develop on Linux, using Flatpak is the most convenient option.
6-
With Flatpak your whole workflow is containerized, and your users get the very same application you develop on including all dependencies.
7-
First, assure that Flatpak is installed on your system, check this [website](https://flatpak.org/setup/) to see if any steps are necessary on your distribution.
8-
Download the [gtk-rust-template](https://gitlab.gnome.org/bilelmoussaoui/gtk-rust-template) and follow the instructions in its README.
9-
10-
Then either install
11-
- [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder) or
12-
- [VSCodium](https://flathub.org/apps/details/com.vscodium.codium) together with the [rust-analyzer](https://open-vsx.org/extension/matklad/rust-analyzer) and [flatpak](https://open-vsx.org/extension/bilelmoussaoui/flatpak-vscode) extensions.
13-
14-
That is it.
15-
The build dependencies can be downloaded by the IDE.
16-
With GNOME Builder, you only have to press the run button for that.
17-
18-
19-
## Host
20-
21-
If you develop on the host, you first have to install rustup.
3+
You first have to install rustup.
224
You can find the up-to-date instructions on [rustup.rs](https://rustup.rs).
235

246
Then install GTK 4 and the build essentials.

book/src/project_setup.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# Project Setup
22

3-
There are two recommended ways to set up your workstation in order to develop `gtk-rs` applications.
4-
Let us go through them one by one.
5-
6-
## Cargo
7-
8-
[Cargo](https://doc.rust-lang.org/cargo/index.html) is Rust's build system and package manager.
9-
If following the book is all you care about, using only Cargo will work fine for you.
10-
113
Let us begin by installing all necessary tools.
124
First, follow the instructions on the [GTK website](https://www.gtk.org/docs/installations/) in order to install GTK 4.
135
Then install Rust with [rustup](https://rustup.rs/).
@@ -40,34 +32,3 @@ Now, you can run your application by executing:
4032
```bash
4133
cargo run
4234
```
43-
44-
## Cargo + Meson
45-
46-
Cargo is *almost* enough, but it is not well suited for handling resources such as icons or UI definition files.
47-
That is why we recommend to use [Meson](https://mesonbuild.com/) on top of it.
48-
It is cross-platform, and its syntax is very readable.
49-
Meson takes care of
50-
- translations,
51-
- building and installing [resources](resources.html) as well as
52-
- installing auxiliary files such as icons and [settings schemas](settings.html).
53-
54-
Here as well, you first follow the instructions on the [GTK website](https://www.gtk.org/docs/installations/) in order to install GTK 4.
55-
Then install Rust with [rustup](https://rustup.rs/).
56-
Finally, install Meson by following the instructions on the [Meson website](https://mesonbuild.com/Getting-meson.html).
57-
58-
You can download a ready-to-use gtk-rust-template [here](https://gitlab.gnome.org/bilelmoussaoui/gtk-rust-template).
59-
Follow the instructions in the README to initialize your own application.
60-
Then configure your project.
61-
```bash
62-
meson setup builddir
63-
```
64-
65-
In order to compile and install it run the following command.
66-
You have to execute it every time you modify your application.
67-
```bash
68-
meson install -C builddir
69-
```
70-
71-
Now, the application should be in a folder included in your system path.
72-
You can either start it with the application launcher of your choice or from within your terminal.
73-

book/src/settings.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,18 @@ This is a boolean value so its `type` is "b" (see [GVariant Format Strings](http
2727
Finally, we define its default value and add a summary.
2828

2929
Now we need to copy and compile the schema.
30-
As of right now, `cargo` is not suitable for that task which is why you will need another build system on top of it.
31-
You can find an example on how to do this with [`meson`](https://mesonbuild.com/) in the [`gtk-rust-template`](https://gitlab.gnome.org/bilelmoussaoui/gtk-rust-template).
32-
33-
>However, we promised that `cargo` alone is enough to follow the book.
34-
>For local testing, you can install the schema by executing the following commands on a Linux or macOS machine:
35-
>```bash
36-
>sudo cp org.gtk-rs.example.gschema.xml /usr/share/glib-2.0/schemas/
37-
>sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
38-
>```
39-
> On Windows run:
40-
>```powershell
41-
>cp org.gtk-rs.example.gschema.xml C:/ProgramData/glib-2.0/schemas/
42-
>glib-compile-schemas C:/ProgramData/glib-2.0/schemas/
43-
>```
30+
31+
You can install the schema by executing the following commands on a Linux or macOS machine:
32+
```bash
33+
sudo cp org.gtk-rs.example.gschema.xml /usr/share/glib-2.0/schemas/
34+
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
35+
```
36+
37+
On Windows run:
38+
```powershell
39+
cp org.gtk-rs.example.gschema.xml C:/ProgramData/glib-2.0/schemas/
40+
glib-compile-schemas C:/ProgramData/glib-2.0/schemas/
41+
```
4442

4543
We initialize the `Settings` object by specifying the application id.
4644

0 commit comments

Comments
 (0)