-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix and improve AppImage #324
fix and improve AppImage #324
Conversation
I'm not a huge fan of the big size increase, it goes from 80MB -> 140MB which is a big jump. I've also tried it for a little bit and it has a few issues.
From a quick look, it seems to be missing some vulkan extensions, on a working AppImage you see the following:
while on a non-working AppImage like the one you have, you can see:
I also have another question, considering you're shipping |
The current AppImage does not launch on my system nor on the ones of the users that reported the issue.
mmmm, that's odd I guess the libraries needed for this are only dlopened when such function is used.
I think I only bundled opengl, wasn't aware this used vulkan as well 👀
Yes. Actually that's the reason because I switched to building on 24.04, because otherwise there is a bug on old mesa that prevents the proprietary nvidia driver from being used. sharun still adds the host glvd to It also does a similar thing for vulkan just in case. |
That'd odd, have you tried debugging why it doesn't launch? Maybe try setting
That's good |
Alright it is very likely that this is because the qt tls plugin wasn't added at all, likely indicating that the app isn't running in the CI, hence none of the dlopened libs are being picked up. If this still fails I will start doing proper debugging with strace. EDIT: Updated artifact link, also putting it here |
I'd rather have you look into why the existing AppImage doesn't work and attempt to fix that instead of switching to an entirely different system without a good reason, because I'm currently unconvinced that the new system is better than the existing one, and not knowing why the existing one doesn't work isn't very helpful either. |
The existing appimage isn't great, relying on the host libraries is just not reliable you will often see issues of the AppImage not working on certain users. that's the good reason.
Because I forgot to add vulkan and the tls plugin? Note I'm assuming that fixed those issues, if it didn't I'm very sorry.
I don't know either, I really don't bother with AppImages that don't bundle all the dependencies because it is just not worth the effort to troubleshoot something that it the end won't still work for all linux users. Even if the current issue is fixed, that appimage won't still work on systems with a glibc older than that of 20.04, it won't also work on systems without glibc at all, it is just not worth the effort. |
That's a fair point, sure.
I can sadly confirm that both issues remain:
And the vulkan video plugin has the same issue, it seems like not all the required instance extensions are being exposed. |
Alright I'm very sorry, gotta properly setup tests in that case. EDIT: yeah... |
Just in case @Rosalie241 go with the rest of your day and ignore everything I do here until I notify everything is ready, I will make sure everything is fixed. I should get all of this sorted out in a few days at most (gotta go just now lol) and I also have something in mind that should reduce the size of the AppImage by about 20 MiB. |
The app image works for me and I don't see any issues, but I don't really have many complicated use cases. @Rosalie241, if some dependency of an app image is not built in and that dependency changes in the next release or is missing in a future state, it's impossible for the app image to work. So the more dependencies are built in, the less chances there are for the appimage to fail in the future or work in an unplanned environment, but of course more built in libraries require more size of the image. So size can't be seen as a problem, but as the solution to the problem, since the main objective of an appimage is precisely to run without attachment to a specific environment. Having an appimage that works only on the system where it was generated or on systems almost identical to it, is practically the same as compiling for a specific environment and therefore the essence of what it means to have an appimage is lost. I would like that 20 years later, when nothing resembles what we have today, the appimage that was created today still works. That is the true utility of having a sufficiently robust appimage. But of course, the appimage should be complete and functional today so that it will be functional in the future. Maybe what you should consider is whether you are going to generate an appimage in all releases or if, on the contrary, you are going to generate it only when there is a really noticeable change in your app. Is preferable to me 1 appimage per year that works for 20 years that 1 appimage per day that works for a week or only works on the distro where it was created. By the way, I really liked your emulator. Especially the feature of being able to decide whether to let keyboard shortcuts repeat or not is something all emulators should have. |
Turns out vulkan drivers were not installed at all in the CI 🤦 Now I'm able to launch a title with vulkan. I can also go into netplay without having an error, although I don't see any session to join to, not sure if I need to configure this. Updated artifact link, size is now 155 MiB which is very close to the dolphin emu appimage, after all vulkan, opengl and all of qt are bundle in both. I can reduce the final size to 140 MiB by using a different appimage runtime that uses dwarfs instead of squashfs, however this has the downside that it breaks everything that interacts with squash in appimages, most notably the AppImage thumbnailers that some users may want: Some might suggest to build on alpine linux, but this will stop people from using the proprietary nvidia driver at all, since this is dlopened on the host means what we ship in the AppImage has to have glibc yes or yes. This means the only other method to reduce size is to build some dependencies statically, but I really don't know how to do that. I know it can reduce the size a lot, because I make this AppImage of mpv (bundles everything) and it used to be 80 MIB before I switched to their build script that automatically builds it linking ffmpeg statically, that reduced its size from 80 MiB to 22 MiB. So to resume so far this PR:
|
Can confirm that it launches now. 👍 |
I can confirm the issues have been fixed, thank you.
That's rather big but at this point I'll just live with it, sadly RMG is already quite large due to Qt6 and shipping vosk-api.
I think having a 'standard' runtime makes more sense.
I don't even know if RMG will build on alphine linux, though I'm a little curious about the size for it now, might experiment with that in the future but for now glibc is fine also due to the nvidia support.
I'd rather not ship this in the AppImage and have RMG handle it on it's own, RMG supports qt stylesheets by itself but it's an undocumented feature.
RMG handles updates for AppImage by itself, so the zsync stuff is unrequired.
I can confirm this works fine on my system by setting |
It usually doesn't reduce the size more than 20%, the only thing that can reduce at lot is static linking some dependencies. For example this is a Qt5 app that bundles everything, the reason it is that small is because the developers released a portable build that linked Qt5 statically, so I'm pretty much only adding glibc and the dynamic linker to the appimage to make it work on any linux system. Of course it doesn't contain stuff like vulkan and opengl, but even with that the final size would be under 100 MiB.
So I remove I would not really want to remove this other method that I added to load stylesheets outside the application, basically it works by placing the stylesheet file next to the appimage with the name of the appimage + EDIT
It is still the official method for appimages to update, and allows the user to update appimages without having to open the application, I don't think that's a good idea to remove that. |
Well alright, you can leave it in I suppose, I'll start reviewing your code changes now though. |
Thank you for the PR ❤️ |
Thanks so much, for this @Rosalie241 and @Samueru-sama. We finally have a funtional portable version of a good N64 emulator!! Have a good day. |
I have not tested beyond launching the AppImage on alpine linux, which is usually a good enough first test.
@lestcape and @Dangonizer artifact link
Let me know if there are any issues.
edit: Now the AppImage follows the system theme if you use qt6ct for that.
It also can load separate stylesheet files by either placing and renaming the file with the name of the appimage +
.stylesheet
or directly setting the env variable to the location of the file.edit2: closes pkgforge-dev/Anylinux-AppImages#3 #323