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

fix: macOS failing when there is no old icon #1658

Merged
merged 2 commits into from
Jun 13, 2017

Conversation

djpereira
Copy link
Contributor

This avoids throwing an ENOENT exception, if for any reason the old icon is not found to be deleted during the mac installer creation process.

Error: ENOENT: no such file or directory, unlink '/mypath/dist/canary/mac/Electron.app/Contents/Resources/myapp.icns'
    at Object.<anonymous> (/mypath/node_modules/electron-builder/src/packager/mac.ts:154:19)
From previous event:
    at Object.createApp (/mypath/node_modules/electron-builder/out/packager/mac.js:138:21)

@develar
Copy link
Member

develar commented Jun 12, 2017

Do you use extendInfo?

@djpereira
Copy link
Contributor Author

@develar, I am not using extendInfo.

@develar
Copy link
Member

develar commented Jun 12, 2017

So, how error is possible if electron always has default icon?

@djpereira
Copy link
Contributor Author

djpereira commented Jun 12, 2017

@develar, I am not sure, but I am running build more than once in different output directories and it fails the second time:

build --em.build.directories.output=dist/release
build --em.build.directories.output=dist/canary
build --em.build.directories.output=dist/dev

Also, I am using a custom electron build.

Now that I am digging into it, as far as I know, the default icon is "electron.icns", but the second time is trying to delete "myapp.icns". I am not sure why.

@develar develar merged commit ac44fcd into electron-userland:master Jun 13, 2017
@develar
Copy link
Member

develar commented Jun 13, 2017

Merged, but I will take a look why it is happened. Thanks.

@djpereira
Copy link
Contributor Author

@develar, I think the problem here is that when we use electron-builder with the "electronDist" option, the custom dist gets copied over using "hard-links" instead of actually copying the content.

The problem with this, is that as the content of the electron dist "copy" gets modified (icons, name, etc.), the original electronDist source folder "mirrors" the changes.

This is not an issue for each use case, but you definitely get into trouble very often.
I think that ideally we want to make an actual copy of the files each time, not a hard link.

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

Successfully merging this pull request may close these issues.

2 participants