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

Improper icon on Mac #153

Open
priand opened this issue Nov 28, 2024 · 10 comments
Open

Improper icon on Mac #153

priand opened this issue Nov 28, 2024 · 10 comments

Comments

@priand
Copy link

priand commented Nov 28, 2024

Not sure if this is a bug or an improper configuration, but my application shows a generic Java icon when in the dock (and not started). Inspecting the app, Contents/Resources/icon.icns is not my icon, but the generic java one.
When I used npx jdeploy, I properly set this icon as the icon, the install splash screen and the splash scree with the same icon. Three copies have been installed in my project root (icon.png, splash.pgn & installsplash.png). The splash icon are in used but not the app one. It also shows the wrong icon in the install page: https://www.jdeploy.com/~monflabs-devtoolbox-pre. Interestingly the icon seems to be the right one in the jdeploy/bundles app (mac-amd64 & mac-arm64), but not in the installed bundled.
Did I miss something in the configuration? Or should I clear some cache (I deleted jdeploy* folder before packaging)?

@shannah
Copy link
Owner

shannah commented Nov 28, 2024

I don't think I've run into this one before. The fact that it appears correct in some contexts and not others makes me think there might be something about the icon png that it is having trouble processing.

I can take a look tomorrow.

I suggest trying a different png file and see if that makes a difference.

@priand
Copy link
Author

priand commented Nov 28, 2024

Thank you for your quick answer. I already changed the icon but it did not make a difference.

@shannah
Copy link
Owner

shannah commented Nov 28, 2024

When I ran your png through the inspector in Preview, it looked different than for most of the PNGs I've used before. Namely, it included a TIFF section, which makes it look like this PNG file includes TIFF information also. Since it was produced by Pixelmator, it makes me think this might be the actual pixelmator file (since Pixelmator uses PNG as its source format).

I ran this through https://squoosh.app/ to re-encode it. This version should work.

icon

In case Github performs further processing, you can try it yourself. I used the 0xiPNG compression.

image

I haven't tested this in an app yet, but I'm pretty sure it will work.

@priand
Copy link
Author

priand commented Nov 29, 2024

Thank you for the analysis. I used your latest icon but still face the same behavior: the downloaded app doesn't have the proper icon in its Contents, while the local build (jdeploy/) has it:
s1
s2
I also believe that changing the icons (including the splash ones) requires a full app reinstall, correct?
Not sure if it makes a difference, but I'm deploying using:

npx jdeploy package
npm publish

My npm account is using a one time password and I've never been able to use public from the UI app.

@shannah
Copy link
Owner

shannah commented Nov 29, 2024

Try just running npx jdeploy publish

@priand
Copy link
Author

priand commented Nov 29, 2024

Yeah, it does not work for me because of the one time password

npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access
npm ERR! code EOTP
npm ERR! This operation requires a one-time password from your authenticator.
npm ERR! You can provide a one-time password by passing --otp=<code> to the command you ran.
npm ERR! If you already provided a one-time password then it is likely that you either typoed
npm ERR! it, or it timed out. Please try again.

@shannah
Copy link
Owner

shannah commented Nov 29, 2024

Run npm login first. Then run npx jdeploy publish

Or if you have a token already, you can use that on the command line.

E.g.
NPM_TOKEN=xxxxx npx jdeploy publish

@priand
Copy link
Author

priand commented Nov 29, 2024

Thank you, that worked now! I actually changed the 2FA settings to make it work.
Thanks again for your help.

@shannah
Copy link
Owner

shannah commented Nov 29, 2024

Glad you got it working.
It should still be possible to do this with 2FA. What settings did you change?

@priand
Copy link
Author

priand commented Nov 29, 2024

I kept 2FA but unchecked 'Require two-factor authentication for write actions'. It did not work with that enabled,

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

No branches or pull requests

2 participants