-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
Feature Request: Support file association properties in forge.config.js #3339
Comments
Im waiting for this too! @KevinHughes Can you explain how to setup file association with a info.plist file? i assume there are more configurations to setup and its not just as easy as only creating the info.plist file with the proper settings. |
@vandervidi – For Info.plist, you can use the extendInfo option to add anything, like this:
|
Windows would be tricky because "regular" win32 applications have to register these in the registry while Microsoft Store applications have to declare them in the appx manifest. |
For Windows if you are using the Wix-Maker you can do the following:
|
Pre-flight checklist
Problem description
Other electron build systems allow the developer to specify custom file extensions for their built apps. For instance, if I wrote an app that was a editor for "Foo" files, I would want to be able to launch a file with the extension
.foo
in the system that would then open the application with that file. As a developer I could then handle the file's contents via theapp
open-file
event handler. In addition,.foo
files should have their own specific icon.Currently providing this information via platform-specific configuration files (such as for Windows, OSX, and Linux) is cumbersome and the method for doing so is not always well documented, making cross-platform applications that much more difficult to create.
Proposed solution
I would suggest a set of forge configuration properties such as:
...where one or more file associations can be specified.
ext
is the name of the file extension to associate with one's Electron applicationname
is the label that the platform presents to users in the user interfaceicon
is the path to the icon for this type of fileRefer to the
fileAssociations
section of https://www.electron.build/configuration/configuration.html for more information. Note that their set of configuration properties allows this feature to be used in OSX, Windows, and Linux applications.Alternatives considered
Currently in order to implement this in OSX, a separate
Info.plist
file must be provided that contains the correct metadata to enable one or more file associations to work. In Windows a separate file containing file association properties must be generated as well. This is cumbersome for developers, who must currently deal with many sets of documentation to implement this feature on multiple platforms.Additional information
No response
The text was updated successfully, but these errors were encountered: