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 build is not using productName #1895

Closed
lazlojuly opened this issue Aug 4, 2017 · 18 comments
Closed

Linux build is not using productName #1895

lazlojuly opened this issue Aug 4, 2017 · 18 comments
Labels

Comments

@lazlojuly
Copy link

lazlojuly commented Aug 4, 2017

  • Version: 19.18.0

  • Target: linux squirrel

I am trying to build for Linux with -- linux configuration and I am using productName in package.json.

For a mac build, productName is picked up correctly for both artifacts (dmg and zip).

For linux name is being used. This causes an error.

I cannot use name for product name as my app is also a scoped npm package.

package.json example:

"scripts": {
  build:mac: build --mac,
  build:win: build --win,
  build:linux: build --linux,
},
"version":"0.0.0",
"name": "@myscope/my-package-name",
"productName": "My Desktop App",
"build": {
    "appId": ".....",
...

Error:

xorriso : FAILURE : Cannot acquire drive '.../repos/electron/myapp/build/@myscope/my-package-name-0.0.0-x86_64.AppImage'
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'

    at .../repos/electron/.../electron-builder-util/src/util.ts:67:16

I have a related issue for Windows Squirrel but that has a workaround (thanks to @develar for pointing it out):

#1879

@develar
Copy link
Member

develar commented Aug 12, 2017

Please use 19.22.0. Or just set linux.executableName .

@develar develar closed this as completed Aug 12, 2017
@develar develar added the bug label Aug 12, 2017
@lazlojuly
Copy link
Author

lazlojuly commented Aug 15, 2017

@develar Thanks for the prompt reply.
Just for the record, I have tried 19.22.1 with or without linux.executableName and it is still breaking.

@develar
Copy link
Member

develar commented Aug 15, 2017

Do you mean that this issue is still not solved for you?

@lazlojuly
Copy link
Author

Yes, I do

@develar develar reopened this Aug 16, 2017
@achingbrain
Copy link

The correct option to set is linux.artifactName.

e.g. package.json

{
  "name": "@my-scope/my-package"
  ...
  "build": {
    ...
    "linux": {
      "artifactName": "my-package-${version}"
    }
  }
}

@achingbrain
Copy link

"artifactName": "${productName}"

works too..

@probonopd
Copy link

But why is it using productName correctly for Mac and Windows but not for Linux? At least the AppImage should be named like the Mac artifact by default imho.

@sandyarmstrong
Copy link

Documentation says artifactName is unused for .deb packages, so that's really not the answer.

@pronebird
Copy link
Contributor

We use artifactName and productName and still see that the installed binary is called after name field in package.json. Which is clearly not what documentation says.

Why does electron-builder bother? Just use productName and let folks specify executableName if they wish to change that.

pronebird pushed a commit to mullvad/mullvadvpn-app that referenced this issue Aug 22, 2018
pronebird pushed a commit to mullvad/mullvadvpn-app that referenced this issue Aug 22, 2018
pronebird pushed a commit to mullvad/mullvadvpn-app that referenced this issue Aug 22, 2018
pronebird pushed a commit to mullvad/mullvadvpn-app that referenced this issue Aug 22, 2018
pronebird pushed a commit to mullvad/mullvadvpn-app that referenced this issue Aug 22, 2018
@develar
Copy link
Member

develar commented Aug 25, 2018

At least the AppImage should be named like the Mac artifact by default imho.

When this functionality was written, it was not safe to use space in AppImage file name. #775 (comment)

Ok, I will revisit rules and current behaviour.

@probonopd
Copy link

probonopd commented Nov 13, 2018

Cross-referencing here:
#806 (comment)

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

develar added a commit to develar/electron-builder that referenced this issue Nov 16, 2018
develar added a commit that referenced this issue Nov 16, 2018
@develar
Copy link
Member

develar commented Nov 26, 2018

20.37.0 released as pre-release.

@probonopd
Copy link

probonopd commented May 30, 2019

Please reopen, this still seems not to be working:
tunepack/tunepack-desktop#6 (comment)

When

"name": "tunepack-desktop", 
"productName": "Tunepack", 

is set, then we currently get

Tunepack-1.0.6-x86_64.AppImage would be expected. In other words, the dmg and the AppImage should always use the same name.

@develar
Copy link
Member

develar commented Jun 24, 2019

@probonopd cannot reproduce. works for me. Problem here is that Github doesn't allow space for names, so, when AppImage is uploaded, name is changed. In electron-builder 21, artifact name pattern for AppImage will be changed to use - to separate name and version.

@probonopd
Copy link

Thanks @develar - do you have any idea why given

https://github.com/tunepack/tunepack-desktop/blob/6d4982f1368b1567a24a944dc4a2b220f8a1e2be/package.json#L2-L3

we don't get Tunepack-1.0.6.x86_64.AppImage then?

@develar
Copy link
Member

develar commented Jun 24, 2019

@probonopd

Problem here is that Github doesn't allow space for names, so, when AppImage is uploaded, name is changed

^^^

In electron-builder 21 two changes were done:

  1. use - as for dmg instead of space.
  2. even if space will be used in artifact pattern, still, product name will be preferred instead of name (i.e. before downgrade to use safe artifact name, now first we try to replace all spaces to dash — if after that name is safe for Github, then it is used).

@probonopd
Copy link

I don't see a space in "Tunepack"? Why is it preferring "tunepack-desktop" to "Tunepack" then?

@develar
Copy link
Member

develar commented Jun 24, 2019

@probonopd Filename in your local file system and on GitHub is different.

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

No branches or pull requests

6 participants