node-sword-interface 1.0.76 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +3 -19
- package/package.json +1 -1
- package/scripts/build_sword.sh +0 -2
package/binding.gyp
CHANGED
|
@@ -4,13 +4,7 @@
|
|
|
4
4
|
"is_ios%": "<!(python3 -c \"import os; sdk = os.environ.get('SDKROOT', ''); print(1 if 'iPhone' in sdk or os.environ.get('PLATFORM') == 'ios' else 0)\")",
|
|
5
5
|
|
|
6
6
|
# 2. Get the deployment target (e.g., '15.0') from env, default to '13.0'
|
|
7
|
-
"ios_ver%": "<!(python3 -c \"import os; print(os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'))\")"
|
|
8
|
-
|
|
9
|
-
# 3. Construct the full target triple dynamically
|
|
10
|
-
"ios_target": "<!(python3 -c \"import os; ver = os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'); suffix = '-simulator' if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else ''; print(f'arm64-apple-ios{ver}{suffix}')\")",
|
|
11
|
-
|
|
12
|
-
# 4. Detect the SDK to use (iphoneos or iphonesimulator)
|
|
13
|
-
"ios_sdk": "<!(python3 -c \"import os; print('iphonesimulator' if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else 'iphoneos')\")"
|
|
7
|
+
"ios_ver%": "<!(python3 -c \"import os; print(os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'))\")"
|
|
14
8
|
},
|
|
15
9
|
"targets": [
|
|
16
10
|
{
|
|
@@ -18,17 +12,13 @@
|
|
|
18
12
|
'type': 'none',
|
|
19
13
|
'conditions': [
|
|
20
14
|
["is_ios==1", {
|
|
21
|
-
"xcode_settings": {
|
|
22
|
-
"SDKROOT": "<(ios_sdk)",
|
|
23
|
-
"IPHONEOS_DEPLOYMENT_TARGET": "<(ios_ver)"
|
|
24
|
-
},
|
|
25
15
|
'actions': [
|
|
26
16
|
{
|
|
27
17
|
'action_name': 'build_sword',
|
|
28
18
|
'message': 'Building sword library for iOS...',
|
|
29
19
|
'inputs': [],
|
|
30
20
|
'outputs': ['sword_build/libsword.a'],
|
|
31
|
-
'action': ['./scripts/build_sword.sh', '--ios', '
|
|
21
|
+
'action': ['./scripts/build_sword.sh', '--ios', '${PLATFORM_NAME}', '<(ios_ver)'],
|
|
32
22
|
}
|
|
33
23
|
]
|
|
34
24
|
}],
|
|
@@ -120,19 +110,13 @@
|
|
|
120
110
|
'sword'
|
|
121
111
|
],
|
|
122
112
|
"xcode_settings": {
|
|
123
|
-
"SDKROOT": "<(ios_sdk)",
|
|
124
|
-
"IPHONEOS_DEPLOYMENT_TARGET": "<(ios_ver)",
|
|
125
113
|
"ONLY_ACTIVE_ARCH": "YES",
|
|
126
|
-
"OTHER_CFLAGS": [
|
|
127
|
-
"-target <(ios_target)"
|
|
128
|
-
],
|
|
129
114
|
"OTHER_LDFLAGS": [
|
|
130
115
|
"-dynamiclib",
|
|
131
116
|
"-install_name @rpath/node_sword_interface.framework/node_sword_interface",
|
|
132
117
|
"-undefined dynamic_lookup",
|
|
133
118
|
"-Wl,-bind_at_load",
|
|
134
|
-
"-all_load"
|
|
135
|
-
"-target <(ios_target)"
|
|
119
|
+
"-all_load"
|
|
136
120
|
],
|
|
137
121
|
"MACH_O_TYPE": "mh_dylib",
|
|
138
122
|
"PRODUCT_TYPE": "com.apple.product-type.framework"
|
package/package.json
CHANGED
package/scripts/build_sword.sh
CHANGED
|
@@ -104,8 +104,6 @@ elif [ "$1" = "--ios" ] ; then
|
|
|
104
104
|
-DCMAKE_OSX_SYSROOT=$SYSROOT \
|
|
105
105
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=$IOS_VER \
|
|
106
106
|
-DCMAKE_BUILD_TYPE=$SWORD_BUILD_TYPE \
|
|
107
|
-
-DNODYNCAST=1 \
|
|
108
|
-
-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \
|
|
109
107
|
../sword
|
|
110
108
|
else
|
|
111
109
|
# macOS & Linux
|