hanzala123 / arch2appimage

This is a python script that downloads Arch Linux packages (Official/Chaotic AUR) and converts to an AppImage executable
GNU General Public License v3.0
339 stars 11 forks source link

Created appimage contains links to installed software. #18

Open ben2talk opened 1 year ago

ben2talk commented 1 year ago

I just replicated an error shared with another Manjaro user.

  1. python3 arch2appimage > Enter package name 'ocenaudio-bin'
  2. Wait for download. Select icon.
  3. No extra packages required (2nd run selected ocenaudio-bin)
  4. Wait... for icons, jack, libpulse, qt5-base, ocenaudio-bin to download.
  5. Get latest lubuinionpreload.so
  6. Build the image
  7. Get the latest tool
  8. Attempt to launch - nothing happens.
  9. Terminal in 'out' directory run ./appimage

Error: /tmp/.mount_ocenau0DcSKA/AppRun: line 14: /usr/bin/ocenaudio: No such file or directory

hanzala123 commented 1 year ago

this error comes from the .desktop file. In the Exec section of the desktop file you will notice it uses full path. To fix this simply remove the /usr/bin/ from the .desktop file Exec section. Then re build the AppImage. This is why the script asks the user to check AppDir before building the AppImage. You can either go trough the whole process again and make the change in the desktop file when the script asks you to check the AppDir and then build the AppImage. Or if you already have the AppDir ready you can just make the change and run the appimagetool manually.

Edit: Upon further looking i realized that the ocenaudio file in AppDir/usr/bin is a broken link. You will have to fix this link so that its a link to the correct file which should be AppDir/opt/ocenaudio/bin/ocenaudio. This also needs to be done before building the AppImage.

ben2talk commented 1 year ago

Thank you - you need to edit 'ocean' to 'ocen' in your reply ;)

So this will work to build an appimage on MY computer, but I can't share that appimage with another because the path needs to be absolute - it won't launch without the original arch2appimage folder structure containing the linked binary right?

Please forgive my ignorance.

hanzala123 commented 1 year ago

The path shouldn't be an issue. The appimagetool will take care of that. So it should work on other systems as well.

Flashwalker commented 1 year ago

Actually, using package peazip-qt5 building as an example, you can find that .desktop file doesn't contain absolute path for Exec. But regardless of this, the resulting binary links refers to system binaries and folders. While it should be e.g.:

cd AppDir/usr/lib/peazip/res share -> ../../../share/peazip instead of share -> /usr/share/peazip

cd AppDir/usr/bin peazip -> ../lib/peazip/peazip instead of peazip -> /usr/lib/peazip/peazip

cd AppDir/usr/bin pea -> ../lib/peazip/pea instead of pea -> /usr/lib/peazip/pea

cd AppDir/usr/lib/peazip/res/bin/7z 7z -> ../../../../../bin/7z instead of 7z -> /usr/bin/7z

And so on.

I tried to run appimage and it was fail until i manualy relinked all links to relative paths.