-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Change godot.ico to uncompressed/fixed size #57850
Conversation
This effectively reverts #9285, but I guess it's fine as ~250 KB isn't so much for a Windows binary by 2022 standards. This approach will also make it easier for the Godot editor to eventually support replacing icons on export without relying on any external tools. I wonder if we could use the same hex-editing approach for replacing other executable metadata, such as the version and description. We could have a default description padded with spaces to allow for fairly long descriptions. |
Padding description with spaces should work. Extending the replacement script should be easy basing on what's already implemented and it can be done independently of this PR as I assume there are some decisions to be made about version "fixed" format which can take time. |
Is there a reason that we can't make it easy to change the icon during export instead of using icon replacement tools after export? |
It's easy to fix by running |
@aaronfranke The reason to use icon replacement tool is, that this tool already exists and all it needs is merging this "fixed" icon to master and 3.x branches. If someone will rewrite logic from the script to the editor itself it won't need external tools anymore. But it will still need this fixed size approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the pros outweigh the cons here, so we can give this a try in master
at least (and then consider it for 3.x
).
Compressed binary size (e.g. within a ZIP) shouldn't be affected much by this change, so download times for editor and export template binaries should remain almost identical.
Thanks! |
Cherry-picked for 3.5. |
Sorry to comment on an old PR, but that sounds like a nice alternative to rcedit, shouldn't it be more promoted and added to the doc (https://docs.godotengine.org/en/stable/tutorials/export/changing_application_icon_for_windows.html)? Is it an issue because it is third-party code and cannot not fully endorsed by the Godot team? Also, to avoid the leftover warning in the export popup:
It seems we must disable "Application > Modify Resources" so Godot doesn't try to access rcedit. Can you confirm that it won't have other side effects, and that the only "modified resource" is the icon? Finally, we could add the hint about disabling "Application > Modify Resources" to the first warning, in the export popup, so the user doesn't have to wait for an actual export to see the hint in the second warning. If you're okay with this, I'll open respective issues in godot-docs repo and godot-proposals. |
…com/pkowal1982/godoticon (latest change 2023-02-17) and add 6 icon formats. Follow instructions in godotengine/godot#57850 to replace Windows icon after export.
I think it should go into 3.x first but as the workflow says that master should precede everything, I'm creating PR to master.
Change is small and unobtrusive but fixes some Windows exporting issues.
Using windows icon file which is uncompressed (has fixed size) allows for easy icon replacement even in executables with pck embedded. Of course replacement icon should have the same size.
To create such icon you'll need a tool which I've happily already created:
➡️ https://github.com/pkowal1982/godoticon ⬅️
Don't worry, no external tools needed.
How to use it:
Pros:
Cons: