You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: