Saturday, 2024-03-02

nephrosmal: sorry, yes still there, https://build.sailfishos.org/package/show/home:nephros:devel:portals/xdg-desktop-portal-amber#07:38
Ketonephros: kicked07:56
nephrosthank you!08:42
RosSigudottirHi, 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 help12:24
attahRosSigudottir: Why do you want/need a SFOS app to just launch another executable?12:25
attah...and does that executable already work?12:26
RosSigudottirbecause launching löve games from the terminal is slow and ugly, and having an icon that you can organize in your app launcher is nicer12:26
RosSigudottiryes most of the games I ported work12:27
attahThat's fair... but i don't see what you are doing here that a .desktop file alone couldn't do12:27
RosSigudottiryou mean you can have similar results as a deployed app with a .desktop file?12:28
RosSigudottirI have no experience with qt and the sdk so I'm not sure how to proceed12:28
attahall i see is launching some executable with some arguments... and .desktop files can definitely do that12:29
RosSigudottirand you have an icon in the app launcher too?12:29
attahthat's what the .desktop file does12:29
RosSigudottirinteresting, I did not know that would work on sailfish, I will definitely try12:29
attahdefines the executable, points out an icon and stuff like that12:29
RosSigudottirok...12:29
attahconsider opting out of sandboxing (also in the .desktop file) at least until you have it working like you want12:31
RosSigudottirare not all apps by default with sandboxing for protection? what is the benefit of having an app out of sandboxing?12:33
attahEverything launched from the GUI is default with sandboxing12:34
attahExcept terminal, and except stuff that have opted out12:34
attahThe benefit is that you can access files placed in otherwise normal places that are not available in the sandbox12:35
RosSigudottirI 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 data12:36
attahexactly; you dodged all of that12:36
RosSigudottirI see12:36
RosSigudottirand regarding game distribution, you think .desktop files with a game is a good way of distribution?12:36
attahNot 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 icon12:38
RosSigudottirwell 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 think12:38
attahWhy not have one .love file and one .desktop file, bundled in an rpm, and then depend on the core game engine?12:39
RosSigudottirsounds good, however I've never created RPM packages, only AppImages with success, I could try that if you think it works12:40
attahPutting files on disk in an orderly/managed way is kind of what they do12:41
RosSigudottirI need to learn how to create the rpm packages or find a template, I will definitely try that12:42
attahThen there is lots of stuff about building that the rpm tooling can do too, but you'd basically just use it as an archive12:42
attahhttps://rpm-packaging-guide.github.io/12:42
attah...or perhaps https://stackoverflow.com/questions/21557015/build-rpm-to-just-install-files12:43
attahand then look at the SDK template rpm spec for things like icon handling12:45
RosSigudottirthanks for the tips, I'm currently testing some desktop files and I will try later to build an rpm12:51
RosSigudottirI'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
RosSigudottirmaybe I did something wrong13:09
RosSigudottirI will probably host it on openrepos so that maybe someone could lead me to make the icon work13:10
attahWell, the rpm needs to specifically install a .desktop file, and in the correct location13:16
attahIcon handling can just be taken from the template app that the SDK generates13:17
RosSigudottirI 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-gamepad13:19
KetoRosSigudottir: 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.desktop14:06
Ketoyou might get more/better help if you shared the sources, as then it would be probably easier to instruct how to do things14:08
RosSigudottiryou are right Keto, I think I got it right now but I will share the sources soon14:12
Ketohave 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
RosSigudottirThe LÖVE build hosted on openrepos works fine, there is also a build for 64 bits but I could not test it14:14
RosSigudottirhere there are my sources: https://ufile.io/isj4h1ci14:14
RosSigudottirKeto no I did not built the engine, it is not engine but a framework, but it was build by other developer14:15
RosSigudottirwhich one is that built on github Keto? maybe it works better, I would like to test it14:17
Ketoit 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 github14:21
RosSigudottirand then that there is, and it works... kind of... there is no device orientation, volume can not be controlled... but it works at least14:22
Ketothe spec file in your source has some issues, but it looks like it might produce somewhat working rpm :)14:29
RosSigudottirI did it14:29
RosSigudottirit works14:29
RosSigudottirI've just installed it on my mobile and it works, I will update the file on openrepos soon14:29
RosSigudottirthanks! I'm really bad at rpm files because I don't use them much on the desktop but It seems this time works14:30
RosSigudottirfeel free to test it, I will eventually add some games in the future with the same method14:31
KetoI'll see if I have some time tomorrow to play around with that engine14:35
RosSigudottirgreat! thanks again for the help and feel free to test it and build any game with it14: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 item19: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 : implicitHeight19:43
direc85[m]And now the header functions correctly again...19:44
nephrospiggz[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
nephrospiggz[m]: because currently my poc portal backend does provide the correct service.20:33
nephrosdoesn't work to show a dialog yet, but it does receive and try to handle the request.20:34
nephrosbtw, you can send/compose email, and set an ambience background via Portal.20:36
nephrosOh, 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
attahnephros: 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
attahBut i suppose you can do whatever when the dbus call comes in20:44
nephrosattah: yes im looking for the cpp part of that. the standard examples for a sf app just immediately launch the qml file.20:48
nephrosI guess its trivial but I'm just not a cpp/qt person :)20:52
attahI struggled a lot with this too20:54
attahBasically it goes like this: if(not present on dbus) launch application as per ExecDbus; Once service appears: call specified dbus methond20:55
attahthe application doesn't even have to react to the call really20:55
attahThis could be empty... but it would confuse the hell out of the user: https://github.com/attah/harbour-seaprint/blob/9498e27f7ffd0bd58ebda1b20b041e53226f8209/src/freedesktopdbusadaptor.cpp#L3020: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_Portal20:59
nephrosattah: perfect, thank you!21:00
nephrospiggz[m]: it should try org.freedesktop.portal.FileChooser.OpenFile dbus call.21:04
nephrosif it does we're good.21:05
piggz[m]is there a package to try?21:05
nephroswell, https://build.sailfishos.org/package/show/home:nephros:devel:portals/xdg-desktop-portal-amber#21:05
nephrosplus https://build.sailfishos.org/package/show/home:nephros:devel:portals/xdg-desktop-portal-11621:06
nephrosnote I subpackage a lot :)21:07
nephrosfrom portal-116 you need just the main one.21:08
nephrosfrom amber you need the main, qml, and sailfishos-config.21:09
piggz[m]does that have the file dialog stuff?21:10
nephrosstart the systemd services, and for testing do:21:10
nephrosgdbus call --session  --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop --metho21:10
nephrosd org.freedesktop.portal.Email.ComposeEmail "0" '{"address": <"test@example.org">,"subject":<"test email">}'21:10
nephrosif email comes up, youre ready.21:10
nephrosthen try:21:11
nephrosgdbus call --session  --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop --metho21:11
nephrosd org.freedesktop.portal.FileChooser.OpenFile "0" "" '{}'21:11
nephrosthat last one does not work, but you should have error outout from amber.21:11
nephrospiggz[m]: it does have the file dialog service for OpenFile.21:12
nephroswhats 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/desktop21:29
nephroshm. both systemd services are running?21:32
nephrosor 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-amber21:33
nephrosor just both on console. (from /usr/libexec)21:33
nephrosand the xdg main one *needs* the env var XDG_CURRENT_DESKTOP=Lipstick21: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
nephrosis there already an amber process running?21:37
piggz[m]ah there is21:37
nephroskill it, and launch with devel-su -p21:37
piggz[m]email worked21:37
nephrosyay!!21:37
nephrosso, if you try OpenFile youshould see errors from amber.21:40
piggz[m]i did, and i didnt :)21:40
nephrosah well my attempts at showing the dialog are about an hour old.21:40
nephrosso what it does is https://github.com/nephros/xdg-desktop-portal-amber/blob/poc/src/filechooser.cpp21:45
nephrosand we want it to launch https://github.com/nephros/xdg-desktop-portal-amber/blob/poc/qml21:45
piggz[m]nephros: success21:46
piggz[m]i needed to add PLASMA_INTEGRATION_USE_PORTAL=121: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
nephrosthe 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-response21:47
nephrosok great, that message means ot is working fine.21:48
nephroscool.21:49
nephrosNow 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/!