Description
Tested versions
- Reproducible in 4.5.beta1 (custom build without stripping the resulting .exes)
System information
Linux Fedora v42 - Godot Editor 4.5.beta1
Issue description
When I try exporting for windows from linux using a custom build without strippping the .exe filies I'm getting the error:
ERROR: platform/windows/export/template_modifier.cpp:577 - Condition "section_entries[section_entries.size() - 2].name != String(".rsrc")" is true. Returning: ERR_CANT_OPEN
Seems to be from #75950
Looking at the specific line:
ERR_FAIL_COND_V(section_entries[section_entries.size() - 2].name != String(".rsrc"), ERR_CANT_OPEN);
It seems to expect the last two sections to be .rsrc and .reloc respectively.
I made it print all the sections before the error and this is what I got:
Section 0: .text
Section 1: .data
Section 2: .rdata
Section 3: pck
Section 4: .pdata
Section 5: .xdata
Section 6: .bss
Section 7: .edata
Section 8: .idata
Section 9: .CRT
Section 10: .tls
Section 11: .rsrc
Section 12: .reloc
Section 0: .text
Section 1: .data
Section 2: .rdata
Section 3: .pdata
Section 4: .xdata
Section 5: .bss
Section 6: .idata
Section 7: .CRT
Section 8: .tls
Section 9: .rsrc
Section 10: .reloc
Section 11: /4
Section 12: /19
Section 13: /31
Section 14: /45
Section 15: /57
Section 16: /70
Section 17: /81
Section 18: /97
Section 19: /113
I did some research and found out that it's probably because of extra debug_symbols/debug info in the .exe, stripping it removes the extra sections and lets the export occur correctly.
Not sure if this is something that should be fixed, but I figured I'd point it out at least.
Steps to reproduce
Compile windows export templates with debug symbols, don't strip the debug symbols from the .exe, try to export from linux using those export templates.
Minimal reproduction project (MRP)
N/A
Metadata
Metadata
Assignees
Type
Projects
Status
Status