Phantop / appdwarf

Tool to compress and run programs using dwarfs
https://phantop.github.io/appdwarf/
GNU General Public License v3.0
26 stars 0 forks source link

After use appdwarf #1

Closed Drsheppard01 closed 1 year ago

Drsheppard01 commented 2 years ago

/home//Zettlr-2.3.0-x86_64.sh /home//Zettlr-2.3.0-x86_64.sh: row 6: /tmp/dwarf_Zettlr-2.3.0-x86_64.sh1a3b6/AppRun: No such file or directory

OS: Fedora 36 Package: Zettlr Where is found: local in /home/*****/ Running the script: by user (no root)

fwn0 commented 2 years ago

I have the same problems on LMDE 5,4, PCLinux, Deepin 20.7. - /tmp/dwarf_wine......./AppRun: No such file or directory Dwarfs is significantly faster and runs smooth on Archlinux and derivates (Artix, Xero, Endeavour, Salient), Void and Debian 11, Devuan, Kubuntu, MXLinux, Nitrux. Dwarfs is also much smaller archive - in my case 131 mbs dwarfs vs 222 mbs appimage (wine 6.01).

In my created appdwarf from appimage is row 6 critical; I did try your wine package from repository and it is also not working: error in 4 and 6 rows.

  1. args="-o offset=auto -o tidy_strategy=swap -o workers=4"
  2. [ ! -d "$APPDIR" ] && mkdir "$APPDIR" && dwarfs $args "$0" "$APPDIR" 2>/dev/null
  3. "$APPDIR/AppRun" "$@"
Phantop commented 2 years ago

Oh hey, sorry I didn't respond to these earlier, I outright didn't notice these issues had been opened.

I mainly test appdwarf on my own system, which has sh symlinked to bash so strange little errors can pop up quite a bit. I have updated the script some in the last few months, do you still have these issues?

fwn0 commented 1 year ago

Unfortunately yes. I did create a new appdwarf for wine, but i have exactly the same issues like before (env WINEARCH=win32 WINEPREFIX=$(pwd)/wine/prefix wine/wine foobar2000.exe wine/wine: 7: /tmp/dwarf__home_mint_AppImages_fb2k-georgia-reborn_wine_wine/AppRun: not found ). Or other example: /home/mint/Develop/appdwarf-main/Qtexttospeech-x86_64.sh' /home/mint/Develop/appdwarf-main/Qtexttospeech-x86_64.sh: 7: /tmp/dwarf__home_mint_Develop_appdwarf-main_Qtexttospeech-x86_64.sh/AppRun: not found

I can't see any new created folder (dir) in tmp after running the command. It's a really mysterious issue, because LMDE and Deepin are custom builds of Bullseye and I don't have any issues with Debian or Devuan.

Phantop commented 1 year ago

This looks to me like a mounting issue. What version of dwarfs are you using?

I wonder if perhaps this is FUSE-related, somehow? If I recall correctly, on systems without fuse3, the dwarfs binary is instead called dwarfs2. Maybe that's what's going on?

fwn0 commented 1 year ago

I am using the dwarfs binaries (mkdwarfs, dwarfs, dwarfscheck a dwarfsextract - 0.62, 0.7RC) in path, where is my latest appdwarf. I didn't know nothing about dwarfs2, mayby you are right; I'll check, if I have fuse3 installed on system, or if it works when I put dwarfs2 in path (export PATH:$PATH=$(pwd)).

Phantop commented 1 year ago

I just loaded up an LMDE 5 virtual machine to test it out myself (made an image with appdwarf Lagrange -l1 and ran it). No issues, as far as I can tell.

Note that the dwarfs utility, which is used for mounting and is a requirement for running appdwarf images, installs to sbin rather than bin. Make sure your files are where they should be and that PATH is correct.

fwn0 commented 1 year ago

Big thanks for your tips and knowledge about fantastic dwarfs :). I don't know why but your appdwarf files are now running in my LMDE. I didn't have fuse3 installed in LMDE (I think in other distros fuse3 is installed as default) and after I got the dwarfs2 in PATH and I rebuild new appdwarf files - all is running perfect. I also tried -l9 compression level and have the smallest file again - from 222 MB appimage, 131 MB with default appdwarf, to 110 MB with -l9. It's only 3 MB bigger than the original compressed dwarfs file.

Can you explain me exactly how do I make an executable folder with foobar2000, prefix and wine using your zzexe? i didn't understand how appdwarf works with your prefix. I am using makeself for now, which is very useful for some scripts like for example, embedded yad without deps ;).

Phantop commented 1 year ago

Can you explain me exactly how do I make an executable folder with foobar2000, prefix and wine using your zzexe? i didn't understand how appdwarf works with your prefix. I am using makeself for now, which is very useful for some scripts like for example, embedded yad without deps ;).

So, zzexe is designed for single files. I used Wine as an example because I often use it with single executable Windows programs. Something like foobar2000 needs to be in a full appdwarf image.

You could probably pre-make a prefix and throw it in the AppDir if you want to bundle it. Admittedly I haven't tried this. I have a script for making Wine alone as an appdwarf, and I would personally make foobar2000 its own, separate appdwarf image that just runs the executable using Wine. You can generate my template AppRun files using appdwarf -a <file>.

fwn0 commented 1 year ago

So, I did check now, you got a new appdwarf just now, with new options. Do you know some new "skills" above level 9 with lz4 ? I tried appdwarf with -B26 -S26, but I got message about double entry in compression option with -l9.

Yes, with foobar2000 are much scenarios possible. I am trying to create one portable, independent file of foobar2000 (no libs32 on system) with prefix (incl. drivers, libs), wine and the customized foobar2000 - this theme (https://github.com/TT-ReBORN/Georgia-ReBORN), without install-script. I use my own newbie scripts (I am not programer) with dwarfsextract on SSD/HDD or in temp (tmpfs), with different options (running, installation) for fb2k, for prefix and for wine. It's very funny to play for example my full dwarfs fb2k package 200 MB on Nemesis or Porteus (portable Linux 370 MB big) and in same time have running fb2k in Qemu.

Phantop commented 1 year ago

I tried to run mp3tag on an appdwarf of Wine with an included prefix. Did not work due to the filesystem being read only. It might be different with foobar2000 but, as I said, you can generate a Wine appdwarf, extract it, edit the AppRun to make it run foobar2000 and set the WINEPREFIX variable, and, of course, generate a prefix within the AppDir before recompressing and it might work.

Going to close this now, @fwn0 if you want to continue this I suggest making a new discussion. @Drsheppard01, I'm going to assume that the issue is due to misinstallation/having an old version. Feel free to reopen this if you still have issues.

Phantop commented 1 year ago

I did a little work on the prefix thing and found a solution using fuse-overlayfs that should work for any programs that need write access to the WINEPREFIX. Just make a prefix in AppDir/prefix and use this AppRun:

#!/bin/sh
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"

mkdir -p "$APPDIR.prefix" ~/.wine/work
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
export WINEPREFIX="$APPDIR.prefix"

"$APPDIR/bin/$(basename "$ARGV0")" "$@"

fusermount -quz "$APPDIR.prefix"
rmdir "$APPDIR.prefix"

EDIT: I added a -p option to the mkwine script that automatically does this