Skip to content

Commit 7ef3bea

Browse files
authored
Merge pull request #85 from Ivorforce/unified-names
2 parents 96a28e5 + a009ff6 commit 7ef3bea

File tree

2 files changed

+56
-22
lines changed

2 files changed

+56
-22
lines changed

SConstruct

+7-4
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,18 @@ if env["target"] in ["editor", "template_debug"]:
5353
except AttributeError:
5454
print("Not including class reference as we're targeting a pre-4.3 baseline.")
5555

56-
file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])
56+
# .dev doesn't inhibit compatibility, so we don't need to key it.
57+
# .universal just means "compatible with all relevant arches" so we don't need to key it.
58+
suffix = env['suffix'].replace(".dev", "").replace(".universal", "")
59+
60+
lib_filename = "{}{}{}{}".format(env.subst('$SHLIBPREFIX'), libname, suffix, env.subst('$SHLIBSUFFIX'))
5761

58-
libraryfile = "bin/{}/{}".format(env["platform"], file)
5962
library = env.SharedLibrary(
60-
libraryfile,
63+
"bin/{}/{}".format(env['platform'], lib_filename),
6164
source=sources,
6265
)
6366

64-
copy = env.InstallAs("{}/bin/{}/lib{}".format(projectdir, env["platform"], file), library)
67+
copy = env.Install("{}/bin/{}/".format(projectdir, env["platform"]), library)
6568

6669
default_args = [library, copy]
6770
Default(*default_args)

demo/bin/example.gdextension

+49-18
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,52 @@ compatibility_minimum = "4.1"
55

