Guidelines and HOWTOs/Flatpak: Difference between revisions

From KDE Community Wiki
No edit summary
No edit summary
Line 1: Line 1:
Flatpak is a solution for creating contained software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].
Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].


= KDE =
= KDE =
Line 8: Line 8:
This runtime can be added by following these instructions:
This runtime can be added by following these instructions:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
flatpak remote-add kde http://distribute.kde.org/testing/ --no-gpg-verify
flatpak remote-add kde http://distribute.kde.org/flatpak-testing/ --no-gpg-verify
flatpak install kde org.kde.Platform
flatpak install kde org.kde.Sdk
flatpak install kde org.kde.Sdk
</syntaxhighlight>
</syntaxhighlight>


Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://quickgit.kde.org/?p=scratch%2Fapol%2Fxdgapp-nightly-apps.git&a=tree here].
Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://quickgit.kde.org/?p=scratch%2Fapol%2Fxdgapp-nightly-apps.git&a=tree here].
To compile an applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).
<syntaxhighlight lang="bash">
mkdir app repo
flatpak-builder --ccache --require-changes --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json
</syntaxhighlight>
This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:
<syntaxhighlight lang="bash">
flatpak add-remote awesomeapp repo
flatpak install org.kde.AWESOMEAPP
flatpak run org.kde.AWESOMEAPP
</syntaxhighlight>
Now you will see that some things don't work and you'll have the privilege to start fixing things!

Revision as of 23:35, 30 May 2016

Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information here.

KDE

KDE Software approach to Flatpak is still not ready. Nevertheless, it's being shaped up. If you're interested in helping, please send an e-mail to [email protected].

The idea behind flatpak is that your applications will depend on a runtime. KDE provides a runtime with Qt and all KDE Frameworks 5 (except for the 4th tier) to make sure it's easily adaptable for any KDE Application and possibly most Qt-based applications as well.

This runtime can be added by following these instructions:

flatpak remote-add kde http://distribute.kde.org/flatpak-testing/ --no-gpg-verify
flatpak install kde org.kde.Platform
flatpak install kde org.kde.Sdk

Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it here.

To compile an applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).

mkdir app repo
flatpak-builder --ccache --require-changes --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json

This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:

flatpak add-remote awesomeapp repo
flatpak install org.kde.AWESOMEAPP
flatpak run org.kde.AWESOMEAPP

Now you will see that some things don't work and you'll have the privilege to start fixing things!