Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Add custom starter to App scope

    Support
    5
    23
    2800
    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.
    • Wendigo
      Wendigo last edited by Wendigo

      Hi UBPorters,
      I managed to compile love2d inside a Libertine container. Now I would like to create a custom launcher for the Desktop App-Scope to run the binaries.
      Does someone know where the desktop file needs to be placed in order to appear in the scope?And do I need to include more than just X-Ubuntu-Touch=true and X-Ubuntu-XMir-Enable=true to run it with XMir?

      I also tried to install the older version of love from the Ubuntu repository but since it is an application that gets run from the terminal it doesn't seem to have a desktop launcher either.

      1 Reply Last reply Reply Quote 0
      • dobey
        dobey last edited by

        The .desktop file should be in /usr/share/applications/ inside the container. You do not need either of the X-Ubuntu-Touch nor X-Ubuntu-XMir-Enable options added to the file (and setting both to true is contradictory).

        If it's something that runs via terminal, and is not a GUI X11 app, then how exactly are you expecting it to be run?

        1 Reply Last reply Reply Quote 0
        • Wendigo
          Wendigo last edited by

          Thank you very much, I found it. The reason I couldn't see it in the desktop scope was "NoDisplay" set to true.

          If it's something that runs via terminal, and is not a GUI X11 app, then how exactly are you expecting it to be run?

          The love2d game engine acts as some kind interpreter for games written in Lua that get passed to the executable as an argument. If you run "love" on its own, you'll get this window:
          0_1541945030846_love11.1.png
          But since it is not intended to be run on its own there is no .desktop file contained in the repository for it.

          I got it running but sadly it is so slow that I can literally count the frames as they get drawn and something is wrong with the colours.
          0_1541945718592_love11.1_utouch.png
          This is pretty sad since love would have been a very good choice of game framework for Ubuntu Touch since game developers wouldn't have to compile anything themselves, just package a precompiled love binary and add their zipped game project as a parameter. This would have been the most straight forward way of developing games for Ubuntu Touch. 😞
          I don't know it if tries to render OpenGL or GLES2. Maybe it can still be improved upon.
          I'll ask for help on the love2d forum.

          1 Reply Last reply Reply Quote 0
          • G
            gmelchett last edited by

            Interesting. Sad that the performance was that bad.
            Have you had a look at https://github.com/renpy/pygame_sdl2?
            (It has a pygame compatible mode)
            There is at least one game for Sailfish that uses that pygame_sdl2.

            1 Reply Last reply Reply Quote 0
            • dobey
              dobey last edited by

              There is no 3D acceleration for X11 apps. Depending on what it uses to actually render to screen, perhaps it could be something used that gets packaged along with apps using it, and could be run as a click instead, without the need for libertine or X11.

              You likely won't have any luck with things that need acceleration to run, from the libertine/X11 side.

              Wendigo 1 Reply Last reply Reply Quote 0
              • Wendigo
                Wendigo @dobey last edited by

                Thanks for the insight. Does that mean, that there is currently no OpenGL/GLES/WebGL at all? (during Q&A40 Marius mentioned that WebGL is currently also disabled in the browser App)

                Depending on what it uses to actually render to screen, perhaps it could be something used that gets packaged along with apps using it, and could be run as a click instead, without the need for libertine or X11.

                Could you elaborate on this topic a bit please?

                dobey 1 Reply Last reply Reply Quote 0
                • CiberSheep
                  CiberSheep last edited by CiberSheep

                  There is an arm buld for Love2D you can take apart:
                  https://bitbucket.org/rude/love/downloads/

                  Or if you want to read how to build, you can start here: https://love2d.org/forums/viewtopic.php?f=12&t=79468

                  Another planet, another time, another universe!

                  1 Reply Last reply Reply Quote 0
                  • Wendigo
                    Wendigo last edited by

                    Here is the love.desktop starter I used to run the old love2d version from the repository:

                    [Desktop Entry]
                    Name=Love
                    MimeType=application/x-love-game;
                    Exec=/usr/bin/love
                    Comment=Games development framework in lua
                    Type=Application
                    Categories=Development;Game;
                    Terminal=false
                    Icon=love-app
                    

                    If you compile it yourself just change the Exec= path or copy it in the /usr/bin/ folder.

                    1 Reply Last reply Reply Quote 0
                    • dobey
                      dobey @Wendigo last edited by

                      @wendigo GLES works for native apps that are talking directly to Mir (Qt, SDL, etc… packaged in clicks). The browser does not have 3D accel working via GPU, which is why WebGL is disabled. Likewise, apps running under libertine do not have direct hardware access, and are not talking directly to Mir. The Xmir wrapper does not provide 3D accel on the phones/tablets, so such things cannot be used there.

                      I don't know anything about the internals of love2d, but if it's using SDL or Qt, then building it appropriately and shipping it along with the app that's using it, inside the click, with the .desktop file of the app doing all the right stuff, it could indeed use the accelerated graphics.

                      1 Reply Last reply Reply Quote 0
                      • G
                        gmelchett last edited by

                        Too bad Mir support was removed from SDL a few days ago 😞
                        https://github.com/SDL-mirror/SDL/commit/feb85d5ae0ef4c3e5602cfc4976f7a97f049ff2c

                        dobey 1 Reply Last reply Reply Quote 0
                        • dobey
                          dobey @gmelchett last edited by

                          @gmelchett Well, you don't have to use the version from git. I suspect it was removed there in favor of using Wayland, with newer versions of Mir, as is also done for other toolkits. That will be the way forward in the future, but for now, direct client support is needed on the phone/tablet builds.

                          1 Reply Last reply Reply Quote 0
                          • mymike
                            mymike last edited by

                            any update about love games on UT?

                            1 Reply Last reply Reply Quote 0
                            • Wendigo
                              Wendigo last edited by

                              Not really. Since Love2d depends on SDL2 we'd first figure out how to compile SDL with clickable:

                              • All dependencies included
                              • With SDL2 version <= 2.0.7
                              mymike 1 Reply Last reply Reply Quote 1
                              • mymike
                                mymike @Wendigo last edited by

                                @wendigo thanks
                                but why do we need to compile love2d? can't we use an existing armhf love build?
                                let me know if there are any progress (and maybe how can I help in this), as I'm interested in a love game on UT...

                                btw, are you also ion telegram, where we can chat easily?

                                Wendigo 1 Reply Last reply Reply Quote 0
                                • Wendigo
                                  Wendigo @mymike last edited by

                                  @mymike said in Add custom starter to App scope:

                                  @wendigo thanks
                                  but why do we need to compile love2d? can't we use an existing armhf love build?
                                  let me know if there are any progress (and maybe how can I help in this), as I'm interested in a love game on UT...

                                  btw, are you also ion telegram, where we can chat easily?

                                  IIRC the armhf build for Raspberry Pi was built for X11 with Mir/Wayland explicitly excluded via compiler flags, but I'm not quite sure. All I remember is that it didn't work.
                                  You can find me on Telegram and Matrix (FluffyChat) under the name: [ a t ]mickey83
                                  Though I'm more active on Matrix.

                                  Wendigo 1 Reply Last reply Reply Quote 1
                                  • Wendigo
                                    Wendigo @Wendigo last edited by

                                    I had a second look, guess I was wrong. The Mir/Wayland backend was excluded from the RasPi version of SDL2. Love2d was offered for armhf in deb format, which I don't know how to install via clickable. (if that is possible at all)

                                    1 Reply Last reply Reply Quote 0
                                    • mymike
                                      mymike last edited by

                                      what about installing SDL2 and Love2d in the system image? so that every app/game that needs them doesn't need to have them inside the click package. I know we are almost out of space, but they're quite small and useful...
                                      this way we can install them as deb. I'll have a shot to see if installed as deb they work...

                                      dobey 1 Reply Last reply Reply Quote 0
                                      • dobey
                                        dobey @mymike last edited by

                                        @mymike We can't, and really shouldn't, ship every possible library that one might want to use in an app, or that is required by a game, which someone wants to package for UT. And if we ship the main SDL library, then how many others should we ship? We can't ship them all, and many different ones are used by different developers.

                                        It's not hard to have an SDL that supports Mir built into a click package.

                                        mymike 1 Reply Last reply Reply Quote 0
                                        • mymike
                                          mymike @dobey last edited by

                                          @mymike We can't, and really shouldn't, ship every possible library

                                          ok, I understand

                                          It's not hard to have an SDL that supports Mir built into a click package.

                                          just try to build SDL with clickable?

                                          dobey 1 Reply Last reply Reply Quote 0
                                          • dobey
                                            dobey @mymike last edited by

                                            @mymike said in Add custom starter to App scope:

                                            just try to build SDL with clickable?

                                            Yes, with the libraries config, or you might be able to just pull the library out of the deb package if it doesn't have any hard-coded paths built into it, and is linked to the correct version of Mir.

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