-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
A crossplatform way to create file associations #409
A crossplatform way to create file associations #409
Comments
We don't use NSIS installer anymore. And Squirrel.Windows is a pathetic parody (sorry, sorry, I am really sorry, but to be honest — it is true) to OS X app. Much better than NSIS and other windows installers, but still just a pathetic parody. So, Squirrel.Windows doesn't support declarative way to create shortcuts or file associations. It is your responsibility in your app code to setup it during first run (or on update — events We are not commercial organization, so, I am not going to fix Squirrel.Windows in my free time. It is relatively easy to fix, though (we DO already our own fork to fix some obvious things, but I want to touch windows code only when it is really needed). I see two ways to fix it:
If you want to help — https://github.com/develar/Squirrel.Windows/tree/build (main branch is |
Thank you for a such detailed explanation. I'll try to handle it in the application itself. |
@sunabozu Your confirmation that file associations are the same for both platforms (example of your config) is very appreciated. |
Following up on this, it would be nice if you could supply an image/icon for the file association in the build config. |
@rwlnd mac or win? |
@develar - I'm sure it can be done on win , not sure about mac as I don't use that actively
|
Windows — we should use http://nsis.sourceforge.net/FileAssoc instead of current implementation to specify icon. |
@rwlnd next version (5.28.0): just create |
Is this supposed to be working in the current build now? I tried the following but didn't seem to work. |
@sfraise Yes. Please specify target OS and targets (nsis — boring or one-click, per-machine or not. Currently tested only for per-machine. Not per current user. |
@develar Thanks, I wasnt setting perMachine: true, all is golden now. Very very very awesome! |
This doesn't seem to work on Macs? |
@sfraise Planned to implemented. Currently, I am very busy :) Cannot promise. Is it critical for you? |
It is kind of, app goes to client Monday. Primary device will be surface pro 3's so the windows installer is the most important but some will be using macs so has to be an option. Is there anything I can do to help out? |
Well, you always can use |
If I have to I can try to manually add the association to the plist but your implementation is a heck of a lot more simple lol. Do you have a rough idea on when you'll have a chance to get to it? |
2 days. |
Perfect, I really appreciate it. |
Hey Develar, we hand this app over to the client in about 7 hours so just wanted to see if you had a chance to do any more with the Mac implementation? I'm sure we'll be pushing out a revision soon anyway but just wanted to see if we might still be able to sneak this into this initial release. |
@sfraise Will be pushed in 10-20 minutes after test. And published after push in 10 minutes. |
If Linux is required for you — feel free to file new issue about it. Currently, no short-term plans to add file associations for Linux and new issue about it will be an indicator of interest. In the original description stated only "allow you to create file association on OS X and Windows separately". Custom icon files for macOS is not yet copied correctly — will be fixed in the next patch release (please note — defaults to application icon in any case). |
Sweet, you rock @develar! |
I'm getting an error trying to build on windows now when setting perMachine: true in the package.json file, any ideas? |
No, I have oneClick: true set |
@sfraise Please try 6.3.0 and if you still get error, please file new issue with error message |
no joy |
Fyi I'm using the szwacz electron boilerplate but wouldn't think that should matter? Here's my full package.json...
|
If I put quotes around the true value (ie. "perMachine": "true") the build doesn't fail, haven't verified that the file association is working that way though yet. We shouldn't have to wrap a true/false value in quotes here correct? |
Yes, must be not wrapped. Please file new issue and attach build log. Without error message I cannot help you. |
@sfraise Please create separate issue — please don't mix.
Please create new separate issue and attach sample project, I will test it. |
See new issue #715 |
There are the
extend-info
option andinstaller.nsi.tpl
template that allow you to create file association on OS X and Windows separately, but from the application's perspective it's the same thing. Can we have a metadata field inpackage.json
for describing file extensions we are interested in? It might look like this:Then it could be translated to specific entries in
Info.plist
andinstaller.nsi.tpl
respectively. It would be very handy.The text was updated successfully, but these errors were encountered: