Skip to content

Nuvola App Developer Kit

Jiří Janoušek edited this page Aug 1, 2017 · 20 revisions

Nuvola App Developer Kit (Nuvola ADK) is a Flatpak runtime for the development of Web App scripts for the Nuvola Apps runtime. (There is the Nuvola Core Developer Kit for the development of Nuvola itself).

The Nuvola ADK

  • contains a development version of Nuvola Apps including all dependencies;
  • contains Nuvola SDK, the build system for web app scripts;
  • is based on the same GNOME SDK runtime as the Nuvola Apps flatpak package for end users;
  • is easy to install;
  • and is mostly isolated from your system.

Stable or Master Branch

  • You should install the stable branch unless you are absolutely sure that you need new features from the master branch.
  • The master branch currently adds following stuff:
    • Packages contain WebKitGTK with enabled Media Source Extension (MSE) for Flash-free playback. Already in stable.
    • Packages contain a newer version of GStreamer, which is necessary for a proper MSE support in WebKitGTK. Already in stable.
    • Packages contain GStreamer libav plugin and FFMPEG with the H264 codec, which is necessary for this format to be supported with MSE. Already in stable.
    • Nuvola is built with --webkittk-supports-mse flag to enable MSE support. Already in stable.

Questions & Feedback

Having trouble? Are these instructions confusing? Do have a question? We'd like to help! Post a question in the nuvola-player-devel mailing list.

Installation

flatpak remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo
flatpak install gnome org.gnome.Platform//3.24
flatpak install gnome org.gnome.Sdk//3.24
  • Add Nuvola Flatpak repository: flatpak remote-add --from nuvola https://dl.tiliado.eu/flatpak/nuvola.flatpakrepo
  • Then install Nuvola ADK from the stable branch - flatpak install nuvola eu.tiliado.NuvolaAdk//stable
  • or from the stable branch - flatpak install nuvola eu.tiliado.NuvolaAdk//stable

Running and set-up

Prepare your working directory

By default, flatpak applications don't have access to your home directory. Therefore, it is necessary to mount your working directory inside Nuvola Adk. These instructions assume that your working directory is ~/projects/nuvola-apps. Change this path according to your needs.

mkdir -p ~/projects/nuvola-apps
cd ~/projects/nuvola-apps
echo "Hello :-)" > hello.txt

Set Bash aliases and launch the ADK

It is convenient to set following aliases (e.g. in ~/.bash_aliases):

alias nuvolaadk="flatpak run -d --persist= --filesystem=~/projects/nuvola-apps eu.tiliado.NuvolaAdk"
alias nuvolaadk-sh="flatpak run --command=bash -d --persist= --filesystem=~/projects/nuvola-apps eu.tiliado.NuvolaAdk"

In a new shell (or after source ~/.bash_aliases), you can type

  • nuvolaadk to launch LxTerminal inside Nuvola ADK environment,
  • or nuvolaadk-sh to launch Bash from Nuvola ADK environment but in the current terminal emulator.

It might be helpful to configure Bash in the ADK:

$ nano ~/.bashrc
# Change prompt
export PS1="\$? \A \[\e[33m\]\w\[\e[m\]\n\\$ "
# History - ignore duplicates and commands with leading spaces
HISTCONTROL=ignoreboth

$ . ~/.bashrc

Running Nuvola SDK

$ nuvolasdk --help

Running Nuvola Apps

Type

  • nuvola -D to run the Web app selector window
  • nuvola -D -a APPDID to run an app with the id APPID
  • nuvola -D -A ~/projects/nuvola-apps -a APPDID to run an app with the id APPID while setting the web app repository path to your working directory.