-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Export with embedded pck is broken when changing PE metadata with rcedit #33466
Comments
@akien-mga, I'll check this more thoroughly later, but for now it'd be helpful knowing if the export templates are signed. |
They are signed indeed, but as per #32310 this shouldn't prevent the embedded PCK from working, it should only lose the signature on export. But maybe @Wavesonics signed the exported binary themselves, in which case it would be a duplicate of #32310. |
@akien-mga I did not sign my windows binaries, nor is Code signing is not enabled in my export options. |
I went to make a minimal case project for this bug, but may have instead uncovered a different bug: #33549 |
Ah I think I found the problem. I am using In my windows export options I have an icon specified under the Application header. If I remove that, it runs just fine, presumable because it doesn't run |
If the issue is the fact that the template is signed, and then this icon program modifies the template, thus invalidating the signature. Are we in "how did this ever work" territory? |
|
At the very least we should add clear documentation on the export tutorials about limitations of the embedded PCK. Users are lured in by the "all in one" aspect but there are lots of non-obvious drawbacks to the approach. |
Yes, current problems with resource editing and signing could be considered known issues for the time being. |
I disabled signing of export templates as of 3.2 RC 2. |
This causes issues for people who want to embed the PCK, change PE data with rcedit or sign the executable themselves. See godotengine/godot#32310 and godotengine/godot#33466.
Is there any workaround for using PCK embedding and having a custom icon at the same time? |
There's a potential megahack: tampering the current icon image data in the file with the one you want to use. |
You can replace the icon with rcedit in the export template itself, so that it's already good before exporting with embedded PCK. |
Much better. :) |
Not quite sure how you do that. Are there instructions somewhere on this strategy ? many thanks. It is true that for non-professionnal gamedevs (speaking for myself), being able to ship one single .exe file does sound more appealing. |
@Tsar333 rcedit is a command-line utility you can call manually. Download an executable and run it from a command prompt for instructions.
I would really advise distributing a ZIP archive with the executable and PCK for two reasons:
|
So... what are the constraints now? Because one time I can export an exe with the pck embed in it, but most of the time not. That while I didn't change my export settings. And I've done all the .ico and .png changes. |
Ok, this is weird. Although my game works fine in Godot (F5 or F6), when exporting it, there is all sort of weird things happening. Previous mentioned problem, but also game breaking problem. When I just exported it and tested it, everything worked fine. Now, a few hours later testing it again, the problem occurs again. And I also noticed that the icon image of my executable has changed from the one I made/chose, to the one of Godot again. So what is happening here? Why is the executable fine at first and a few hours later, while doing nothing with it, this happens. Edit - so I'm getting closer to the weirdness. Exported it again, everything works fine. I close the executable, then I close Godot, then I launch the executable again... and again the problems occurs. So is there something that isn't being exported that make these problems occur when Godot itself isn't running? |
@eyeEmotion If you export your project with a non-embedded PCK then export it again with an embedded PCK, the non-embedded PCK will take priority. This will be fixed by #37937. As a workaround, remove the PCK file that's next to the exported project executable. |
I've done all those things. I've always first removed the old files before exporting the new files. |
I investigated the use of (I did note that Kaitai Struct does have a PE specification file if anyone wants to code an alternative. ;D ) |
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. |
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. |
Holy sh**ttt, I found out that as long as I filled File Version and Product Version, this issue will be gone. |
yes it really works! I indicated random numbers in these two fields and after export everything worked out. |
Oops, it seems this only works if the executable is at the root folder of the game's resources ... |
Weird, I didn't export at the game's folder, I exported far far away from source code. I filled with 1.0.0 instead of random number tho. Not sure if it matters. |
I can reproduce this on Linux using
GNU strip (GNU Binutils) 2.36.1 Project is exported on 3.3.4: |
I was pretty sure this got fixed sometime in 3.3.x and I didn't have to resort to weird hacks to get a custom icon and metadata while embedding the PCK file. Maybe I was wrong about that. But I'm definitely experiencing it again in 3.4. |
Yeah, I’m in the same situation. I’m close to finalizing my project and it randomly happens when exporting to windows.
Sometimes it does export, but I get an error when starting the exe:
Sometimes it did export good from 3.4.0, randomly When I export with the checkbox “Embed pck” unchecked, the export does work 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. |
My project has worked normally |
Can anyone check if #57850 fixes this issue? You can try 4.0alpha5 or building the |
I can still reproduce on 11d40d7 with my steps above.
I think my issue is not caused by the windows icon, but an underlying way that the pck file is embedded. |
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:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: