Skip to content

Commit

Permalink
Fix Godot 3.x Linux (X11) build
Browse files Browse the repository at this point in the history
Black Python formatting
  • Loading branch information
ashtonmeuser committed May 9, 2023
1 parent 74a5adc commit eea765c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ elif env["platform"] == "windows":
env.Prepend(CCFLAGS=["/std:c++14", "-W3", "-GR", "-O2", "-EHsc", "-MD"])
env.Append(ENV=os.environ) # Keep session env variables to support VS 2017 prompt
env.Append(CPPDEFINES=["WIN32", "_WIN32", "_WINDOWS", "_CRT_SECURE_NO_WARNINGS", "NDEBUG"])
if env.get("use_mingw"): # MinGW
if env.get("use_mingw"): # MinGW
env["LIBWASMERSUFFIX"] = ".a"
env.Append(LIBS=["userenv"])
else: # MSVC
else: # MSVC
env["LIBWASMERSUFFIX"] = ".lib"
# Force Windows SDK library suffix (see https://github.com/godotengine/godot/issues/23687)
env.Append(LINKFLAGS=["bcrypt.lib", "userenv.lib", "ws2_32.lib", "advapi32.lib"])
Expand Down
6 changes: 3 additions & 3 deletions SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ opts.Update(module_env)
download_wasmer(env, module_env["download_wasmer"], module_env["wasmer_version"])

# Check platform specifics
if env["platform"] in ["linux", "linuxbsd"]:
if env["platform"] in ["linux", "linuxbsd", "x11"]:
env["LIBWASMERSUFFIX"] = ".a"
elif env["platform"] in ["osx", "macos"]:
env["LIBWASMERSUFFIX"] = ".a"
env.Append(LINKFLAGS=["-framework", "Security"])
elif env["platform"] == "windows":
if env.get("use_mingw"): # MinGW
if env.get("use_mingw"): # MinGW
env["LIBWASMERSUFFIX"] = ".a"
env.Append(LIBS=["userenv"])
else: # MSVC
else: # MSVC
env["LIBWASMERSUFFIX"] = ".lib"
# Force Windows SDK library suffix (see https://github.com/godotengine/godot/issues/23687)
env.Append(LINKFLAGS=["bcrypt.lib", "userenv.lib", "ws2_32.lib", "advapi32.lib"])
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def can_build(env, platform):
return platform in ["linux", "linuxbsd", "windows", "osx", "macos"]
return platform in ["linux", "linuxbsd", "x11," "windows", "osx", "macos"]


def configure(env):
Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def download_wasmer(env, force=False, version=VERSION_DEFAULT):
{"wasmer/lib/libwasmer.a": "wasmer/lib/libwasmer.arm64.a"},
)
os.system("lipo wasmer/lib/libwasmer.*64.a -output wasmer/lib/libwasmer.a -create")
elif env["platform"] in ["linux", "linuxbsd"]:
elif env["platform"] in ["linux", "linuxbsd", "x11"]:
download_tarfile(BASE_URL.format(version, "linux-amd64"), "wasmer")
elif env["platform"] == "windows":
if env.get("use_mingw"):
Expand Down

0 comments on commit eea765c

Please sign in to comment.