Update Ubuntu Touch apps to 20.04 Focal Fossa
-
This is the instruction shared to update your Ubuntu Touch apps to 20.04 Focal Fossa:
Modify manifest.json with "architecture":
@CLICK_ARCH@
Rename all imports:
find -name '*.qml' | xargs -I {} sed -i 's/import Ubuntu\./import Lomiri./g' {}
( there could be also some names to rename: e.g (UbuntuNumberAnimation, UbuntuColors , UbuntuShape)
clickable clean
Run clickable with 20.04 context:
CLICKABLE_FRAMEWORK=ubuntu-sdk-20.04 clickable...
Please reply when you have additional suggestions, or when you find bugs. Thanks!
-
-
@remark I would suggest to use the
CLICKABLE_FRAMEWORK
env var only when building for xenial and focal from the exact same code base, using the QML compat layer. As the instructions suggest to replaceUbuntu
imports byLomiri
, I'd rather suggest to setframework: ubuntu-sdk-20.04
in theclickable.yaml
. -
@jonius Is it required in
clickable.yaml
or changing the framework in the manifest works? I guess not since the clickable config let's it identify that it's focal? -
These are the things I've done in my apps:
- Set framework in clickable config file
"framework": "ubuntu-sdk-20.04"
- Set framework in manifest
"framework": "ubuntu-sdk-20.04"
- Update policy in the apparmor config
"policy_version": 20.04
- Run the following inside the project's directory
find -name '*.qml' | xargs -I {} sed -i 's/import Ubuntu\./import Lomiri./g' {} find -name '*.qml' | xargs -I {} sed -i 's/UbuntuAnimation/LomiriAnimation/g' {} find -name '*.qml' | xargs -I {} sed -i 's/UbuntuNumberAnimation/LomiriNumberAnimation/g' {} find -name '*.qml' | xargs -I {} sed -i 's/UbuntuListView/LomiriListView/g' {} find -name '*.qml' | xargs -I {} sed -i 's/UbuntuColors/LomiriColors/g' {} find -name '*.qml' | xargs -I {} sed -i 's/UbuntuShape/LomiriShape/g' {}
Also, tailing app logs since Logviewer isn't updated yet for focal
journalctl -f --user-unit lomiri-app-launch--application-click--<appname>
- Set framework in clickable config file
-
@kugiigi Clickable does not consider the manifest when deciding to use a xenial/focal docker image. It considers the framework in the project config or the env var. Otherwise it uses its default, which still is xenial. For a QML only app (after testing it really works in focal), one could keep the 16.04 framework for now and just upload the same click for focal.
Note that
clickable log
andclickable logs
usejournalctl
for focal (if the framework is specified as focal).The instructions above should be updated with what you suggest.
-
What is also missing is updating the app armor policy to 20.04 and renaming the
X-Ubuntu
keys in the desktop file toX-Lomiri
. -
-
-
-
-
To add a few lines to @kugiigi s post with the replace work that needs doing, here my addition of a few more lines:
find -name '*.qml' | xargs -I {} sed -i 's/Ubuntu.Components/Lomiri.Components/g' {} find -name '*.qml' | xargs -I {} sed -i 's/Ubuntu.Connectivity/Lomiri.Connectivity/g' {} find -name '*.in.in' | xargs -I {} sed -i 's/X-Ubuntu/X-Lomiri/g' {}
The last line is for the desktop file.
-
@danfro First 2 lines might already be covered by the replace for
import Ubuntu
-
@kugiigi true. I wonder why I noted those lines a while ago.
-