Problems exporting Godot project to Windows exe

Godot Version

v4.2.stable.official [46dc27791]

Question

Hi,

I just finished the very first version of my first game made with Godot and now I am somehow stuck trying to export the game. So I set up an export preset for Windows Desktop like this:


as well as downloading the rcedit exe from Github and setting it in the Editor settings:

image
Now when I export the project using “Export Project…” Godot does create an exe in the folder. However when I want to run the exe I get a huge list of error messages in the console. I saved these error messages to a text file, it seems like all the ressources of the game are missing in the executable. So I have houndreds of

WARNING: res://main.tscn: In external resource #2, invalid UID: uid://coygxq88jdmat - using text path instead: res://mu3

at: open (core/io/resource_format_binary.cpp:1059)

ERROR: No loader found for resource: res://art/player_front_sprite.png (expected type: Texture2D)

at: (core/io/resource_loader.cpp:282)

WARNING: res://ground_level.tscn: In external resource #1, invalid UID: uid://b8e5p4aqc5tsd - using text path instead: g

at: open (core/io/resource_format_binary.cpp:1059)

ERROR: No loader found for resource: res://art/lost_compressor_only_background.png (expected type: Texture2D)

at: (core/io/resource_loader.cpp:282)

ERROR: Can’t load dependency: res://art/crane_trolley.png.

at: (core/io/resource_format_binary.cpp:459)

and so on. Basically it looks like all ressources are missing in the executable?

What did I do wrong here?

did you move the exe file from the original place?

Hi @pham150603 thanks for your reply!

So after exporting I didn’t move the exe. The exe is however not in the same folder as the project, because I believed the exe would contain everything that is needed and basically work standalone. Is that not correct?

Well, what I was looking for is the .pck file if you haven’t embedded it in the .exe file yet

So I clicked on “Export All…”, but there seems to be no .pck file that was exported. Should I expect one in the same folder?

you should check your export setting to see if you enabled embedded .pck
if the option is disabled then yes you should expect one

Yes it is enabled:
image
Should I disable it?

Usually, I disable it because it causes some problems with icons and stuff.
But you should test it out and see if the problem is fixed

It doesn’t seem to fix the issue unfortunately :confused:
Also for some reason all the file names now contain “.console”. Is that correct?
image

Check the name on the export path to see if it correct

Ah yeah, there was a “console” in the name. The original issue that the executable can’t access the ressources for some reason unfortunately still persists though.

@pham150603 Do you have any other idea what could cause my problem?

Another thing that might cause the issues is Encryption or some export setting.
I recommend using the default export preset to see if it works first then modify it to your liking

Hm, I just added a new fresh export preset with no rcedit setting and basically just provided a file path and it still doesn’t work. I really don’t understand what I am doing wrong here :frowning:

Well, what is there to suggest… We can’t see all the settings and the project itself. Are the file names capitalized? Do lowercase or uppercase letters match the resource names everywhere in the project? In Windows, they may not. Do you use OneDrive?

Try downloading a known working project and exporting it.

Hi @tomcat OneDrive is an interesting point. The project is in fact in a OneDrive directory. Didn’t really think this would influence anything.

The file names are not capitalized. Should they?

I refer to all ressources by their “internal” path using the $ operator. I thought then these references would work fine. Do I need to be cautious with something there?

Yep, from OneDrive. Move the project to a local disk.

There is another potential problem that is often forgotten — character length limit. Make sure the path is as short as possible and don’t name files with long names.

They just need to be the same on the system and in the project script. Win sometimes does not distinguish between uppercase and lowercase letters (this is a separate system setting).

So I reverted some changes that I did a few days ago trying to solve this issue and now I think the remaining error messages are warning about the naming of the scenes:

WARNING: res://ground_level.tscn: In external resource #24, invalid UID: uid://bmi4fvgjfuu20 - using text path instead:g
at: open (core/io/resource_format_binary.cpp:1059)
WARNING: res://ground_level.tscn: In external resource #25, invalid UID: uid://dqmd15i8e8odk - using text path instead:g
at: open (core/io/resource_format_binary.cpp:1059)
and so on…
as well as these errors here:

So I don’t exactly how, but I tried and tried re-importing a lot of ressources and it seems this solved the issue! Thanks a lot for your help everyone. I hope I didn’t use too much of your time.