-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Export: Modify Windows template without rcedit #75950
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
Conversation
I think the rcedit code should be removed in the same PR, as we don't want to support both approaches at the same time. While we try to preserve compatibility across 4.x, this mainly applies to the API, not the export system. (Also, it should be possible to create compatibility handlers to automatically update old entries' names in the Windows export presets to the new names.) |
I think it's fine to first assess whether this approach is good, before doing the extra work to remove the old. If it's not clear whether this PR wouldn't be merged (it hasn't been reviewed yet), there's no point doing removing the code it's meant to replace. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I am interested in getting this to work since I export from Linux for Windows. |
I also think this is a good idea since it has multiple advantages:
Note: This PR needs a rebase. I would be happy to test this as I always used |
Ok, rebased it so you can test it. Also fixed a bug introduced here which prevented exporting console template. |
This is incorrect. The official export templates (and the editor executable) are named with the underscore: The name with a period is what is produced by our buildsystem by default, but the actual distribution is renamed. So this code was correct and should not be modified. |
Ok, the ones built on github contained in artifact windows-template.zip are named: Would be nice to change the github workflow probably to be consistent. |
@pkowal1982 That's not related to the CI. As I mentioned, that's how the name is generated by the buildsystem. It uses a number of suffixes to differentiate between build options, but those get removed for the official distribution. It may be worth discussing the naming scheme of the official distribution, but in the meantime we should not break the system in favor of CI artifacts which are not supposed to be used in development anyway. |
Ok, reverted _console -> .console change. Though I think it would be nice |
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.
Right now, I can not really test this as I always get Wrong number of icon images.
.
With the old implementation, I just got a bunch of warnings (that I do not provide icons for all formats) but the modify process worked (and the icon worked in the explorer, not when I opened the properties though).
ec94441
to
2886ff8
Compare
@bruzvg Somehow calling FileAccess::open(p_template_path, FileAccess::READ_WRITE) twice on Windows was returning an error. For Linux it was working. |
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.
Now it seems to be working with all architectures, icons and metadata are set correctly.
e7b6367
to
15196e1
Compare
Tested on Linux and it seems to work great, both for setting the icon and other metadata. Checked the resulting binary with I think we can remove the rcedit code too. Is there any way it would still be used currently? |
Is there any left, it seems to be removed. |
Found few lines related to the editor setting which can be removed, the rest is already gone. godot/platform/windows/export/export_plugin.cpp Lines 826 to 829 in 1b37dac
godot/platform/windows/export/export.cpp Lines 44 to 45 in 1b37dac
|
Yeah it's just a few, I found those:
(The And I guess we can remove the
|
Yes, godot/platform/windows/export/export.cpp Lines 53 to 54 in 1b37dac
|
I've removed the aforementioned rcedit related code in additional commit so it's easier for track. |
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.
Looks good to me. You can squash the commits and it's ready to merge.
Thanks! Amazing work 🎉 |
Using rcedit is little problematic so I've created a POC which shows how it can be dropped.
PR contains only crucial code, if it's decided to go this way I'll fix loose ends.
For now code drops old resources section and replaces it with brand new created from scratch.
Questions which I can think of:
and closes Provide an easier way to change the executable icon for projects exported to Windows godot-proposals#1097.