Skip to content

Nuvola App Developer Kit

Jiří Janoušek edited this page Jun 4, 2018 · 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.

Changelog

In case you come here again later, this will help you to find out what has changed since then.

  • February 11th, 2018:
    • A nuvolaruntime command is now used to load a web app script from the current directory. Prevously, nuvola -a ... was used to load scripts.
    • Both stable and master branches of ADK contain ValaCEF and Nuvola with an experimental Chromium-based engine.
    • Both stable and master branches of ADK include JavaScript Standard Code Style checker (a command standard).
    • The WebKitGTK-based engine in both stable and master branches of ADK no longer supports MSE.
  • January 19th, 2018:
    • Nuvola uses GNOME Platform 3.26.
    • The master branch of ADK contains ValaCEF and Nuvola with an experimental Chromium-based engine.
    • The master branch of ADK includes JavaScript Standard Code Style checker (a command standard).
    • The WebKitGTK-based engine in the master branch of ADK no longer supports MSE.

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:
    • An experimental Chromium-based engine supporting MSE, Flash & Widevine plugins. In stable since 2018-02-11.
    • The WebKitGTK-based engine no longer supports MSE. In stable since 2018-02-11.
    • JavaScript Standard Code Style checker (a command standard). In stable since 2018-02-11.
    • 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.26
flatpak install gnome org.gnome.Sdk//3.26
  • 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 master branch - flatpak install nuvola eu.tiliado.NuvolaAdk//master

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 --command=bash -d --persist= --filesystem=~/projects/nuvola-apps eu.tiliado.NuvolaAdk"
alias nuvolaadk-terminal="flatpak run -d --persist= --filesystem=~/projects/nuvola-apps eu.tiliado.NuvolaAdk"

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

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

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

I recommend going through Service Integration Tutorial, which provides information on how to use Nuvola SDK and to create web app scripts.

  • Enter the the Nuvola ADK environment first, e.g. with the nuvolaadk alias.
  • Type nuvolasdk --help to see available commands.
  • Then use nuvolasdk as you need.

Running Nuvola Apps

  • Enter the the Nuvola ADK environment first, e.g. with the nuvolaadk alias.
  • Type nuvolaruntime -D to run a web app script from the current directory.
  • Type nuvolaruntime -D -a ~/projects/nuvola-apps/MY-APP to run an app with from the ~/projects/nuvola-apps/MY-APP directory.
  • Use export NUVOLA_USE_CEF=true if you wish to set the Chromium engine as the default.