nephros | mal: sorry, yes still there, https://build.sailfishos.org/package/show/home:nephros:devel:portals/xdg-desktop-portal-amber# | 07:38 |
---|---|---|
Keto | nephros: kicked | 07:56 |
nephros | thank you! | 08:42 |
RosSigudottir | Hi, I've just posted a thread on the forum called "Sailfish OS Forum Help building Native standalone LÖVE games", just in case anyone can help | 12:24 |
attah | RosSigudottir: Why do you want/need a SFOS app to just launch another executable? | 12:25 |
attah | ...and does that executable already work? | 12:26 |
RosSigudottir | because launching löve games from the terminal is slow and ugly, and having an icon that you can organize in your app launcher is nicer | 12:26 |
RosSigudottir | yes most of the games I ported work | 12:27 |
attah | That's fair... but i don't see what you are doing here that a .desktop file alone couldn't do | 12:27 |
RosSigudottir | you mean you can have similar results as a deployed app with a .desktop file? | 12:28 |
RosSigudottir | I have no experience with qt and the sdk so I'm not sure how to proceed | 12:28 |
attah | all i see is launching some executable with some arguments... and .desktop files can definitely do that | 12:29 |
RosSigudottir | and you have an icon in the app launcher too? | 12:29 |
attah | that's what the .desktop file does | 12:29 |
RosSigudottir | interesting, I did not know that would work on sailfish, I will definitely try | 12:29 |
attah | defines the executable, points out an icon and stuff like that | 12:29 |
RosSigudottir | ok... | 12:29 |
attah | consider opting out of sandboxing (also in the .desktop file) at least until you have it working like you want | 12:31 |
RosSigudottir | are not all apps by default with sandboxing for protection? what is the benefit of having an app out of sandboxing? | 12:33 |
attah | Everything launched from the GUI is default with sandboxing | 12:34 |
attah | Except terminal, and except stuff that have opted out | 12:34 |
attah | The benefit is that you can access files placed in otherwise normal places that are not available in the sandbox | 12:35 |
RosSigudottir | I don't think it is necessary, as far as I tested saved games load and game saves... but maybe I was out of sandbox because I run it from terminal... | 12:36 |
attah | ...and some general game framework might have some expectations on that - or you on where you get to keep the game data | 12:36 |
attah | exactly; you dodged all of that | 12:36 |
RosSigudottir | I see | 12:36 |
RosSigudottir | and regarding game distribution, you think .desktop files with a game is a good way of distribution? | 12:36 |
attah | Not saying you should keep it that way forever necessarily.... just get it working without *first* | 12:36 |
attah | .desktop files in and of themselves, no... but presumably you need to distribute the actual game data somehow? | 12:37 |
attah | ...and that should probably drive the solution rather than how to get an icon | 12:38 |
RosSigudottir | well they are actually distributed as .love files in my repository, .desktop would make them nicer if it works as you explained, but native deployed apps would be the best I think | 12:38 |
attah | Why not have one .love file and one .desktop file, bundled in an rpm, and then depend on the core game engine? | 12:39 |
RosSigudottir | sounds good, however I've never created RPM packages, only AppImages with success, I could try that if you think it works | 12:40 |
attah | Putting files on disk in an orderly/managed way is kind of what they do | 12:41 |
RosSigudottir | I need to learn how to create the rpm packages or find a template, I will definitely try that | 12:42 |
attah | Then there is lots of stuff about building that the rpm tooling can do too, but you'd basically just use it as an archive | 12:42 |
attah | https://rpm-packaging-guide.github.io/ | 12:42 |
attah | ...or perhaps https://stackoverflow.com/questions/21557015/build-rpm-to-just-install-files | 12:43 |
attah | and then look at the SDK template rpm spec for things like icon handling | 12:45 |
RosSigudottir | thanks for the tips, I'm currently testing some desktop files and I will try later to build an rpm | 12:51 |
RosSigudottir | I've just created my first rpm and it installed on my sailfish phone, but I can't see the icon on the launcher... | 13:09 |
RosSigudottir | maybe I did something wrong | 13:09 |
RosSigudottir | I will probably host it on openrepos so that maybe someone could lead me to make the icon work | 13:10 |
attah | Well, the rpm needs to specifically install a .desktop file, and in the correct location | 13:16 |
attah | Icon handling can just be taken from the template app that the SDK generates | 13:17 |
RosSigudottir | I see, I'm not really experienced with packaging but I think this is almost working, I hosted the first app here just in case anyone wants to test and provide feedback: https://openrepos.net/content/glitchapp/virtual-gamepad | 13:19 |
Keto | RosSigudottir: that seems to be way off track. the rpm contains only /usr/bin/VirtualInputs, which is a bash script which tries to run ./VirtualGamepad/VirtualGamepad.desktop | 14:06 |
Keto | you might get more/better help if you shared the sources, as then it would be probably easier to instruct how to do things | 14:08 |
RosSigudottir | you are right Keto, I think I got it right now but I will share the sources soon | 14:12 |
Keto | have you built the löve engine for sailfish? I found one fork on github that had some changes related to making it work on sailfish... | 14:14 |
RosSigudottir | The LÖVE build hosted on openrepos works fine, there is also a build for 64 bits but I could not test it | 14:14 |
RosSigudottir | here there are my sources: https://ufile.io/isj4h1ci | 14:14 |
RosSigudottir | Keto no I did not built the engine, it is not engine but a framework, but it was build by other developer | 14:15 |
RosSigudottir | which one is that built on github Keto? maybe it works better, I would like to test it | 14:17 |
Keto | it seems to be the same that is on openrepos https://openrepos.net/content/sashikknox/love-2d-runtime there is also link to the sources on github | 14:21 |
RosSigudottir | and then that there is, and it works... kind of... there is no device orientation, volume can not be controlled... but it works at least | 14:22 |
Keto | the spec file in your source has some issues, but it looks like it might produce somewhat working rpm :) | 14:29 |
RosSigudottir | I did it | 14:29 |
RosSigudottir | it works | 14:29 |
RosSigudottir | I've just installed it on my mobile and it works, I will update the file on openrepos soon | 14:29 |
RosSigudottir | thanks! I'm really bad at rpm files because I don't use them much on the desktop but It seems this time works | 14:30 |
RosSigudottir | feel free to test it, I will eventually add some games in the future with the same method | 14:31 |
Keto | I'll see if I have some time tomorrow to play around with that engine | 14:35 |
RosSigudottir | great! thanks again for the help and feel free to test it and build any game with it | 14:37 |
direc85[m] | I have a semi-complex SilicaListItem.header item, which has a ComboBox inside it. The issue is that the page is created with pageStack.pushAttached() and then its height is 0. When I'm entering the page, it gets rendered and its height gets set to its value. This causes the header height to increase and it causes the contents to scroll up. Is there some way to prevent that from happening? | 19:38 |
direc85[m] | The other option would be completely revamping the layout, but that's a thing and a half to do. | 19:38 |
direc85[m] | *SilicaListView.header item | 19:38 |
direc85[m] | And of course when I asked for help, I figured it out: I'll have to use something higher as default height: height: implicitHeight == 0 ? width : implicitHeight | 19:43 |
direc85[m] | And now the header functions correctly again... | 19:44 |
nephros | piggz[m]: about kirigami and XDG Portal: so now the kirigami app opens a kde native dialog which is bad. Can you make Kirigami try to use Portals instead? | 20:30 |
nephros | piggz[m]: because currently my poc portal backend does provide the correct service. | 20:33 |
nephros | doesn't work to show a dialog yet, but it does receive and try to handle the request. | 20:34 |
nephros | btw, you can send/compose email, and set an ambience background via Portal. | 20:36 |
nephros | Oh, is there an example code how to use dbus-activatable apps which run in background through "ExecDbus=foo --dbus" but do no show a window? | 20:39 |
attah | nephros: what do you mean don't show a window...? the whole point is that it doesn't until you tell it to (which is kinda built in) | 20:41 |
attah | But i suppose you can do whatever when the dbus call comes in | 20:44 |
nephros | attah: yes im looking for the cpp part of that. the standard examples for a sf app just immediately launch the qml file. | 20:48 |
nephros | I guess its trivial but I'm just not a cpp/qt person :) | 20:52 |
attah | I struggled a lot with this too | 20:54 |
attah | Basically it goes like this: if(not present on dbus) launch application as per ExecDbus; Once service appears: call specified dbus methond | 20:55 |
attah | the application doesn't even have to react to the call really | 20:55 |
attah | This could be empty... but it would confuse the hell out of the user: https://github.com/attah/harbour-seaprint/blob/9498e27f7ffd0bd58ebda1b20b041e53226f8209/src/freedesktopdbusadaptor.cpp#L30 | 20:57 |
piggz[m] | nephros: afaik it should just work (tm) | 20:59 |
piggz[m] | maybe some env var needed? | 20:59 |
piggz[m] | reading https://wiki.archlinux.org/title/XDG_Desktop_Portal | 20:59 |
nephros | attah: perfect, thank you! | 21:00 |
nephros | piggz[m]: it should try org.freedesktop.portal.FileChooser.OpenFile dbus call. | 21:04 |
nephros | if it does we're good. | 21:05 |
piggz[m] | is there a package to try? | 21:05 |
nephros | well, https://build.sailfishos.org/package/show/home:nephros:devel:portals/xdg-desktop-portal-amber# | 21:05 |
nephros | plus https://build.sailfishos.org/package/show/home:nephros:devel:portals/xdg-desktop-portal-116 | 21:06 |
nephros | note I subpackage a lot :) | 21:07 |
nephros | from portal-116 you need just the main one. | 21:08 |
nephros | from amber you need the main, qml, and sailfishos-config. | 21:09 |
piggz[m] | does that have the file dialog stuff? | 21:10 |
nephros | start the systemd services, and for testing do: | 21:10 |
nephros | gdbus call --session --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop --metho | 21:10 |
nephros | d org.freedesktop.portal.Email.ComposeEmail "0" '{"address": <"test@example.org">,"subject":<"test email">}' | 21:10 |
nephros | if email comes up, youre ready. | 21:10 |
nephros | then try: | 21:11 |
nephros | gdbus call --session --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop --metho | 21:11 |
nephros | d org.freedesktop.portal.FileChooser.OpenFile "0" "" '{}' | 21:11 |
nephros | that last one does not work, but you should have error outout from amber. | 21:11 |
nephros | piggz[m]: it does have the file dialog service for OpenFile. | 21:12 |
nephros | whats missing atm is launching the silica picker app, and responding via dbus from there. | 21:14 |
piggz[m] | gdbus call --session --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop --method org.freedesktop.portal.Email.ComposeEmail "0" '{"address": <"test@example.org">,"subject":<"test email">}' | 21:26 |
piggz[m] | Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Email” on object at path /org/freedesktop/portal/desktop | 21:29 |
nephros | hm. both systemd services are running? | 21:32 |
nephros | or rather, launch the amber one on console, then the xdg one. | 21:33 |
piggz[m] | ive started xdg-desktop-portal xdg-document-portan and xdg-desktop-portal-amber | 21:33 |
nephros | or just both on console. (from /usr/libexec) | 21:33 |
nephros | and the xdg main one *needs* the env var XDG_CURRENT_DESKTOP=Lipstick | 21:34 |
piggz[m] | [defaultuser@PhoneX23 ~]$ /usr/libexec/xdg-desktop-portal-amber &... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/FJJYLyRmOzREhSLYruhcMMJS>) | 21:35 |
nephros | is there already an amber process running? | 21:37 |
piggz[m] | ah there is | 21:37 |
nephros | kill it, and launch with devel-su -p | 21:37 |
piggz[m] | email worked | 21:37 |
nephros | yay!! | 21:37 |
nephros | so, if you try OpenFile youshould see errors from amber. | 21:40 |
piggz[m] | i did, and i didnt :) | 21:40 |
nephros | ah well my attempts at showing the dialog are about an hour old. | 21:40 |
nephros | so what it does is https://github.com/nephros/xdg-desktop-portal-amber/blob/poc/src/filechooser.cpp | 21:45 |
nephros | and we want it to launch https://github.com/nephros/xdg-desktop-portal-amber/blob/poc/qml | 21:45 |
piggz[m] | nephros: success | 21:46 |
piggz[m] | i needed to add PLASMA_INTEGRATION_USE_PORTAL=1 | 21:46 |
piggz[m] | [D] unknown:0 - FileChooser.OpenFile called with parameters:... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/wwlUnuHGlCvlYJzBnWyiOrjV>) | 21:47 |
nephros | the app would present a picker dialog, and then, through some magic, return the file path selected via https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Request.html#org-freedesktop-portal-request-response | 21:47 |
nephros | ok great, that message means ot is working fine. | 21:48 |
nephros | cool. | 21:49 |
nephros | Now we only need pipewire, and pipewire to talk to lipstick/droidmedia and we have video chat for all apps, easy. lol. | 21:59 |
b100dian[m] | So for pipewire we need a port of https://github.com/mer-hybris/pulseaudio-modules-droid-hidl/ at least I would guess? | 23:56 |
b100dian[m] | Btw, since the last time you mentioned pipewire and portals I did install it.. on my desktop:) and lo and behold, don't need JACK anymore for music apparently (didn't test thoroughly, but promising) | 23:56 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!