+1 vote

I custom built Godot 3.2.1 with GodotSteam, and I am able to access the Steamworks SDK in the editor. However, when I export the project and run it, it closes almost immediately. If I execute it through the command line, I get the error:

"Parse Error: The identifier "Steam" isn't declared in the current scope."

So clearly the Steamworks library is being packaged with my executable. I tried looking up why this is happening, and as best as I can tell I need custom export templates for this. So I ran these commands:

scons platform=osx tools=no target=release_debug
scons platform=osx tools=no target=release

Which gave me two binary files, one for release and one for debug:


But I can't figure out how to use them. Or if I have successfully used them, it hasn't solved my problem. I tried selecting them as Custom Templates for my Mac OS X Export preset, but that gives me the error:

"Could not find template app to export: /{absolutepathtosource}/bin/godot.osx.opt.debug.64"

(It shows the real path, I'm not posting the whole path here)

Which doesn't make sense, because that IS the correct path. I even selected the file in the built in file explorer, so it's definitely correct. I've tried putting them in different directories, including Application Support/Godot/templates/3.2.1.stable, and I even tried replacing the existing mac templates inside of the osx.zip in that folder. Every time, if I specify the custom template it gives that error. If I don't specify the custom template, it exports but gives that runtime error.

How can I export the mac executable such that it can actually run with the Steamworks SDK?

in Engine by (96 points)

1 Answer

+1 vote
Best answer

Found the fix. I replaced the binary templates inside of the Application Support/Godot/templates/3.2.1.stable/osx.zip file with the new ones for steam (renaming them to be the same as the old ones). That allowed the export to succeed, but running the application still gave an error, this time to do with being unable to find the libsteam_api.dylib file. So I copied that into the .app file, alongside binary executable, and then it worked.

by (96 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.