raylib framework - clickable build template pure
I finally managed to get a game engine compiled and running: raylib
There is just one more problem to solve and this is packaging a raylib example that I previously compiled inside a Libertine container.
What I have done:
- Compiled the raylib game framework + the examples inside a Libertine container
- Copied one of the examples onto my Desktop PC
- Created a cmake project using clickable (since there is no template for a pure x11 make target)
- Erased everything except:
- the assets folder with the icon
- apparmor file
- .desktop file
- Added the executable (compiled for armhf) to the project folder
- Changed "template" in clickable.json to "pure"
- Changed "architecture" in manifest.json to "armhf"
- Ran "clickable build" and "clickable click-build" (the click package got created without any errors)
- Copied the click file into the Downloads folder of my phone and installed it via UT Tweak Tool (and terminal after It didn't work - but same result)
- The install went through without any errors, as far as I can tell the files got copied to their destinations
- But: The starter doesn't appear on the App Launcher screen, even after several refreshes.
Did I do something wrong?
Here is the zipped clickable project file
You mention X11 in your post, but your
X-Ubuntu-Touch=Truein it. Which is correct? You cannot specify the latter for X11 apps.
Also, when you install a click package with a
desktophook, a new version of the file matching the package/name/version for your app, in
~/.local/share/applications/. You should check there to ensure it's generated correctly. Judging from your zip file, it seems like your package is simply named "raylibtest" without a proper namespace. The
namefield in your
manifest.jsonshould be a properly namespaced value, such as
Thanks for your quick response
I got it to show up on the launcher screen after removing the "X-Ubuntu-Touch=True" line from the desktop file.
But it still refuses to run. After installation another desktop file was automatically created:
[Desktop Entry] Name=raylibdemo Exec=raylibdemo Icon=assets/logo.svg Terminal=false Type=Application
[Desktop Entry] Name=raylibdemo Exec=aa-exec-click -p raylibdemo.wendigo_raylibdemo_1.0.0 -- raylibdemo Icon=/opt/click.ubuntu.com/.click/users/phablet/raylibdemo.wendigo/assets/logo.svg Terminal=false Type=Application Path=/opt/click.ubuntu.com/.click/users/phablet/raylibdemo.wendigo X-Ubuntu-Old-Icon=assets/logo.svg X-Ubuntu-Application-ID=raylibdemo.wendigo_raylibdemo_1.0.0 X-Ubuntu-UAL-Source-Desktop=/opt/click.ubuntu.com/.click/users/phablet/raylibdemo.wendigo/raylibdemo.desktop
I have to admit that I don't know anything about the commands that were added in the "Exec" parameter automatically (nor about the X-Ubuntu-Touch, X-Ubuntu-XMir-Enable etc. parameters. Is there any documentation about it?)
When I open a Terminal and try to run the executable from there (./raylibdemo)I get this output:
INFO: Initializing raylib 2.0 WARNING: [GLFW3 Error] Code: 65544 Decription: X11: The DISPLAY enviraonment variable is missing WARNING: Failed to initialize GLFW INFO: [resources/cubimap.png] Image loaded successfully (32x16) Segmentation fault
So it seems to be display server related.
Does raylib require X11? If so, then
X-Ubuntu-XMir-Enable=Truewill be required in the
However, it may still fail to run with that. XMir does not have support for video acceleration on the phones, so if that is required under X11, it won't be very viable here. If instea, raylib is just an abstraction on top of SDL2 or something else which can talk to Mir directly, then it may be possible to use it with accelerated video.
I chose Raylib as a test candidate because it is a game library that has no external dependencies and when building it as "Raspberry Pi" target the docs say that no windowing system would be required:
PLATFORM_RPI Raspbian (native) OpenGL ES 2.0 Runs graphics natively on console, no X11 windowing/inputs system required.
I thought building it for the Pi would be the same as for UT. At least it compiled without errors and ran when I called it from within the Libertine container where I built it (but with bad performance).
It still crashes on startup with
OK. I took a closer look. It seems like it won't work. I'm not sure what it means when it says "no X11 windowing system is required" there. I suppose it's trying to use the framebuffer device directly, which will not work under Mir either. That seems to be for running it from a console directly, without a windowing system.
Without X11, a Mir backend is required to authenticate to the display server and create the buffer for the app to draw on. With X11, GL acceleration will not be possible under Xmir.
So it seems like raylib will not be usable for now.
That's a pity, thank you very much for investigating.