Skip to content
Alberto Fanjul edited this page Nov 29, 2018 · 35 revisions

https://flatpak.org/

Getting runtime.

flatpak remote-add --from gnome-nightly https://sdk.gnome.org/gnome-nightly.flatpakrepo
flatpak install gnome-nightly org.gnome.Sdk

debug symbols

If you want Debug symbols (1,1Gb)

flatpak install gnome-nightly org.gnome.Sdk.Debug

Update runtimes

From time to time runtime is updated

flatpak update org.gnome.Sdk

Broken builds on nightly

See on nigthly thinks can get broken. Check last time it was compiled in http://sdkbuilder.gnome.org/logs/ or https://build.gnome.org. Look for build-gnome-sdk-images-master-x86_64.txt

Compiling: (out of tree)

flatpak build-init builder org.gnome.Builder org.gnome.Sdk org.gnome.Platform master
flatpak-builder --ccache --force-clean builder build-aux/flatpak/org.gnome.Builder.json --stop-at gnome-builder
  • debug optimized
flatpak build --env=CFLAGS='-lm' builder meson -Dglobal_c_args="['-ggdb3', '-O0']" --libdir=lib --buildtype=debugoptimized -Dfusermount_wrapper=true -Dwith_tcmalloc=true -Denable_tracing=true -Dwith_help=true -Denable_debug=true -Dwith_channel=flatpak-nightly -Dwith_deviced=true build-meson
  • full debug
flatpak build --env=CFLAGS='-lm -O0 -ggdb3' builder meson --prefix=/app --libdir=lib --buildtype=plain -Dfusermount_wrapper=true -Dwith_tcmalloc=true -Denable_tracing=true -Dwith_help=true -Denable_debug=true -Dwith_channel=flatpak-nightly -Dwith_deviced=true build-meson
flatpak build builder ninja -C build-meson
flatpak build builder ninja -C build-meson install

Installing

flatpak-builder --finish-only  builder build-aux/flatpak/org.gnome.Builder.json

Compile with vim

vim
:set makeprg=flatpak\ build\ builder\ ninja
:make

That way you can navigate to warnings and errors

Executing:

flatpak-builder --run builder build-aux/flatpak/org.gnome.Builder.json gnome-builder -vvvv

debugging:

flatpak-builder --run builder build-aux/flatpak/org.gnome.Builder.json /bin/bash
gdb --args gnome-builder -vvvv

Updating official flatpak package:

flatpak build-export repo builder
flatpak remote-add --no-gpg-verify --if-not-exists builder-repo repo
flatpak install builder-repo org.gnome.Builder

Building from Builder

If you run from builder you could want to enter into flatpak from command line. Here for a supposed hello-world app (change as necessary):

$ flatpak-builder --run ~/.cache/gnome-builder/flatpak/staging/hello-world/flatpak\:org.gnome.Sdk-x86_64-master org.gnome.HelloWorld.flatpak.json /bin/bash