Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions platform/windows/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ def arrange_program_clean(prog):


env["BUILDERS"]["RES"].emitter = redirect_emitter
res_file = "godot_res.rc"
res_target = "godot_res" + env["OBJSUFFIX"]
if env.editor_build:
res_file = "godot_res.rc"
res_target = "godot_res" + env["OBJSUFFIX"]
else:
res_file = "godot_res_template.rc"
res_target = "godot_res_template" + env["OBJSUFFIX"]
res_obj = env.RES(res_target, res_file)
env.Depends(res_obj, "#core/version_generated.gen.h")

Expand All @@ -94,8 +98,12 @@ if env.msvc:

# Build console wrapper app.
if env["windows_subsystem"] == "gui":
res_wrap_file = "godot_res_wrap.rc"
res_wrap_target = "godot_res_wrap" + env["OBJSUFFIX"]
if env.editor_build:
res_wrap_file = "godot_res_wrap.rc"
res_wrap_target = "godot_res_wrap" + env["OBJSUFFIX"]
else:
res_wrap_file = "godot_res_wrap_template.rc"
res_wrap_target = "godot_res_wrap_template" + env["OBJSUFFIX"]
res_wrap_obj = env_wrap.RES(res_wrap_target, res_wrap_file)
env_wrap.Depends(res_wrap_obj, "#core/version_generated.gen.h")

Expand Down
28 changes: 28 additions & 0 deletions platform/windows/godot_res_template.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "core/version.h"

#ifndef RT_MANIFEST
#define RT_MANIFEST 24
#endif

GODOT_ICON ICON platform/windows/godot.ico
1 RT_MANIFEST "platform/windows/godot.manifest"

1 VERSIONINFO
FILEVERSION GODOT_VERSION_MAJOR,GODOT_VERSION_MINOR,GODOT_VERSION_PATCH,0
PRODUCTVERSION GODOT_VERSION_MAJOR,GODOT_VERSION_MINOR,GODOT_VERSION_PATCH,0
FILEOS 4
FILETYPE 1
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", GODOT_VERSION_NAME
VALUE "FileVersion", GODOT_VERSION_NUMBER
Comment on lines +20 to +21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should create EngineDescription and EngineVersion instead?
So users keep File* for their own project's metadata, but we keep a reference to Godot.

Likewise, would there be other values we want to keep with some Engine prefix?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though IIUC you said that when resource modification is enabled, we don't reuse any of this and write it manually, so if we want this we'd have to add it to the export code too I suppose.

Copy link
Member Author

@bruvzg bruvzg Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-standard fields will be invisible in UI. And yes, all are overwritten by exporter. So I left these only to make specific template version easy to identify (before export, when using custom templates).

END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
28 changes: 28 additions & 0 deletions platform/windows/godot_res_wrap_template.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "core/version.h"

#ifndef RT_MANIFEST
#define RT_MANIFEST 24
#endif

GODOT_ICON ICON platform/windows/godot_console.ico
1 RT_MANIFEST "platform/windows/godot.manifest"

1 VERSIONINFO
FILEVERSION GODOT_VERSION_MAJOR,GODOT_VERSION_MINOR,GODOT_VERSION_PATCH,0
PRODUCTVERSION GODOT_VERSION_MAJOR,GODOT_VERSION_MINOR,GODOT_VERSION_PATCH,0
FILEOS 4
FILETYPE 1
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", GODOT_VERSION_NAME " (Console)"
VALUE "FileVersion", GODOT_VERSION_NUMBER
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END