-
Notifications
You must be signed in to change notification settings - Fork 27
Nuvola App Developer Kit
Jiří Janoušek edited this page Feb 17, 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;
- TODO: 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.
- Install Flatpak
- Add GNOME SDK repository and install GNOME Platform & SDK:
flatpak remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo
flatpak install gnome org.gnome.Platform//3.22
flatpak install gnome org.gnome.Sdk//3.22
- Add Nuvola Flatpak repository and install Nuvola ADK:
flatpak remote-add --from nuvola https://dl.tiliado.eu/flatpak/nuvola.flatpakrepo
flatpak install nuvola eu.tiliado.NuvolaAdk
```
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
TODO: Add prebuilt SDK to the ADK
Git-clone Nuvola SDK to the `~/projects/nuvola-apps/nuvolasdk` directory and then create an alias inside Nuvola ADK:
```
$ nano ~/.bashrc
...
export PYTHONPATH="$HOME/projects/nuvola-apps/nuvolasdk"
alias nuvolasdk="python3 -m nuvolasdk"
...
$ . ~/.bashrc
$ 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.
Note: You can run also `nuvolaplayer3 ...` but this name is deprecated and is going to be removed in the next stable relese Nuvola Apps 4.0.