Readme.md 1.27 KB
Newer Older
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
1
2
3
# Flatpak developer environment tool
Flatpak has the low level tool called *flatpak*, and a helper for distributing
and building apps called *flatpak-builder*.
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
4
5
6
However it's missing a developer tool to develop your application from a
flatpak manifest.

Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
7
This repository is a set of python and bash scripts to cover this case
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
8

Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
9
10
# Usage
```bash
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
11
source setup-flatpak-dev.sh $source-path $manifest-path
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
12
```
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
13
Where:
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
14
 * source-path is where your application code is.
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
15
16
 * manifest-path is where the flatpak manifest to build your application is
   located. Usually it follows a name similar to org.gnome.Nautilus.json
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
17

Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
18
This will download the required SDK and build your application for first
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
19
20
time. Then it will enter the flatpak build environment where you can freely use
your build system tool to build your app and run it inside the flatpak
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
21
environment.
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
22
You can run the app by just putting the name, and even run under gdb.
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
23
24
25
For developing for example Nautilus, you would do:
```bash
git clone git@gitlab.com:csoriano/flatpak-dev-cli.git
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
26
git clone --recursive https://git.gnome.org/browse/nautilus
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
27
source flatpak-dev-cli/setup-flatpak-dev.sh nautilus nautilus/org.gnome.Nautilus.json
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
28
nautilus #or gdb nautilus if you want a debugger
Carlos Soriano Sánchez's avatar
Carlos Soriano Sánchez committed
29
30
31
```

And wait until everything is installed and you are inside Flatpak environment.