probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.18k stars 407 forks source link

AppDir structure from README is not accepted #603

Open nils-werner opened 5 months ago

nils-werner commented 5 months ago

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".

jcelerier commented 4 months ago

Can confirm this behaviour

probonopd commented 4 months ago

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?

nils-werner commented 3 months ago

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

probonopd commented 3 months ago

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