StratusFearMe21/cargo-appimage

No such file or directory (APPDIR/usr/bin/bin)

Closed this issue · 3 comments

Hello, trying to run AppImage i get a "no such file or directory".

That's because the apprun helper tries to run APPDIR/usr/bin/bin which does not exist since now (after #21) each binary target for the crate gets copied to its own name (eg mybin to APPDIR/usr/bin/mybin) but apprun has no idea about this.

My quickest hack to get it working is to find the .desktop file at the root of the AppDir and find corresponding name in the bin directory. I can make a PR but maybe you have a better idea how to fix it?

Yeah it's something with src/apprun.rs. A run of the generated AppImage through strace shows that the actual AppRun file is located at /tmp/.mount_pkg.{random characters}/AppRun, but it's trying to run the binary at /tmp/usr/bin/{bin}.

This seems to be from the two .parent() calls, which would make sense because two path segments up from /tmp/.mount_pkg.{random characters}/AppRun is /tmp, and then the app launcher just appends /usr/bin/bin`.

oops, I've reverted the changes to src/apprun.rs for now

This should be fixed as well