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

Must be error if file association is set, but perMachine not #772

Closed
virror opened this issue Sep 22, 2016 · 17 comments · May be fixed by qcif/data-curator#563
Closed

Must be error if file association is set, but perMachine not #772

virror opened this issue Sep 22, 2016 · 17 comments · May be fixed by qcif/data-curator#563

Comments

@virror
Copy link

virror commented Sep 22, 2016

  • Version: 7.3.0
  • Target: win32

After updating to latest electron-builder, file association including icon stopped working. Worked perfectly before updating, i think last version was the last 6.x, but cant remember exactly.
Using NSIS
"fileAssociations": {
"ext": ".aepwx",
"name": "myName",
"icon": "build/icon.ico"
}

@develar
Copy link
Member

develar commented Sep 23, 2016

Works for me. Nothing changed. Please provide sample project or set debug env DEBUG=electron-builder and attach logs.

"icon": "build/icon.ico"

Do not specify app icon — it is default value in any case.

@virror
Copy link
Author

virror commented Sep 23, 2016

Sadly i cant send you the project, but im willing to help in other ways. We have tested on several machines now and non of them works. How do you set the debug variable?

@develar
Copy link
Member

develar commented Sep 23, 2016

We have tested on several machines now and non of them works

Please try to not set icon at all. Since it is equal to app icon, no need to set it explicitly.

How do you set the debug variable?

It is an environment variable. Set DEBUG=electron-builder

@develar
Copy link
Member

develar commented Sep 23, 2016

non of them works.

No icon? Could you please attach screenshot of file in the File Explorer?

Or your app is not opened on file double click?

@virror
Copy link
Author

virror commented Sep 23, 2016

Yes, app does not open on double click and icon is just a white standard "no specific icon" icon.
When i check properties of the file it says that no program is associated to this file type.
I will try with the debug mode and see if i can get some data.
Were do the log file end up?

@develar
Copy link
Member

develar commented Sep 23, 2016

Do you use perMachine: true?

@virror
Copy link
Author

virror commented Sep 23, 2016

No.
"nsis": {
"oneClick": true,
"perMachine": false,
"installerHeaderIcon": "build/icon.ico"
},

@develar
Copy link
Member

develar commented Sep 23, 2016

Because Windows is *** Windows, per-user installed program cannot register file associations.

Yes — it is not documented. Yes — we must throw error if file associations set, but perMachine (or boring installer) not.

@develar develar changed the title File association is not working anymore after update Must be error if file association is set, but perMachine not Sep 23, 2016
@develar develar changed the title Must be error if file association is set, but perMachine not Must be error if file association is set, but perMachine not Sep 23, 2016
@virror
Copy link
Author

virror commented Sep 23, 2016

But you just said that "per-user installed program cannot register file associations", doesn't that mean that you should set error if file associations set and perMachine is TRUE? For my case its set to false?

@develar
Copy link
Member

develar commented Sep 23, 2016

doesn't that mean that you should set error if file associations set and perMachine is TRUE?

perMachine: true means that app will be installed for all users. Ugly *** UAC in action — user cannot install app only per-user — admin rights is required to install.

For my case its set to false?

false is the default value.

@virror
Copy link
Author

virror commented Sep 23, 2016

Ahh, i thought perMachine true was that it should install for one user only, i will try change this then : )

@virror
Copy link
Author

virror commented Sep 23, 2016

Ok, now the association works : )
No icon though.

@develar
Copy link
Member

develar commented Sep 23, 2016

No icon though.

Did you remove unnecessary "icon": "build/icon.ico"?

@virror
Copy link
Author

virror commented Sep 23, 2016

No, but i think its just some cache issue, cause when i try to open a file inside of the program, the icon shows. Thanx for the help!

@jakubzitny
Copy link

I can see that it throws an error now, if I have fileAssociations set to true and perMachine to false. Can we set it for macOS only, so it does not fail when perMachine is false, but we still want it on Mac?

@develar
Copy link
Member

develar commented Jan 26, 2017

@jakubzitny Just move fileAssociations to mac to apply it only for macOS.

@jakubzitny
Copy link

Thanks, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants