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

File associations not working for AppImage builds #76

Open
tom572 opened this issue Feb 24, 2022 · 1 comment
Open

File associations not working for AppImage builds #76

tom572 opened this issue Feb 24, 2022 · 1 comment
Labels

Comments

@tom572
Copy link

tom572 commented Feb 24, 2022

I found this issue whilst using electron-builder but it looks as though the issue is actually found in here within app-builder. See electron-builder issue for details.

When defining file associations for opening custom file extensions within the application it does not correctly associate them for AppImage builds. This looks to be due to packaging the mime-type into the wrong location in the AppImage for installing the AppImage using AppImageLauncher (the recommended install method). It is unclear why this works, but if the mime-type file is at /usr/share/mime/packages rather than /usr/share/mime, the mime type gets installed correctly. Interestingly, in .deb builds it seems to be added to /usr/share/mime/packages already. This is also the location that the mime-type file exists within the Freecad AppImage where file associations work as intended.

Here is a reproducer using just the electron quick start application and electron builder. On builds other than AppImage, files with extension example get associated correctly. On AppImage builds they do not. If you extract the AppImage using appimagetool and move the mime-type file from /usr/share/mime to /usr/share/mime/packages and repackage the image, you will see the file association work correctly.

It looks as though the issue exists at this line.

Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant