Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to determine app name? #7

Open
matthewbauer opened this issue Feb 3, 2017 · 4 comments
Open

How to determine app name? #7

matthewbauer opened this issue Feb 3, 2017 · 4 comments

Comments

@matthewbauer
Copy link

$APPNAME.png, $APPNAME.desktop are going to be different for each app. How can a tool know where to look?

I suppose you can check for any *.png or *.desktop in the root folder, but that seems like it could cause issues if there are multiples of any of these. Perhaps there needs to be something like "MUST include only ONE .desktop file in the root directory" and use the name of the .desktop to get the .png.

Alternatively, you could require that there be an ELF section called .appimage_name and maybe even .appstream_id for the AppStream stuff. To get even more specific, you could have ELF sections for .icon_path, .desktop_path, and .appstream_path. This may be overusing the ELF sections though, and it might make sense to just put it in a file somewhere.

I know that ideally the AppImage file name would include it, but this is not always guaranteed. For instance, a user makes a copy of an AppImage and the new name is Copy of $APPNAME-$VERSION-$ARCH.AppImage. Without proper checks, this would resolve to Copy of $APPNAME.desktop.

@probonopd
Copy link
Member

Currently the AppImageSpec defines that an AppDir

SHOULD contain exactly one $APPNAME.desktop file in its root directory with $APPNAME being the name of the payload application

It is not a MUST because the .desktop file is not strictly necessary for a valid AppDir as long as the AppRun file knows how to launch the payload app.

@matthewbauer
Copy link
Author

Maybe

MUST contain no more than one $APPNAME.desktop file...

instead?

@probonopd
Copy link
Member

@matthewbauer right now it can contain as many as you like, but the behavior is undefined, an undefined one will be picked.

There might be cases in which having multiple ones are desirable, and a specific one could be picked e.g., depending on how the AppImage was invoked.

Hence I'd like to keep it as it is for now unless there is trouble caused by it.

@probonopd
Copy link
Member

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

No branches or pull requests

2 participants