66
[libraries]
77
; Relative paths ensure that our GDExtension can be placed anywhere in the project directory.
8-
macos.debug = "./macos/libEXTENSION-NAME.macos.template_debug.universal.dylib"
9-
macos.release = "./macos/libEXTENSION-NAME.macos.template_release.universal.dylib"
10-
ios.debug = "./ios/libEXTENSION-NAME.ios.template_debug.arm64.dylib"
11-
ios.release = "./ios/libEXTENSION-NAME.ios.template_release.arm64.dylib"
12-
windows.debug.x86_32 = "./windows/libEXTENSION-NAME.windows.template_debug.x86_32.dll"
13-
windows.release.x86_32 = "./windows/libEXTENSION-NAME.windows.template_release.x86_32.dll"
14-
windows.debug.x86_64 = "./windows/libEXTENSION-NAME.windows.template_debug.x86_64.dll"
15-
windows.release.x86_64 = "./windows/libEXTENSION-NAME.windows.template_release.x86_64.dll"
16-
linux.debug.x86_64 = "./linux/libEXTENSION-NAME.linux.template_debug.x86_64.so"
17-
linux.release.x86_64 = "./linux/libEXTENSION-NAME.linux.template_release.x86_64.so"
18-
linux.debug.arm64 = "./linux/libEXTENSION-NAME.linux.template_debug.arm64.so"
19-
linux.release.arm64 = "./linux/libEXTENSION-NAME.linux.template_release.arm64.so"
20-
linux.debug.rv64 = "./linux/libEXTENSION-NAME.linux.template_debug.rv64.so"
21-
linux.release.rv64 = "./linux/libEXTENSION-NAME.linux.template_release.rv64.so"
22-
android.debug.x86_64 = "./android/libEXTENSION-NAME.android.template_debug.x86_64.so"
23-
android.release.x86_64 = "./android/libEXTENSION-NAME.android.template_release.x86_64.so"
24-
android.debug.arm64 = "./android/libEXTENSION-NAME.android.template_debug.arm64.so"
25-
android.release.arm64 = "./android/libEXTENSION-NAME.android.template_release.arm64.so"
8+
macos.single.debug = "./macos/libEXTENSION-NAME.macos.template_debug.dylib"
9+
macos.double.debug = "./macos/libEXTENSION-NAME.macos.template_debug.double.dylib"
10+
macos.single.release = "./macos/libEXTENSION-NAME.macos.template_release.dylib"
11+
macos.double.release = "./macos/libEXTENSION-NAME.macos.template_debug.double.dylib"
12+
13+
ios.arm64.single.debug = "./ios/libEXTENSION-NAME.ios.template_debug.arm64.dylib"
14+
ios.arm64.double.debug = "./ios/libEXTENSION-NAME.ios.template_debug.arm64.double.dylib"
15+
ios.arm64.single.release = "./ios/libEXTENSION-NAME.ios.template_release.arm64.dylib"
16+
ios.arm64.double.release = "./ios/libEXTENSION-NAME.ios.template_release.arm64.double.dylib"
17+
18+
windows.x86_32.single.debug = "./windows/EXTENSION-NAME.windows.template_debug.x86_32.dll"
19+
windows.x86_32.double.debug = "./windows/EXTENSION-NAME.windows.template_debug.x86_32.double.dll"
20+
windows.x86_32.single.release = "./windows/EXTENSION-NAME.windows.template_release.x86_32.dll"
21+
windows.x86_32.double.release = "./windows/EXTENSION-NAME.windows.template_release.x86_32.double.dll"
22+
23+
windows.x86_64.single.debug = "./windows/EXTENSION-NAME.windows.template_debug.x86_64.dll"
24+
windows.x86_64.double.debug = "./windows/EXTENSION-NAME.windows.template_debug.x86_64.double.dll"
25+
windows.x86_64.single.release = "./windows/EXTENSION-NAME.windows.template_release.x86_64.dll"
26+
windows.x86_64.double.release = "./windows/EXTENSION-NAME.windows.template_release.x86_64.double.dll"
27+
28+
linux.x86_64.single.debug = "./linux/libEXTENSION-NAME.linux.template_debug.x86_64.so"
29+
linux.x86_64.double.debug = "./linux/libEXTENSION-NAME.linux.template_debug.x86_64.double.so"
30+
linux.x86_64.single.release = "./linux/libEXTENSION-NAME.linux.template_release.x86_64.so"
31+
linux.x86_64.double.release = "./linux/libEXTENSION-NAME.linux.template_release.x86_64.double.so"
32+
33+
linux.arm64.single.debug = "./linux/libEXTENSION-NAME.linux.template_debug.arm64.so"
34+
linux.arm64.double.debug = "./linux/libEXTENSION-NAME.linux.template_debug.arm64.double.so"
35+
linux.arm64.single.release = "./linux/libEXTENSION-NAME.linux.template_release.arm64.so"
36+
linux.arm64.double.release = "./linux/libEXTENSION-NAME.linux.template_release.arm64.double.so"
37+
38+
linux.rv64.single.debug = "./linux/libEXTENSION-NAME.linux.template_debug.rv64.so"
39+
linux.rv64.double.debug = "./linux/libEXTENSION-NAME.linux.template_debug.rv64.double.so"
40+
linux.rv64.single.release = "./linux/libEXTENSION-NAME.linux.template_release.rv64.so"
41+
linux.rv64.double.release = "./linux/libEXTENSION-NAME.linux.template_release.rv64.double.so"
42+
43+
android.x86_64.single.debug = "./android/libEXTENSION-NAME.android.template_debug.x86_64.so"
44+
android.x86_64.double.debug = "./android/libEXTENSION-NAME.android.template_debug.x86_64.double.so"
45+
android.x86_64.single.release = "./android/libEXTENSION-NAME.android.template_release.x86_64.so"
46+
android.x86_64.double.release = "./android/libEXTENSION-NAME.android.template_release.x86_64.double.so"
47+
48+
android.arm64.single.debug = "./android/libEXTENSION-NAME.android.template_debug.arm64.so"
49+
android.arm64.double.debug = "./android/libEXTENSION-NAME.android.template_debug.arm64.double.so"
50+
android.arm64.single.release = "./android/libEXTENSION-NAME.android.template_release.arm64.so"
51+
android.arm64.double.release = "./android/libEXTENSION-NAME.android.template_release.arm64.double.so"
52+
53+
web.wasm32.single.debug = "./web/libEXTENSION-NAME.web.template_debug.wasm32.nothreads.wasm"
54+
web.wasm32.double.debug = "./web/libEXTENSION-NAME.web.template_release.wasm32.double.nothreads.wasm"
55+
web.wasm32.single.release = "./web/libEXTENSION-NAME.web.template_release.wasm32.nothreads.wasm"
56+
web.wasm32.double.release = "./web/libEXTENSION-NAME.web.template_release.wasm32.double.nothreads.wasm"

0 commit comments

Comments
 (0)