linuxdeployqt icon indicating copy to clipboard operation
linuxdeployqt copied to clipboard

AppDir structure from README is not accepted

Open nils-werner opened this issue 1 year ago • 4 comments

I have an AppDir stucture as per the README:

appdir/
└── usr
    ├── bin
    │   └── my_app
    └── share
        ├── applications
        │   └── my_app.desktop
        └── icons
            └── hicolor
                └── 128x128
                    └── apps
                        └── my_app.png

If I now run linuxdeployqt as per the README

./linuxdeployqt-x86_64.AppImage \
    appdir/usr/share/applications/my_app.desktop \
    -unsupported-allow-new-glibc \
    -appimage \
    -verbose=3

the command fails, but no useful output is generated:

linuxdeployqt  (commit 2b38449), build 62 built on 2023-12-27 21:00:01 UTC
WARNING: Not checking glibc on the host system.
         The resulting AppDir or AppImage may not run on older systems.
         This mode is unsupported and discouraged.
         For more information, please see
         https://github.com/probonopd/linuxdeployqt/issues/340
Desktop file as first argument: "appdir/usr/share/applications/my_app.desktop"
desktopExecEntry: "my_app"
desktopIconEntry: "my_app"
Found binary from desktop file: "/home/nils/Arbeit/my_app-qt/builddir/appdir/usr/bin/my_app"
Log: "/tmp/.mount_linuxdmK7qed/usr/bin:/usr/lib/mxe/usr/bin:/home/nils/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin"
FHS-like mode with PREFIX, fhsPrefix: "/home/nils/Arbeit/my_app-qt/builddir/appdir/usr"
app-binary: "/home/nils/Arbeit/my_app-qt/builddir/appdir/usr/bin/my_app"
appDirPath: "/home/nils/Arbeit/my_app-qt/builddir/appdir"
relativeBinPath: "usr/bin/my_app"
Copied "appdir/usr/share/applications/my_app.desktop" to "/home/nils/Arbeit/my_app-qt/builddir/appdir/my_app.desktop"
Found icons from desktop file: ("/home/nils/Arbeit/my_app-qt/builddir/appdir/usr/share/icons/hicolor/128x128/apps/my_app.png")

If instead I pass in the binary, not the .desktop file

./linuxdeployqt-x86_64.AppImage \
    appdir/usr/bin/my_app \
    -unsupported-allow-new-glibc \
    -appimage \
    -verbose=3

all libraries and translations seem to be linked and copied in place, but the command eventually fails with

appimagetool, continuous build (commit 8bbf694), build <local dev build> built on 2020-12-31 11:48:33 UTC
NOTE: Using the output of 'git rev-parse --short HEAD' as the version:
      f5c971d
      Please set the $VERSION environment variable if this is not intended
Desktop file not found, aborting
Log: ret 256
Log: WEXITSTATUS(ret) 1
Log: result: 1

If I now change my appdir to

appdir/
├── my_app
├── my_app.desktop
└── my_app.png

and run

../linuxdeployqt-x86_64.AppImage \
    appdir/my_app \
    -unsupported-allow-new-glibc \
    -appimage \
    -verbose=3

the command runs to completion and an AppImage is created.

I would expect that linuxdeployqt works with the full appdir structure that's mentioned in the README? Especially because that structure plays much more nicely with "normal packaging layouts".

nils-werner avatar Mar 27 '24 14:03 nils-werner

Can confirm this behaviour

jcelerier avatar Apr 18 '24 02:04 jcelerier

Hi, I am no longer actively working on this codebase in favor of https://github.com/probonopd/go-appimage.

Maybe you'd like to test whether https://github.com/probonopd/go-appimage/tree/master/src/appimagetool works better for you?

probonopd avatar Apr 27 '24 06:04 probonopd

Judging from the README that project seems more like an undocumented playground, no?

nils-werner avatar May 17 '24 06:05 nils-werner

The README was not updated in a long time; did that now. Thanks!

probonopd avatar May 19 '24 18:05 probonopd