• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
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.
    • B Offline
      Beta Break
      last edited by 15 Nov 2022, 11:21

      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!

      J 1 Reply Last reply 29 Dec 2022, 10:44 Reply Quote 4
      • L Lakotaubp referenced this topic on 21 Dec 2022, 08:44
      • J Offline
        jonius @Beta Break
        last edited by 29 Dec 2022, 10:44

        @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 29 Dec 2022, 11:47 Reply Quote 0
        • K Offline
          kugiigi @jonius
          last edited by 29 Dec 2022, 11:47

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

          J 1 Reply Last reply 1 Jan 2023, 19:55 Reply Quote 0
          • K Offline
            kugiigi
            last edited by 30 Dec 2022, 12:19

            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
            • J Offline
              jonius @kugiigi
              last edited by jonius 1 Jan 2023, 19:56 1 Jan 2023, 19:55

              @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
              • J Offline
                jonius
                last edited by 2 Jan 2023, 21:47

                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
                • L Lakotaubp referenced this topic on 7 Jan 2023, 06:50
                • L Lakotaubp referenced this topic on 3 Feb 2023, 10:11
                • D doniks referenced this topic on 9 Mar 2023, 06:55
                • L Lakotaubp pinned this topic on 9 Mar 2023, 06:57
                • D Offline
                  danfro
                  last edited by 30 Mar 2023, 15:46

                  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 30 Mar 2023, 18:20 Reply Quote 1
                  • K Offline
                    kugiigi @danfro
                    last edited by 30 Mar 2023, 18:20

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

                    D 1 Reply Last reply 30 Mar 2023, 18:36 Reply Quote 0
                    • D Offline
                      danfro @kugiigi
                      last edited by 30 Mar 2023, 18:36

                      @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 17 Feb 2024, 18:08
                      7 out of 9
                      • First post
                        7/9
                        Last post