UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Update Ubuntu Touch apps to 20.04 Focal Fossa

    Scheduled Pinned Locked Moved App Development
    9 Posts 4 Posters 2.9k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • Beta BreakB Offline
        Beta Break
        last edited by

        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!

        joniusJ 1 Reply Last reply Reply Quote 4
        • LakotaubpL Lakotaubp referenced this topic on
        • joniusJ Offline
          jonius @Beta Break
          last edited by

          @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 replace Ubuntu imports by Lomiri, I'd rather suggest to set framework: ubuntu-sdk-20.04 in the clickable.yaml.

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kugiigi @jonius
            last edited by

            @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?

            joniusJ 1 Reply Last reply Reply Quote 0
            • K Offline
              kugiigi
              last edited by

              These are the things I've done in my apps:

              1. Set framework in clickable config file
                "framework": "ubuntu-sdk-20.04"
              2. Set framework in manifest
                "framework": "ubuntu-sdk-20.04"
              3. Update policy in the apparmor config
                "policy_version": 20.04
              4. 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>

              1 Reply Last reply Reply Quote 2
              • joniusJ Offline
                jonius @kugiigi
                last edited by jonius

                @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 and clickable logs use journalctl for focal (if the framework is specified as focal).

                The instructions above should be updated with what you suggest. :thumbs_up:

                1 Reply Last reply Reply Quote 1
                • joniusJ Offline
                  jonius
                  last edited by

                  What is also missing is updating the app armor policy to 20.04 and renaming the X-Ubuntu keys in the desktop file to X-Lomiri.

                  1 Reply Last reply Reply Quote 1
                  • LakotaubpL Lakotaubp referenced this topic on
                  • LakotaubpL Lakotaubp referenced this topic on
                  • D doniks referenced this topic on
                  • LakotaubpL Lakotaubp pinned this topic on
                  • danfroD Offline
                    danfro
                    last edited by

                    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.

                    K 1 Reply Last reply Reply Quote 1
                    • K Offline
                      kugiigi @danfro
                      last edited by

                      @danfro First 2 lines might already be covered by the replace for import Ubuntu

                      danfroD 1 Reply Last reply Reply Quote 0
                      • danfroD Offline
                        danfro @kugiigi
                        last edited by

                        @kugiigi 🤔 true. I wonder why I noted those lines a while ago.

                        1 Reply Last reply Reply Quote 0
                        • T tera referenced this topic on
                        • First post
                          Last post