Add a way to set the application icon #18
Replies: 6 comments 5 replies
-
|
This would be a cool addition if it is possible. I need to do some digging though. I assume the icon needs to be encoded in the file. Any icon changes to a file like this will not be portable on mac (need to verify) |
Beta Was this translation helpful? Give feedback.
-
|
I converted this to a discussion in the meantime @binaryfire 👍🏻 |
Beta Was this translation helpful? Give feedback.
-
|
From what I understand, this is only an issue for Windows. I don't think Mac or Linux binaries have icons embedded directly into binaries in the same way. Need to confirm that though. There's an option to use a custom icon for Windows but it seems to be broken at the moment: crazywhalecc/static-php-cli#669. Once it's fixed, I'll work on a PR to add a generic icon to the Windows builds. I think something like this will be fine for most people: https://www.iconarchive.com/show/ionicons-icons-by-ionic/terminal-icon.html |
Beta Was this translation helpful? Give feedback.
-
|
I don't have access to a Mac - could you let me know if your built cli apps show the PHP logo or a generic icon? A generic icon is fine for now IMHO. We can investigate ways of adding custom icons for Mac and Linux later. I think it would have to be done post-build for those OSes. |
Beta Was this translation helpful? Give feedback.
-
|
A relevant implementation detail just occurred to me. When installing a phpacker app using our custom composer installer we create Unix style proxy files to the correct executable. Similar to how composer handles executables natively. If we add a windows icon it might be lost when installing your app with composer. We’ll support more distribution methods in the future. This might not be an issue for homebrew or apt but I thought you should be aware of the installer behavior as it stands right now. Phpacker itself uses this composer installer method. I wonder what it’s default icon in vendor/bin is on windows. |
Beta Was this translation helpful? Give feedback.
-
|
@binaryfire I just released a new version including your PR 0.3.1. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The PHP logo is showing up as the app icon in Windows:
I'm not sure what happens on macOS and various Linux distros, but I think most OSes support app icons. It'd be great if there was a way of defining these in PHPacker.
The default icon should be something generic like this: https://thenounproject.com/browse/icons/term/command-line/. That would be suitable for most cli tools.
Beta Was this translation helpful? Give feedback.
All reactions