I’m making a multi platform application with Electron and I’m trying to make the file association using electron-builder.
I’ve added it to the configuration and that works fine, when I double click on a file, it opens the app, which is expected, but I have no idea how to receive that file on my electron app, I’ve googled, looked issues on the electron-builder repo, but haven’t found anything. The only thing I’ve found so far is that you are suppose to handle that as a custom protocol, and makes sense to me if I want to open the file from a path or url, but I don’t understand how double clicking a file would trigger a custom protocol, does electron use a defined custom protocol when you double click a file associated with your app?
I haven’t found anything on the official docs neither, any help?
Thank you in advance.
myapp: --params
in your terminal and/or exec, is that what you want? – Coulombeprocess.argv
. I just haven't gotten around to test this theory out yet. – Crawleropen-file
(macOS specific) in the NodeJS documentation mentions usingprocess.argv
for windows. – Crawler