godot: Export with embedded pck is broken when changing PE metadata with rcedit

Godot version: 3.2 beta 1

OS/device including version: Windows 10

Issue description: Running an executable that was exported with embedded pck fails to run with the following error: Error: Could not load game data at path '.'. Is the .pck file missing?

Steps to reproduce:

  1. Enable “Embeded Pck” in export options
  2. Export (either release or debug, doesn’t matter)

Minimal reproduction project:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 33 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Just as a reminder, I know there are multiple issues with PCK embedding. I have plans to provide a better implementation, that is not as fragile as the current one. I don’t know exactly when I’ll be able to do it, but that’ll happen.

You can replace the icon with rcedit in the export template itself, so that it’s already good before exporting with embedded PCK.

Holy sh**ttt, I found out that as long as I filled File Version and Product Version, this issue will be gone.

Yeah, I’m in the same situation. I’m close to finalizing my project and it randomly happens when exporting to windows. I just tested with 3.4.1 RC1 and that bug is still there Sometimes I get an error while exporting:

ERROR: Failed to export the project for platform 'Windows Desktop'.
   at: _export_project_to_path (editor/project_export.cpp:863)

Sometimes it does export, but I get an error when starting the exe:

Error: Couldn't load project data at path ".". Is the .pck file missing?
If you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension)

Sometimes it did export good from 3.4.0, randomly

When I export with the checkbox “Embed pck” unchecked, the export does work The problem is because of rcedit as mentioned here: https://github.com/godotengine/godot/issues/45345#issuecomment-798772388

It started after I added icons. Disabling rcedit also fixes the issue, but I want the exported executable in one .exe with an icon, so I’m going to need to use resource hacker to get my windows icon in when this is not fixed shortly I presume.

@Tsar333 rcedit is a command-line utility you can call manually. Download an executable and run it from a command prompt for instructions.

It is true that for non-professionnal gamedevs (speaking for myself), being able to ship one single .exe file does sound more appealing.

I would really advise distributing a ZIP archive with the executable and PCK for two reasons:

  • You get compression, so people can download your game faster.
  • You avoid false positives thrown by antivirus programs and Web browsers. They generally dislike having people download executables directly, but they’re fine with it if it’s packed in a ZIP archive.

funny bug, yesterday we were exporting our game to windows (last day of game off game jam) used rcedit only to find out we cant use embedded pck then.