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

    .NET6 on UT

    Scheduled Pinned Locked Moved App Development
    avalonia.uiuno platformnet6
    26 Posts 9 Posters 4.7k Views 3 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.
      • arubislanderA Offline
        arubislander @dizzy
        last edited by

        @dizzy in order to run a .NET app on UT the whole .NET runtime would need to be packaged in the .click (clicks are the package format for UTouch apps). This probably being a game, the gaming engine would need to be included as well.

        There are no tutorials or instructions on how to do this as it has as yet never been attempted.

        πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
        Happily running Ubuntu Touch
        Google Pixel 3a (24.04 preview)
        JingPad (24.04 preview)
        PinePhone OG (20.04)
        Meizu Pro 5 (16.04 DEV)

        dizzyD 1 Reply Last reply Reply Quote 0
        • dizzyD Offline
          dizzy @arubislander
          last edited by dizzy

          @arubislander You can deploy both Avalonia and Uno apps self contained and as a single executable file, and it runs on Linux desktop. No installation needed. I have tried it on Ubuntu and Manjaro Gnome. Could that work on UT? Not optimal but a good start if so.

          arubislanderA 1 Reply Last reply Reply Quote 0
          • arubislanderA Offline
            arubislander @dizzy
            last edited by

            @dizzy said in .NET6 on UT:

            @arubislander You can deploy both Avalonia and Uno apps self contained and as a single executable file, and it runs on Linux desktop. No installation needed. I have tried it on Ubuntu and Manjaro Gnome. Could that work on UT? Not optimal but a good start if so.

            @dizzy It would depend on what those self-contained packages expect to be installed on the base system.
            Desktops and laptops have many more packages installed than there are on Ubuntu Touch. Also the non-mainline devices use the Mir protocol for the display manager. The PinePhone uses the Wayland protocol. These need to be supported by the afore mentioned packages.

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            Google Pixel 3a (24.04 preview)
            JingPad (24.04 preview)
            PinePhone OG (20.04)
            Meizu Pro 5 (16.04 DEV)

            dizzyD 1 Reply Last reply Reply Quote 0
            • dizzyD Offline
              dizzy @arubislander
              last edited by

              @arubislander Interesting, so Pinephone UT uses Wayland. To be honest, I wasn't even thinking of Mir...
              I guess I just have to tryout a "Hellow world" application. Thanks!

              1 Reply Last reply Reply Quote 0
              • fredldotmeF Offline
                fredldotme
                last edited by

                @dizzy it all depends on what native-side toolkit those .NET toolkits use. If it's GTK or SDL (something that uses Wayland to spawn window surfaces) then to some extent it could work, at least on Halium >= 9.0 and mainline devices.

                dizzyD 1 Reply Last reply Reply Quote 0
                • N Offline
                  nero355 @dizzy
                  last edited by

                  @dizzy said in .NET6 on UT:

                  Is it possible to develop applications with .NET6 for UT? I was thinking of Avalonia.UI or Uno Platform.

                  Never heard of those two before so learned something new today! Thnx! πŸ™‚

                  About .NET in combination with Linux in general :
                  You could try https://www.mono-project.com/ and see what happens when you add it to your phone...

                  Huge chance you will ending up flashing the phone again but it also might be worth it ?!

                  Good luck! πŸ™‚

                  My phones :

                  • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                  • ZUK Z2 Pro - ZUI Android 8.x
                  • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                  P.S. : I am NOT a developer! ;)

                  1 Reply Last reply Reply Quote 0
                  • dizzyD Offline
                    dizzy
                    last edited by

                    I tried a little bit today with no success. Haven't had time to investigate it further but I did find this:
                    https://stackoverflow.com/questions/66108147/is-there-any-way-to-run-an-avalonia-app-in-an-arm64-environment

                    1 Reply Last reply Reply Quote 0
                    • dizzyD Offline
                      dizzy @fredldotme
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • dizzyD Offline
                        dizzy
                        last edited by

                         When trying to run the app on UT

                        arubislanderA 1 Reply Last reply Reply Quote 0
                        • arubislanderA Offline
                          arubislander @dizzy
                          last edited by

                          @dizzy does it have to be executed as root? What happens if you try it without sudo?

                          In case it does need root, then you need to provide the complete path to the executable.

                          It could also be that nothing is allowed to be executed in the Downloads folder.

                          πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                          Happily running Ubuntu Touch
                          Google Pixel 3a (24.04 preview)
                          JingPad (24.04 preview)
                          PinePhone OG (20.04)
                          Meizu Pro 5 (16.04 DEV)

                          dizzyD 1 Reply Last reply Reply Quote 0
                          • dizzyD Offline
                            dizzy @arubislander
                            last edited by dizzy

                            @arubislander On Linux desktop it doesn't has to be as root but I got a "Permission denied" on UT.
                            This is the executable. It's a single file, self contained application. EDIT: Ah. You meen like this of cause: sudo ./home/phablet/Documents/Avalonia.UT. Have tried that too.
                            I have also tried it in Downloads and Documents.
                            EDIT: Added info.
                            This error was because I compiled it for alpine-arm64.
                            When compiled for linux-arm64 console app runs and Avalonia app at least tryes to.

                            1 Reply Last reply Reply Quote 0
                            • dizzyD Offline
                              dizzy
                              last edited by

                              By the way, is it possible to run appimages on UT? Install flatpacks or snaps?

                              arubislanderA 1 Reply Last reply Reply Quote 0
                              • arubislanderA Offline
                                arubislander @dizzy
                                last edited by

                                @dizzy none of the above is readily possible. AppImages could theoretically be made to work, but none had dedicated themselves to the effort.

                                πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                Happily running Ubuntu Touch
                                Google Pixel 3a (24.04 preview)
                                JingPad (24.04 preview)
                                PinePhone OG (20.04)
                                Meizu Pro 5 (16.04 DEV)

                                dizzyD A 2 Replies Last reply Reply Quote 0
                                • dizzyD Offline
                                  dizzy @arubislander
                                  last edited by dizzy

                                  @arubislander Yep, I'm starting to think it will only run on Plasma Mobile. I will try it again when my Pixel 3a arrives but then I don't have more time for it at the moment. Maybe in the future.

                                  1 Reply Last reply Reply Quote 0
                                  • dizzyD Offline
                                    dizzy
                                    last edited by dizzy

                                    Thanks all!
                                    By the way, I also found this article:
                                    https://www.codingnagger.com/2021/02/14/linux-app-for-pinephone-with-pain-and-net-core/

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      aarontheissueguy @arubislander
                                      last edited by

                                      @arubislander Thats actually an interristing thought. I wonder what it would take.

                                      1 Reply Last reply Reply Quote 0
                                      • dizzyD Offline
                                        dizzy
                                        last edited by dizzy

                                        I have done some progress. .NET 6 ConsoleApp running on UT. This is on Pinephone. Sorry about the text πŸ™‚

                                        ConsoleApp.jpg

                                        Error when launching Avalonia App:

                                        AvaloniaApp.jpg

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          thousandtopics @dizzy
                                          last edited by

                                          @dizzy not .Net but c# or c++ inside Godot can do the job, IDK, Think about it.

                                          dizzyD 1 Reply Last reply Reply Quote 0
                                          • dizzyD Offline
                                            dizzy @thousandtopics
                                            last edited by dizzy

                                            @thousandtopics Actually, dotnet is working in UT. Just have not got it running with Avalonia as a UI framework yet and maybe I never will. I have got it running on Phosh though, even if the scaling was all off. It opened as a movable window. Im talking about created and built with no modifications and thats what Im interesting in. Uno Platform gave the same result.
                                            I dont know what Godot is.

                                            AppLeeA 1 Reply Last reply Reply Quote 0
                                            • AppLeeA Offline
                                              AppLee @dizzy
                                              last edited by

                                              @dizzy said in .NET6 on UT:

                                              I dont know what Godot is.

                                              You'll have to wait for it :face_with_tears_of_joy:

                                              Sorry for the joke ; couldn't resist.
                                              Here is about the Gogot engine: https://godotengine.org/

                                              1 Reply Last reply Reply Quote 1
                                              • First post
                                                Last post