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

Add mount device custom icon generation #33

Merged
merged 8 commits into from
May 12, 2019
Merged

Add mount device custom icon generation #33

merged 8 commits into from
May 12, 2019

Conversation

manrueda
Copy link
Contributor

@manrueda manrueda commented Jan 27, 2019

During the DMG generation (if gm is installed), a new icon will be created using the OS mounted drive icon and the apps icon. It will apply a perspective and size correction on the app icon before the composition.

Example:
image

Fixes #16

cli.js Outdated Show resolved Hide resolved
cli.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
cli.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
icons.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

You need to mention the gm install prerequisites in the readme if users want a DMG icon.

@sindresorhus
Copy link
Owner

This is looking great:

Screen Shot 2019-04-19 at 00 16 43

@sindresorhus
Copy link
Owner

Can you also set the icon on the DMG file itself?

Screen Shot 2019-04-19 at 00 20 20

@sindresorhus
Copy link
Owner

@manrueda Can you add commits instead of squashing and force pushing so I can see what changed? I will squash on merge anyway.

@manrueda
Copy link
Contributor Author

Sure (its done).

About the icon for the dmg file. Looks like macos had all the right tools to do it, but they removed one time ago and not the only solution is some python script.

https://apple.stackexchange.com/questions/6901/how-can-i-change-a-file-or-folder-icon-using-the-terminal/161984#161984

@sindresorhus
Copy link
Owner

How about bundling the seticon binary here: https://github.com/sveinbjornt/osxiconutils ?

compose-icon.js Outdated Show resolved Hide resolved
compose-icon.js Outdated Show resolved Hide resolved
compose-icon.js Outdated Show resolved Hide resolved
compose-icon.js Outdated Show resolved Hide resolved
compose-icon.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

You need to add the disk icon to files in package.json

@manrueda
Copy link
Contributor Author

Disk icon added

@sindresorhus
Copy link
Owner

Any thoughts on #33 (comment) ?

@manrueda
Copy link
Contributor Author

I can give it a try, i don't have much experience with releasing binaries on macOS. Because this library already only works on macOS for obvios reasons should be on to bundle the compiled binary, right?

@manrueda
Copy link
Contributor Author

Just pushed an implementation of seticon binary.

cli.js Outdated Show resolved Hide resolved
@sindresorhus sindresorhus merged commit a428a90 into sindresorhus:master May 12, 2019
@sindresorhus
Copy link
Owner

Works great! Thanks for doing this :)

@manrueda manrueda deleted the feat/custom-mount-icon branch May 13, 2019 15:05
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.

Generate on-the-fly .dmg icon based on Removable.icns and application icon
2 participants