From Fedora Project Wiki
Line 27: Line 27:
  <nowiki>
  <nowiki>
cd modules/flatpak-runtime
cd modules/flatpak-runtime
# Edit flatpak-runtime.yaml and change file:// URLs to point to rpm-flatpak-macros and rpm-flatpak-config
# checkouts


# Downloads gigs of packages into ~/modulebuild/cache/ and writes a build in ~/modulebuild/builds/
# Downloads gigs of packages into ~/modulebuild/cache/ and writes a build in ~/modulebuild/builds/

Revision as of 21:44, 14 June 2017

Setup Development environment

sudo dnf install module-build-service python2-virtualenv
mkdir -p ~/.virtualenvs
virtualenv-2 ~/.virtualenvs/modularity --system-site-packages --prompt='(modularity) '
. ~/.virtualenvs/modularity/bin/activate

sudo dnf install golang
go get -u github.com/openshift/imagebuilder/cmd/imagebuilder

git clone https://pagure.io/forks/otaylor/fm-orchestrator.git
( cd fm-orchestrator && pip install -e . )

git clone https://pagure.io/flatpak-module-tools.git
( cd flatpak-module-tools && pip install -e . )

Check out runtime prototype and example application

git clone -b f26 https://github.com/owtaylor/module-flatpak-runtime.git modules/flatpak-runtime
git clone -b f26 https://github.com/owtaylor/module-eog.git modules/eog
git clone -b f26 https://github.com/owtaylor/rpm-flatpak-rpm-macros.git rpms/flatpak-rpm-macros
git clone -b f26 https://github.com/owtaylor/rpm-flatpak-runtime-config.git rpms/flatpak-runtime-config

Building and install the runtime

cd modules/flatpak-runtime

# Downloads gigs of packages into ~/modulebuild/cache/ and writes a build in ~/modulebuild/builds/
mbs-build local
# Creates a flatpak bundle in ~/modulebuild/flatpaks/
flatpak-module create-flatpak --runtime -l flatpak-runtime:f26 --module flatpak-runtime --info flatpak.json
flatpak-install --user <path_to_bundle>

Build and install the application

cd modules/eog
mbs-build local
flatpak-module create-flatpak -l flatpak-runtime:eog -l eog:f26 --module eog --info flatpak.json
flatpak-install --user <path_to_bundle>

Try running the application

flatpak run org.gnome.eog