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

Set product name, file description copyright on Windows #30

Closed
Ivshti opened this issue May 12, 2015 · 14 comments
Closed

Set product name, file description copyright on Windows #30

Ivshti opened this issue May 12, 2015 · 14 comments

Comments

@Ivshti
Copy link
Contributor

Ivshti commented May 12, 2015

Currently the .exe is branded as "Electron" and that shows up when right-clicking the app in the task bar, the task manager and several other key places.

This should be implemented in electron-packager as soon as the issue is resolved in rcedit and node-rcedit, because they currently cannot change those resources (CompanyName, FileDescription, LegalCopyright, ProductName).

I'll keep you posted on this.

@junosuarez
Copy link
Contributor

@junosuarez
Copy link
Contributor

I found this wrapper to resourcehacker, which is probably the most robust solution for modifying compilied Windows executables https://github.com/felicienfrancois/node-resourcehacker

We may be able to swap out rcedit for this instead.

@Rameshv
Copy link
Contributor

Rameshv commented Jun 10, 2015

@jden +1 for https://github.com/felicienfrancois/node-resourcehacker sounds like a good alternative. is anybody working on that..??

@junosuarez
Copy link
Contributor

@Rameshv after looking at that repo again, it doesn't appear to be a properly licensed redistribution of resourcehacker... indeed, it's not published on npm. We might be able to make a version of that which downloaded the resourcehacker exe via an npm postinstall script from the original distribution point

@Rameshv
Copy link
Contributor

Rameshv commented Jun 11, 2015

@jden yep thats my concern too. I made a quick fix by implementing the npm postinstall hook asyou suggested. You can see the PR here felicienfrancois/node-resourcehacker#3. Waiting for the response from the author on this.

Let me know if this works.

@felicienfrancois
Copy link

rcedit works pretty well and can do that (I use grunt-rcedit on my electron app).
This is not well documented but all thoose strings are "version-strings".

$ rcedit "path-to-exe" --set-version-string "CompanyName" "MyCompany"
$ rcedit "path-to-exe" --set-version-string "FileDescription" "This is an exe"
$ rcedit "path-to-exe" --set-version-string "LegalCopyright" "Copyright whatever"
$ rcedit "path-to-exe" --set-version-string "ProductName" "MyAwesomeProduct"

To get all the possible keys, you can open the exe with a gui program like resourcehacker or winresourcer

PS: I found this on the grunt-rcedit doc

@Rameshv
Copy link
Contributor

Rameshv commented Jun 12, 2015

ah cool, thanks @felicienfrancois . yep rcedit works just fine with the version string info.. thanks for the hint.. it saved my day

@Rameshv
Copy link
Contributor

Rameshv commented Jun 28, 2015

hi @Ivshti , with this #63 merge, you can do this now.. check the readme for more info

@alexwarren
Copy link

We can now change the version info in resources successfully, but this does not affect the name that appears when you right-click the app in the task bar. It still shows up as "Electron" there even if you change all the resource names.

@s-a
Copy link

s-a commented Jul 1, 2015

This is true. Any ideas regarding @alexwarren 's problem? Maybe this one should be a new issue?

@felicienfrancois
Copy link

@alexwarren @s-a
Windows title is handled by electron runtime.

It means that you have to set the title in your code when creating a BrowserWindow
https://github.com/atom/electron/blob/master/docs/api/browser-window.md#new-browserwindowoptions

Same for the icon, you have to set the runtime icon (ie window titlebar and runtime taskbar icon) when creating a BrowserWindow

@s-a
Copy link

s-a commented Jul 2, 2015

@felicienfrancois this is not what we mean. BrowserWindow setup is the same as when I set document.title. We talk about the Windows task bar menu item caption.

image

@felicienfrancois
Copy link

@s-a ok sorry.

It seems the name in the taskbar depends if it have been pined and how:

  • If not pined, it depends on the runtime. Seems to be not consistant across electron versions. Maybe the undocumented "productName" entry of package.json could do the trick.
  • If pined by dragging a shortcut, it keeps the name of the shortcut
  • If pined by dragging the exe, it keeps the name of the exe
  • If pined by right click > Pin when the program was running, it keeps the name at this time.

It may also depends on the OS. Windows 10 has changed things. there is an open issue regarding pining on windows 10 electron/electron#1954

@malept
Copy link
Member

malept commented Sep 9, 2015

Closing since #63 was merged.

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

No branches or pull requests

7 participants