Commit 5ffd40aa authored by David Boddie's avatar David Boddie
Browse files

Merge branch 'fp' into 'master'

Update libhandy git repo and demo name

Closes #172

See merge request Librem5/developer.puri.sm!419
parents ad5bf461 5355ca6a
Pipeline #60486 passed with stages
in 2 minutes and 21 seconds
...@@ -30,7 +30,7 @@ intermediate steps related to using a local repository. ...@@ -30,7 +30,7 @@ intermediate steps related to using a local repository.
Here, we build and install the example program supplied with the `libhandy Here, we build and install the example program supplied with the `libhandy
library`_:: library`_::
flatpak-builder --install _flatpak sm.puri.Handy.Example.json flatpak-builder --install _flatpak sm.puri.Handy.Demo.json
This builds the application in the ``_flatpak`` directory and installs it on This builds the application in the ``_flatpak`` directory and installs it on
the system. If the ``--user`` option is given then it only installs it for the the system. If the ``--user`` option is given then it only installs it for the
...@@ -38,11 +38,11 @@ current user. A ``.flatpak-builder`` cache directory is also created. ...@@ -38,11 +38,11 @@ current user. A ``.flatpak-builder`` cache directory is also created.
The application can be run using ``flatpak``:: The application can be run using ``flatpak``::
flatpak run sm.puri.Handy.Example flatpak run sm.puri.Handy.Demo
It can then be uninstalled with this command:: It can then be uninstalled with this command::
flatpak uninstall sm.puri.Handy.Example flatpak uninstall sm.puri.Handy.Demo
While this approach is useful for testing, it is often necessary to export or While this approach is useful for testing, it is often necessary to export or
publish the application, and this is covered in the following sections. publish the application, and this is covered in the following sections.
...@@ -56,7 +56,7 @@ repository. ...@@ -56,7 +56,7 @@ repository.
In the case of the libhandy example, we can build a flatpak from the project's In the case of the libhandy example, we can build a flatpak from the project's
``examples`` directory with the following command:: ``examples`` directory with the following command::
flatpak-builder --repo=myrepo _flatpak sm.puri.Handy.Example.json flatpak-builder --repo=myrepo _flatpak sm.puri.Handy.Demo.json
This will use ``_flatpak`` as the build directory and also create a This will use ``_flatpak`` as the build directory and also create a
``.flatpak-builder`` directory in the current directory. The result is stored ``.flatpak-builder`` directory in the current directory. The result is stored
...@@ -69,21 +69,21 @@ Once the application has been built, it can be exported from the local ...@@ -69,21 +69,21 @@ Once the application has been built, it can be exported from the local
repository in the form of a binary bundle by running ``flatpak`` with the repository in the form of a binary bundle by running ``flatpak`` with the
``build-bundle`` command:: ``build-bundle`` command::
flatpak build-bundle myrepo app.flatpak sm.puri.Handy.Example flatpak build-bundle myrepo app.flatpak sm.puri.Handy.Demo
This builds a bundle called ``app.flatpak`` from the application referred to by This builds a bundle called ``app.flatpak`` from the application referred to by
``sm.puri.Handy.Example`` from the ``myrepo`` directory. This bundle can be ``sm.puri.Handy.Demo`` from the ``myrepo`` directory. This bundle can be
copied to other systems or installed locally:: copied to other systems or installed locally::
flatpak install app.flatpak flatpak install app.flatpak
The application can be run using ``flatpak``:: The application can be run using ``flatpak``::
flatpak run sm.puri.Handy.Example flatpak run sm.puri.Handy.Demo
It can then be uninstalled with this command:: It can then be uninstalled with this command::
flatpak uninstall sm.puri.Handy.Example flatpak uninstall sm.puri.Handy.Demo
This way of building an application is very convenient when preparing flatpaks This way of building an application is very convenient when preparing flatpaks
for testing on another system, such as the Librem 5 phone or development board. for testing on another system, such as the Librem 5 phone or development board.
...@@ -105,15 +105,15 @@ with this command:: ...@@ -105,15 +105,15 @@ with this command::
This gives the repository the name ``my-local-repo`` which is the remote that This gives the repository the name ``my-local-repo`` which is the remote that
we use when installing the libhandy example application from it:: we use when installing the libhandy example application from it::
flatpak install my-local-repo sm.puri.Handy.Example flatpak install my-local-repo sm.puri.Handy.Demo
The application can then be run using ``flatpak``:: The application can then be run using ``flatpak``::
flatpak run sm.puri.Handy.Example flatpak run sm.puri.Handy.Demo
It can also be uninstalled when no longer needed:: It can also be uninstalled when no longer needed::
flatpak uninstall sm.puri.Handy.Example flatpak uninstall sm.puri.Handy.Demo
When there are no longer any installed applications from the local repository, When there are no longer any installed applications from the local repository,
the ``my-local-repo`` remote can be deleted from the list of those registerd the ``my-local-repo`` remote can be deleted from the list of those registerd
......
...@@ -52,7 +52,7 @@ it should use to build them. ...@@ -52,7 +52,7 @@ it should use to build them.
For example, the `libhandy library`_ is supplied with an example program in its For example, the `libhandy library`_ is supplied with an example program in its
``examples`` directory that can be built and packaged as a flatpak using its ``examples`` directory that can be built and packaged as a flatpak using its
``sm.puri.Handy.Example.json`` manifest file. ``sm.puri.Handy.Demo.json`` manifest file.
User and System Installations User and System Installations
----------------------------- -----------------------------
......
...@@ -58,7 +58,7 @@ In the case of the Librem 5, ``<arch>`` is ``aarch64``. ...@@ -58,7 +58,7 @@ In the case of the Librem 5, ``<arch>`` is ``aarch64``.
The example used previously is the example program supplied with the `libhandy The example used previously is the example program supplied with the `libhandy
library`_, which we now build with the additional option:: library`_, which we now build with the additional option::
flatpak-builder --arch=aarch64 --repo=myrepo _flatpak sm.puri.Handy.Example.json flatpak-builder --arch=aarch64 --repo=myrepo _flatpak sm.puri.Handy.Demo.json
The result is stored in the ``myrepo`` directory, which is a local repository. The result is stored in the ``myrepo`` directory, which is a local repository.
...@@ -73,10 +73,10 @@ Following the general advice for building flatpaks given earlier, we can ...@@ -73,10 +73,10 @@ Following the general advice for building flatpaks given earlier, we can
export a binary bundle from the local repository so that it can be tested on export a binary bundle from the local repository so that it can be tested on
the target system:: the target system::
flatpak build-bundle --arch=aarch64 myrepo app.flatpak sm.puri.Handy.Example flatpak build-bundle --arch=aarch64 myrepo app.flatpak sm.puri.Handy.Demo
This builds a bundle called ``app.flatpak`` from the application referred to by This builds a bundle called ``app.flatpak`` from the application referred to by
``sm.puri.Handy.Example`` from the ``myrepo`` directory. This bundle can be ``sm.puri.Handy.Demo`` from the ``myrepo`` directory. This bundle can be
copied to the phone or development board for testing. copied to the phone or development board for testing.
Deploying a Bundle for Testing Deploying a Bundle for Testing
...@@ -108,7 +108,7 @@ installing the application itself. ...@@ -108,7 +108,7 @@ installing the application itself.
The application can then be run using ``flatpak`` in the usual way:: The application can then be run using ``flatpak`` in the usual way::
flatpak run sm.puri.Handy.Example flatpak run sm.puri.Handy.Demo
The commands for managing applications, runtimes and remotes are all the same The commands for managing applications, runtimes and remotes are all the same
on the target system as they are on the workstation. on the target system as they are on the workstation.
......
...@@ -32,17 +32,17 @@ the libhandy example we have been using, the above command produces this ...@@ -32,17 +32,17 @@ the libhandy example we have been using, the above command produces this
output:: output::
Ref Ref
sm.puri.Handy.Example sm.puri.Handy.Demo
sm.puri.Handy.Example.Debug sm.puri.Handy.Demo.Debug
We install the application from the repository in the normal way:: We install the application from the repository in the normal way::
flatpak install my-local-repo sm.puri.Handy.Example flatpak install my-local-repo sm.puri.Handy.Demo
In addition to this, we install the debug runtime extension for the In addition to this, we install the debug runtime extension for the
application:: application::
flatpak install my-local-repo sm.puri.Handy.Example.Debug flatpak install my-local-repo sm.puri.Handy.Demo.Debug
This allows us to access debugging symbols in the sandbox. This allows us to access debugging symbols in the sandbox.
...@@ -53,7 +53,7 @@ Running a Debug Shell ...@@ -53,7 +53,7 @@ Running a Debug Shell
A debugging environment can be created by starting a shell inside the sandbox:: A debugging environment can be created by starting a shell inside the sandbox::
flatpak run --devel --command=bash sm.puri.Handy.Example flatpak run --devel --command=bash sm.puri.Handy.Demo
The sandboxed shell will start running and will show a prompt like this:: The sandboxed shell will start running and will show a prompt like this::
......
...@@ -42,7 +42,7 @@ When you start Builder, open the application menu in the top-right of title bar, ...@@ -42,7 +42,7 @@ When you start Builder, open the application menu in the top-right of title bar,
Fill in the Repository URL for the libhandy repository:: Fill in the Repository URL for the libhandy repository::
https://source.puri.sm/Librem5/libhandy.git https://gitlab.gnome.org/GNOME/libhandy.git
You can leave the Project Directory to be the default directory, or change it if you like. You can leave the Project Directory to be the default directory, or change it if you like.
...@@ -76,16 +76,16 @@ Alternatively, you can click the omnibar at the top of the window and select the ...@@ -76,16 +76,16 @@ Alternatively, you can click the omnibar at the top of the window and select the
:align: center :align: center
:alt: Exporting a flatpak bundle :alt: Exporting a flatpak bundle
When the flatpak creation is finished, a file manager window will pop up in the directory where the ``sm.puri.Handy.Example.flatpak`` is located. Make a note of this location. When the flatpak creation is finished, a file manager window will pop up in the directory where the ``sm.puri.Handy.Demo.flatpak`` is located. Make a note of this location.
Deploying the flatpak to the Phone Deploying the flatpak to the Phone
---------------------------------- ----------------------------------
To run this flatpak you must first transfer it onto the phone or development board and install it. On your workstation, open a terminal and change directory to the one containing the ``sm.puri.Handy.Example.flatpak`` file. To run this flatpak you must first transfer it onto the phone or development board and install it. On your workstation, open a terminal and change directory to the one containing the ``sm.puri.Handy.Demo.flatpak`` file.
Copy the flatpak to the phone using the ``scp`` tool:: Copy the flatpak to the phone using the ``scp`` tool::
user@workstation:~$ scp sm.puri.Handy.Example.flatpak purism@192.168.42.2:~/ user@workstation:~$ scp sm.puri.Handy.Demo.flatpak purism@192.168.42.2:~/
Log in to the phone using ``ssh``:: Log in to the phone using ``ssh``::
...@@ -93,7 +93,7 @@ Log in to the phone using ``ssh``:: ...@@ -93,7 +93,7 @@ Log in to the phone using ``ssh``::
Install the flatpak on the phone:: Install the flatpak on the phone::
purism@pureos:~$ flatpak install sm.puri.Handy.Example.flatpak purism@pureos:~$ flatpak install sm.puri.Handy.Demo.flatpak
You may be asked to install additional packages for the runtimes that the application needs to run. You may be asked to install additional packages for the runtimes that the application needs to run.
...@@ -101,7 +101,7 @@ If installation fails due to missing runtimes, you may need to review the instru ...@@ -101,7 +101,7 @@ If installation fails due to missing runtimes, you may need to review the instru
If it was installed successfully then you can run the installed application:: If it was installed successfully then you can run the installed application::
purism@pureos:~$ flatpak run sm.puri.Handy.Example purism@pureos:~$ flatpak run sm.puri.Handy.Demo
You will see the application start on the screen connected to the board. You will see the application start on the screen connected to the board.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment