Skip to content

fix(appimage): launch the CMake binary instead of the pubspec name - #363

Open
nogringo wants to merge 1 commit into
fastforgedev:mainfrom
nogringo:fix/appimage-binary-name
Open

nogringo wants to merge 1 commit into
fastforgedev:mainfrom
nogringo:fix/appimage-binary-name

Conversation

@nogringo

Copy link
Copy Markdown

When BINARY_NAME in linux/CMakeLists.txt differs from the pubspec name, the AppImage is built without error but fails at launch:

./myapp-1.0.0-linux.AppImage
/tmp/.mount_myapp-XXXX/AppRun: line 5: /tmp/.mount_myapp-XXXX/my_app: No such file or directory

AppRun runs exec ./<pubspec name> and the desktop entry Exec lines use the same name, but Flutter builds the executable as BINARY_NAME.

This is the AppImage counterpart of #312 (fixed for RPM in #313). The deb, rpm and pacman packagers already use the CMake binary name; AppImage was the remaining one.

The AppRun script and the desktop entry Exec lines used the pubspec
name, while Flutter builds the executable under BINARY_NAME from
linux/CMakeLists.txt. When the two differ, the AppImage fails at launch
with "No such file or directory".

Dart: MakeAppImageConfig now extends MakeLinuxPackageConfig, like the
deb and rpm configs. The metainfo file keeps the pubspec name so it
still matches the .desktop file.

Rust: use app_binary_name, which the CLI already resolves from CMake.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant