Skip to content

Commit

Permalink
安卓
Browse files Browse the repository at this point in the history
  • Loading branch information
Daylily-Zeleen committed Apr 14, 2024
1 parent 0e159c7 commit 437a978
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
17 changes: 10 additions & 7 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ gather_sources_recursively(os.path.join(base_dir, "src"))
gather_sources_recursively(os.path.join(base_dir, "gen", "src"))


platform = env["platform"]


if env.get("is_msvc", False):
env.Append(CXXFLAGS=["/bigobj"])
env.Append(LIBPATH=[eos_sdk_folder + "Lib/"])

env.Append(LIBPATH=[eos_sdk_folder + "Bin/"])

if env["platform"] == "windows":
# TODO: dont ignore this warning
# this disables LINK : error LNK1218: warning treated as error;
# so that it can build in github action with scons cache
env.Append(LINKFLAGS=["/ignore:4099"])

env.Append(LIBPATH=[eos_sdk_folder + "Lib/"])
if "64" in env["arch"]:
env.Append(LIBS=["EOSSDK-Win64-Shipping"])
else:
env.Append(LIBS=["EOSSDK-Win32-Shipping"])


elif env["platform"] == "linux":
env.Append(LIBS=["EOSSDK-Linux-Shipping"])

Expand Down Expand Up @@ -97,10 +97,13 @@ else:
source=sources,
)


platform = env["platform"]
arch = env["arch"]
compile_target = env["target"]
suffix = env.get("suffix", "")
shared_lib_suffix = env['SHLIBSUFFIX']
shared_lib_suffix = env["SHLIBSUFFIX"]


def copy_file(from_path, to_path):
if not os.path.exists(os.path.dirname(to_path)):
Expand Down Expand Up @@ -144,8 +147,8 @@ def on_complete(target, source, env):
elif platform == "macos":
copy_file(eos_sdk_folder + "Bin/libEOSSDK-Mac-Shipping.dylib", plugin_bin_folder + "/macos/libEOSSDK-Mac-Shipping.dylib")

elif platform == "android":
copy_file(eos_sdk_folder + f"Bin/Android/static-stdc++/libs/{eos_android_arch}/libEOSSDK.so", plugin_bin_folder + f"/android/{arch}/libEOSSDK.so")
# elif platform == "android":
# copy_file(eos_sdk_folder + f"Bin/Android/static-stdc++/libs/{eos_android_arch}/libEOSSDK.so", plugin_bin_folder + f"/android/{arch}/libEOSSDK.so")

# 更新.gdextension中的版本信息
f = open(extension_file, "r", encoding="utf8")
Expand Down
8 changes: 0 additions & 8 deletions demo/addons/gd-eos/gdeos.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,3 @@ macos.release = {"bin/macos/libEOSSDK-Mac-Shipping.dylib": ""}
linux.debug.x86_64 = {"bin/linux/libEOSSDK-Linux-Shipping.so": ""}
linux.release.x86_64 = {"bin/linux/libEOSSDK-Linux-Shipping.so": ""}

android.debug.arm64 = {"bin/android/arm64/libEOSSDK.so": ""}
android.release.arm64 = {"bin/android/arm64/libEOSSDK.so": ""}
android.debug.x86_64 = {"bin/android/x86_64/libEOSSDK.so": ""}
android.release.x86_64 = {"bin/android/x86_64/libEOSSDK.so": ""}
android.debug.arm32 = {"bin/android/arm32/libEOSSDK.so": ""}
android.release.arm32 = {"bin/android/arm32/libEOSSDK.so": ""}
android.debug.x86_32 = {"bin/android/x86_32/libEOSSDK.so": ""}
android.release.x86_32 = {"bin/android/x86_32/libEOSSDK.so": ""}

0 comments on commit 437a978

Please sign in to comment.