Skip to content
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

Graphical programs in Toolpacks. Roadmap/Plans #28

Closed
xplshn opened this issue Aug 26, 2024 · 47 comments
Closed

Graphical programs in Toolpacks. Roadmap/Plans #28

xplshn opened this issue Aug 26, 2024 · 47 comments

Comments

@xplshn
Copy link
Contributor

xplshn commented Aug 26, 2024

Hi. Have you considered adding graphical programs to Toolpacks by means of using type II (their new Go runtime) AppImages? Or maybe even AppBundles (which are simpler than creating AppImages because you its literally as easy as executing a command to create one)?

Else, the other method would be to compile them statically, but the majority of graphical programs tend to have a lot of dependencies, and working around that will be problematic. Another solution would be to use the Nix package manager (their Musl repo, not the Glibc one) and then create a bundle of the executable using PELF or POX by u-root, AppImages could be considered as well, the problem with AppImages is the dependency on Squashfs.

The generation is not the biggest problem, you can generate a wezterm (graphical, not the mux thing) with a simple one-liner. Same for more complex programs like MPV, and if size is a constrain, there exists pelf_small, and also, I can create a new pelf "edition" that contains zstd embedded within it, or a multi-threaded solution like pigz.
image
doas apk add wezterm && dbin run --transparent pelf --main-bin /usr/bin/wezterm --output-to ./wezterm.AppBundle --add-binary /usr/bin/wezterm-gui --add-metadata /usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png --add-metadata /usr/share/applications/org.wezfurlong.wezterm.desktop ; doas apk del wezterm

To make the generated bundle also work on Glibc when created from a Musl system, it is simply a matter of adding: --add-ld-and-libc /lib/ld-musl-x86_64.so.1 /lib/libc.musl-x86_64.so.1.

I hope you give this idea a try, a new subdirectory named Bundles could be added, and it could be subdivided as Bundles/* and Bundles/Graphical/*. I have no problem providing one-liners that use apk from Alpine and PELF for this purpose :)

just imagine the possibilities, a completely static Linux generated parting from Toybox's mkroot, and then using dbin to add a WM such as sway (with libudev-zero contained within it, even pipewire and such)... Its certainly possible, because I've done it before, but manually generating the bundles myself.

Thanks!

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Samueru-sama

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Samueru-sama

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@Samueru-sama

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

Azathothas added a commit that referenced this issue Sep 6, 2024
@xplshn

This comment was marked as outdated.

Azathothas added a commit that referenced this issue Sep 6, 2024
@Azathothas

This comment was marked as outdated.

Azathothas added a commit that referenced this issue Sep 6, 2024
Azathothas added a commit that referenced this issue Sep 6, 2024
@xplshn

This comment was marked as outdated.

Azathothas added a commit that referenced this issue Sep 6, 2024
Azathothas added a commit that referenced this issue Sep 7, 2024
Azathothas added a commit that referenced this issue Sep 7, 2024
@Azathothas

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Samueru-sama

This comment was marked as outdated.

@Azathothas
Copy link
Owner

Azathothas commented Sep 8, 2024

Currently evaluating runimage, check https://t.me/VHSgroup/22859 for the progress.

AppImages won't be created/supported (maybe a dozen here there) until at least NixOS/nixpkgs#9415 is fixed or https://github.com/nix-community/nixGL is itself added/merged to https://github.com/ralismark/nix-appimage
There's also this (the reason why Steam didn't work): ralismark/nix-appimage#10

AppBundles had similar issues & as confirmed by the author, it will be going through a major rewrite, so currently it's not suited.

The potential solution, whatever it may be, must be portable (don't depend on the host) & cross-libc (musl & glibc).

I recently read this blog: https://wiki.qt.io/QtCS2024_Compile_once._Run_everywhere
https://git.qt.io/cradam/presentations/-/raw/main/2024.09.06/QtCS2024-CompileOnce-RunEverywhere.pdf?ref_type=heads
HN: https://news.ycombinator.com/item?id=41470571
They use cosmopolitan.
However it seems like each and every ported pkg requires some manual patching, so this means tremendous cost in porting anything.
But this would also help us create binaries that are not only cross libc but also cross-platform (BSDs, *Unix, *Windows, & Mac)

@xplshn

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@xplshn

This comment was marked as outdated.

@Azathothas

This comment was marked as outdated.

@Azathothas
Copy link
Owner

@Azathothas Azathothas pinned this issue Sep 25, 2024
Repository owner locked as resolved and limited conversation to collaborators Sep 25, 2024
@Azathothas Azathothas unpinned this issue Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants
@Samueru-sama @Azathothas @xplshn and others