-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Package name vs. Product name #297
Comments
I'm not clear on what you're asking. Could you please write some explicit steps to reproduce the behavior you're seeing (vs. what you expect)? This is what I did: git clone https://github.com/atom/electron-quick-start && cd electron-quick-start
$EDITOR package.json # Added `"productName": "Electron Quick Start",` (minus the backticks) under the "name" key
npm install
npm install --save-dev electron-packager
$(npm bin)/electron-packager . --all Expected: Actual: In <key>CFBundleDisplayName</key>
<string>Electron Quick Start</string>
<key>CFBundleName</key>
<string>Electron Quick Start</string> |
Yes, These include spaces. I hope that |
One of the things that we could do is strip out any non-word-or-whitespace character from generated filenames. What I'm trying to avoid is a pages-long list of parameters and/or possible |
I think that Anyway, I can already control the name of generated files and folders by So, I wrote a build task script that changes those fields to proper product name. |
I am not opposed to this idea, but it will require a major version bump. |
Ok, I understand that. Thank you for your time 😄 |
At least on OS X, |
To be clear, I was not endorsing forcing Mac |
Someone could file a bug like that today. I agree that it's desirable to permit (not require) a split between human-readable name fields (CFBundleName, CFBundleDisplayName) and filesystem names (CFBundleExecutable). And I'd rather do it with an additional (optional) option than have the packager try to transform my input into a "safe" format. |
And also, a name that includes spaces of an executable file may make problem. |
When would spaces in an executable name be a problem? |
Spaces in a path that is not quoted are recognized as separator according to context that starts the application. |
It's more likely that (By the way, the version of electron-builder I'm using generates installer files for Windows that are named |
Nearly all Mac apps are not meant to be started up from the command line. If you're building one that is, I think it's in your lap to either not use spaces or document for your users how to quote spaces. |
Agreed. |
Sorry, my English is very poor. Anyway, characters that have meaning for file system (e.g. I think that installer files are usually started in Windows explorer by user operation, therefore it may be not problem. @erkyrath, as I said, path in command line is ok, because user will find spaces. Anyway, for the time being, I use task script to fix |
So, don't you think adding the information about electron-builder's document says clearly: I think that the note should be added to document, that says: |
Related: electron-userland/electron-builder#204 I don't see anything wrong in the current electron-packager behaviour. electron-packager packs your app and produce one artefact. App file. If you specify product name, you expect that it will used in all places. As @tmm1 said and I am agree. electron-builder produces nupkg, deb/rpm/etc and other deployment artefacts (in a distributable format). Publish to GitHub releases. In this case we must use only name and it is expected. Also, for example, electron-builder uses name in the icon path on Linux instead of product name to avoid unsafe chars (because icon layout is under the hood and is not visible to end user). So, I don't think we should change current behaviour. Option to change exe name may be added (but I don't like it — yet another option + "Nearly all Mac apps are not meant to be started up from the command line" + it is ok to use |
And what? Do you start MS Office using terminal (cmd)? Or using Spotlight (I mean poor windows alternative Cortana/Start)? How does it affect end user? In any case you should create desktop shortcuts on Windows and do not distribute electron-packager result (instead, you should create Squirrel.windows app file using electron-builder or tool like that). |
Hi @develar, thank you for your advice. I say again, an issue in my case was already solved. I just thought that the information about |
FYI, there's a different bug to strip special path characters from generated filenames: #308 |
Hi. So, is it possible to set the Original filename? Now it's set as |
@malept Oops, missed ¯_(ツ)_/¯. Excuses, all works as required. |
Another reason to strip spaces from your file name:
MakeAppx that is needed to get your app on Windows store doesn't like a filename with spaces. |
This might be useful -- I did finally have success with this. |
Hi, thank you for great tool.
Is there a way to package with a name that is not
productName
?electron-packager-6.0.0 seems to naming with
productName
likeproductName.app
orproductName.exe
.I want to specify a human-readable product name that might be long and it might include space, comma, etc,.
As actual example, "Microsoft Office Word" is specified as product name to
WINWORD.EXE
.I specified
name
option andversion-string.ProductName
option for Windows, thenname.exe
that hasProductName
as file property was created. This result has come up to my expectations.But,
CFBundleDisplayName
andCFBundleName
fields for OS X were setname
. I want to setproductName
to these.The text was updated successfully, but these errors were encountered: