I’ve tried to export some of my finished godot files so that I can share them, obviously. However whenever I export an .exe file (using the windows preset provided), I HAVE to put it inside a clone of the godot project. That means that someone trying to run the project would have the go through a bunch of confusing .gd and .tscn files to find the executable.
Obviously I would like it if the game could run by the .exe (and the .pck file) alone, but I’ve never managed to get the .exe file to run isolated. I always have to clone the entire godot project, put the .exe file inside it, and then it runs.
I have been looking online for help, downloaded the windows 10 SDK, got SignTool properly set up in the godot editor, even reset all of godot’s settings, but even with all of that I can’t figure out how to compile everything into just the .exe and .pck files.
Most of the trouble I’ve seen people online have has moreso to do with the exported project being buggy rather then what I am describing, so I don’t really know what to do.
Maybe you project is referencing some resources by a local path? Make sure to use res:// for any resources and user:// for any save data, any other file path will cause issues if you do not know exactly what you are doing.
That shouldn’t be necessary. As @gertkeno says, file IO is the likely problem. Are you loading files with FileAccess or DirAccess? What errors are you getting when the .exe is not in the source folder?
What is strange is that when exporting via “debug”, the project DOES run, but everything is visible if that makes sense? Like every single script becomes active at startup instead of just the main scene defined in the editor settings.
As for the console, it doesn’t help much since it closes automatically once the main .exe closes, so not enough time passes for it to log anything useful. When the debug .exe runs, nothing of note pops up. No error messages or anything I see that would be notable even for regular debugging.
And obviously when running the game in the godot editor it works perfectly fine, so it’s probably not the game code itself that’s the problem, not that I would know for sure though.
You may have to open the game from a console, double clicking the yourgame.console.exe will close with the game, so reading it won’t be very helpful. Logs are also generated under user://logs/godot.log where you can read there.
It probably is something wrong with the game code, there are a hand full of things that do run differently when exported versus when in-editor. Always try out the debug export before publishing a release export.
Well I am running the game from the console exe as well, it does the same thing.
Now that I think about it, the only thing that maybe could cause a problem is that the game has a save file that is written in a .txt file that is inside the game folder itself, not saved to the user directly. I thought it would just work but in hindsight that was stupid to assume. I’ll see if saving the save file outside the game folder itself will fix things.
I mean you must open a terminal separately, then within it type the command to run the game. The terminal opened separately will not close on it’s own, so it’s output will remain open. Still you should try looking through log files.