Ceci est une ancienne révision du document !
Applications in Ubuntu Touch (UBports) are programmed on the computer and run in a real device. To do this, it is necessary to use a set of tools that transform the source code into the application executable. There are several tools you can use: the most traditional is the Ubuntu Touch SDK, while the most promising is Clickable.
The Ubuntu Touch SDK is no longer supported. It may seem like a bad idea to spend time in the course explaining how it works. While it is true, there are some premises I would like to comment on. Both the SDK and Clickable follow the same workflow. The application source code is written, compiled, and an application executable is generated. To be able to run the ARM application on a PC, you need to use a container that “adapts” both architectures.
At the last UbuCon, I gave a basic programming workshop. In order to simplify the installation process, I prepared a virtual machine with the Ubuntu Touch SDK. Just download the file, set up your virtualization environment, and start programming.
Installing the virtual machine
The virtual machine uses Ubuntu Mate 16.04. The user and the password are the same: “ubucon”. I recommend you to download the virtual machine in parallel. It’s 12 GB and can take a long time to download.
The link is: https://bit.ly/2JIdjBh. The host computer can run any operating system that can run VirtualBox. Here are the steps for Ubuntu 16.04.
The first step is to add the VirtualBox repository.
sudo nano /etc/apt/sources.list
Add to the end of the file:
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
Save the changes and add the Oracle signature:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
Install VirtualBox.
sudo apt-get update; sudo apt-get install virtualbox-5.2 dkms build-essential
When finished you can launch it from the desktop menu or by typing the command
virtualbox
Click on the New button and configure the name and operating system.
I recommend you to use the maximum RAM you have available in the system.
You must select Use an existing virtual hard disk file. Then select the virtual machine file you downloaded earlier.
The virtual machine is already created and now needs to be configured.
Click on the Settings button. In System, Processor, select Enable PAE/NX to improve the performance of the virtual machine. Your computer's virtualization options may be turned off. In that case they should be activated in the BIOS configuration.
In Display, you can configure the graphics memory of the virtual machine. Even if your computer supports it, I recommend disabling 3D acceleration. The SDK tools use OpenGL acceleration, and it does not work well within VirtualBox.
The virtual machine is now ready.
Start the Ubuntu Touch SDK by double-clicking on the icon.
Conclusions
We have already prepared the working environment for the course. In the next delivery, we will start with a Web application (WebApp). Although programmed into a virtual machine, it is possible to connect a phone or tablet (with UBports) and run the application natively.
If you have any questions, you can ask them in the Telegram group of the course: https://t.me/ubuntu_touch_course