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

Linux: Be more restrictive with executable name #806

Closed
lbssousa opened this issue Oct 7, 2016 · 8 comments · May be fixed by qcif/data-curator#563
Closed

Linux: Be more restrictive with executable name #806

lbssousa opened this issue Oct 7, 2016 · 8 comments · May be fixed by qcif/data-curator#563

Comments

@lbssousa
Copy link

lbssousa commented Oct 7, 2016

  • Version: 7.11.3
  • Target: Linux (any)

Currently electron-builder uses productName info for naming app's main executable, which may be painful for Linux binaries being run from command terminal, if that info contains uppercase letters, spaces, etc.

I would like to suggest a new option executableName for Linux binaries, with the following restrictions:

  • should not contain spaces
  • should not contain uppercase letters
  • should not contain any special characters which have some meaning for the shell (e.g.: &).

If no executableName is provided in package.json, electron-builder could calculate it from name or productName options (convert to lowercase, strip spaces, replace special characters with - or _, etc.).

@develar
Copy link
Member

develar commented Nov 3, 2016

executable name will be not changed and productName will be still used — please see electron/packager#297 (comment)

executableName will be added.
wireapp/wire-desktop#125

@develar
Copy link
Member

develar commented Nov 3, 2016

We already use name for AppImage. To simplify.... ok, name will be used by default on Linux instead of productName.

if it is not important for you — name or productName doesn't matter for you.

If it is important for you — you want name.

Should electron-builder force you to explicitly set executableName? Should electron-builder bother you about it? No. No.

So, name will be used not only for AppImage, but for all linux targets.

@lbssousa
Copy link
Author

lbssousa commented Nov 3, 2016

Using name by default for Linux executable name is reasonable, but it's not clear to me in your documentation which character set is allowed for name.

I would still suggest you to e.g. convert name to lowercase for naming Linux executable, if no explicit executableName option is given.

@develar
Copy link
Member

develar commented Nov 3, 2016

but it's not clear to me in your documentation which character set is allowed for name.

name according to npm rules — https://docs.npmjs.com/files/package.json#name "must not have uppercase letters in the name", "name can't contain any non-URL-safe characters."

@develar develar changed the title [Linux][Suggestion] Be more restrictive with executable name Linux: Be more restrictive with executable name Nov 3, 2016
develar added a commit to develar/electron-builder that referenced this issue Nov 3, 2016
@lbssousa
Copy link
Author

lbssousa commented Nov 3, 2016

Very good. So name is in fact a good choice here.

To summarize:

  • name would be used for main Linux executable name, AppImage name, etc.
  • productName would be used for desktop entry Name property.

Right?

@develar
Copy link
Member

develar commented Nov 3, 2016

Yes. Also, in any case, all file names are sanitised using https://www.npmjs.com/package/sanitize-filename

develar added a commit to develar/electron-builder that referenced this issue Nov 3, 2016
@develar develar closed this as completed in c3136ad Nov 3, 2016
@develar
Copy link
Member

develar commented Nov 19, 2016

@lbssousa Your are right. npm doesn't restrict name to be lowercased. But snaps does. So, electron-builder will lowercase your name in any case for all Linux targets.

@probonopd
Copy link

probonopd commented Nov 13, 2018

Please use the proper unchanged application names (including capitalization, if any) for AppImages like you do for macOS. Every time I see an application like e.g., RcloneTray spelled correctly (RcloneTray.dmg) for macOS but wrongly (rclonetray.AppImage) for Linux it reminds me that macOS still feels more polished to me.

Point in case:
https://github.com/dimitrov-adrian/RcloneTray/releases

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