resources icon indicating copy to clipboard operation
resources copied to clipboard

Appimage?

Open Thatoo opened this issue 2 years ago • 14 comments

Would it be possible to release an appimage on gitlab of your software for those who don't have/want to use flatpack or depend (be traced) on flathub?

Thatoo avatar Oct 14 '23 15:10 Thatoo

Hi, I'm sorry but I'm not planning to do and maintain an AppImage release any time soon, though if someone else wants to do that, feel free.

nokyan avatar Oct 15 '23 16:10 nokyan

I'm in favour of AppImage too.

cs-mshah avatar Oct 15 '23 18:10 cs-mshah

+1 Installing flatpak + all the shares resources is many hunders MB just to allow a small hundreds KB program to run !? Feels like I'm running under MS Windows ;)

Adesin-fr avatar Oct 16 '23 13:10 Adesin-fr

@Adesin-fr
But Runtimes are often shared among apps. And org.gnome.Platform is one of the most popular, so there is a very high chance, that you already have an app which uses it.

@nokyan
Would you accept a Pull Request which automatically builds an AppImage and uploads it after creating GitHub release? I could implement this one.

pktiuk avatar Oct 16 '23 19:10 pktiuk

Being able to get resources from the AUR with a pkgbuild would be great for me! What do you think of that? :)

Lukas-Heiligenbrunner avatar Oct 17 '23 07:10 Lukas-Heiligenbrunner

@Adesin-fr But Runtimes are often shared among apps. And org.gnome.Platform is one of the most popular, so there is a very high chance, that you already have an app which uses it.

Sure, But I don't have any package installed with flatpak : I had to install flatpak just to run Resources !

Adesin-fr avatar Oct 17 '23 07:10 Adesin-fr

@nokyan Would you accept a Pull Request which automatically builds an AppImage and uploads it after creating GitHub release? I could implement this one.

Sure

nokyan avatar Oct 17 '23 10:10 nokyan

Do all of these dependencies have to be so new?

dependency('gtk4', version: '>= 4.8.0')
dependency('libadwaita-1', version: '>= 1.4.0')

For example Ubuntu 22.04 has gtk4 4.6.2 in repos and building AppImage on Ubuntu runner would require compiling entire gtk4.

pktiuk avatar Oct 20 '23 10:10 pktiuk

Do all of these dependencies have to be so new?

dependency('gtk4', version: '>= 4.8.0')
dependency('libadwaita-1', version: '>= 1.4.0')

For example Ubuntu 22.04 has gtk4 4.6.2 in repos and building AppImage on Ubuntu runner would require compiling entire gtk4.

Yes, they do. Resources requires GtkInscription which is a gtk ≥ 4.8 feature and AdwOverlaySplitView which is a libadwaita ≥1.4 feature.

nokyan avatar Oct 20 '23 12:10 nokyan

@pktiuk any progress? Having this as an Appimage would be awesome!

xoir avatar Oct 27 '23 17:10 xoir

For now not. AppImage should be compiled on Ubuntu 20.04 (to ensure that glib is not too new), and there are a lot of packages in repositories which are too old for resources app, so they have to be compiled from source to meet dependencies. This is a daunting task, so I want to try to build appimage inside of flatpak runtime. I haven't tried this yet.

pktiuk avatar Oct 27 '23 23:10 pktiuk

How could I open a required flatpak runtime and launch some commands inside of it?
I am looking for command which would work like docker run --volume /project_path:/project_path -it some_docker_image bash.

I tried to use Flatpak for vscode , but command Open a build terminal mounted project directory in read-only mode

pawel@pop-os:~/PROJEKTY/resources$ touch p
touch: cannot touch 'p': Read-only file system

pktiuk avatar Oct 29 '23 21:10 pktiuk

How could I open a required flatpak runtime and launch some commands inside of it? I am looking for command which would work like docker run --volume /project_path:/project_path -it some_docker_image bash.

I tried to use Flatpak for vscode , but command Open a build terminal mounted project directory in read-only mode

pawel@pop-os:~/PROJEKTY/resources$ touch p
touch: cannot touch 'p': Read-only file system

If you only want to access the runtime itself, try flatpak run --command="bash" org.gnome.Sdk. If you've built Resources locally as a flatpak and you want to access its specific runtime, that'd be flatpak-builder --run .flatpak/repo build-aux/net.nokyan.Resources.Devel.json "bash", with .flatpak/repo being the folder in which your local build resides in.

nokyan avatar Oct 31 '23 12:10 nokyan

Your answer helped me a lot.

I have a basic instruction which could be used as a base for building AppImage

flatpak-builder --socket=fuse --run .flatpak/repo build-aux/net.nokyan.Resources.Devel.json "bash"

mkdir /tmp/AppDir
meson . build --prefix=/tmp/AppDir
ninja -C build install

wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage

./linuxdeploy-x86_64.AppImage --appdir /tmp/AppDir
./appimagetool-x86_64.AppImage AppDir/

But there is a problem with running AppImages inside of Flatpak

dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option.

Extracting it not helped

 ./squashfs-root/usr/bin/linuxdeploy --appdir /tmp/AppDir
linuxdeploy version 1-alpha (git commit ID 6a583d5), GitHub actions build 196 built on 2023-11-01 01:03:40 UTC
terminate called after throwing an instance of 'std::logic_error'
  what():  subprocess failed (exit code 1)
Aborted (core dumped)

pktiuk avatar Nov 02 '23 21:11 pktiuk