node-sword-interface 1.0.61 → 1.0.63
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
CHANGED
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"target_name": "node_sword_interface",
|
|
74
|
-
"type": "shared_library",
|
|
75
74
|
"cflags!": [ "-fno-exceptions" ],
|
|
76
75
|
"cflags_cc!": [ "-fno-exceptions -std=c++11 -pthread" ],
|
|
77
76
|
"sources": [
|
|
@@ -96,6 +95,7 @@
|
|
|
96
95
|
],
|
|
97
96
|
"conditions":[
|
|
98
97
|
["is_ios==1", {
|
|
98
|
+
"type": "shared_library",
|
|
99
99
|
'include_dirs': [
|
|
100
100
|
"<(module_root_dir)/src/sword_backend",
|
|
101
101
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
@@ -195,5 +195,40 @@
|
|
|
195
195
|
"<!(node -p \"require('node-addon-api').gyp\")"
|
|
196
196
|
],
|
|
197
197
|
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"target_name": "node_sword_interface.framework",
|
|
201
|
+
"type": "none",
|
|
202
|
+
"dependencies": [ "node_sword_interface" ],
|
|
203
|
+
"conditions": [
|
|
204
|
+
["is_ios==1", {
|
|
205
|
+
"actions": [
|
|
206
|
+
{
|
|
207
|
+
"action_name": "create_framework",
|
|
208
|
+
"inputs": [],
|
|
209
|
+
"outputs": ["<(PRODUCT_DIR)/node_sword_interface.framework"],
|
|
210
|
+
"action": [
|
|
211
|
+
"sh",
|
|
212
|
+
"scripts/ios_framework_postbuild.sh",
|
|
213
|
+
"<(PRODUCT_DIR)",
|
|
214
|
+
"node_sword_interface"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}]
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"target_name": "cleanup",
|
|
223
|
+
"type": "none",
|
|
224
|
+
"dependencies": [ "node_sword_interface" ],
|
|
225
|
+
"actions": [
|
|
226
|
+
{
|
|
227
|
+
"action_name": "clean_build_artifacts",
|
|
228
|
+
"inputs": [],
|
|
229
|
+
"outputs": ["<(PRODUCT_DIR)/cleanup.stamp"],
|
|
230
|
+
"action": [ "sh", "scripts/cleanup_build_artifacts.sh", "<(PRODUCT_DIR)/cleanup.stamp" ]
|
|
231
|
+
}
|
|
232
|
+
]
|
|
198
233
|
}]
|
|
199
234
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# Accept arguments from GYP, or fallback to Xcode env vars
|
|
5
|
+
# Arg 1: Build Directory (where the binary is)
|
|
6
|
+
# Arg 2: Executable Name
|
|
7
|
+
BUILD_DIR="${1:-$BUILT_PRODUCTS_DIR}"
|
|
8
|
+
EXECUTABLE_NAME="${2:-$EXECUTABLE_PATH}"
|
|
9
|
+
|
|
10
|
+
# Fallback for executable name if not provided or in env
|
|
11
|
+
if [ -z "$EXECUTABLE_NAME" ]; then
|
|
12
|
+
EXECUTABLE_NAME="node_sword_interface"
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
FRAMEWORK_NAME="node_sword_interface"
|
|
16
|
+
FRAMEWORK_DIR="${BUILD_DIR}/${FRAMEWORK_NAME}.framework"
|
|
17
|
+
BINARY_SOURCE="${BUILD_DIR}/${EXECUTABLE_NAME}.dylib"
|
|
18
|
+
|
|
19
|
+
echo "Creating iOS Framework structure at ${FRAMEWORK_DIR}"
|
|
20
|
+
echo "Using binary: ${BINARY_SOURCE}"
|
|
21
|
+
|
|
22
|
+
# Ensure the framework directory exists
|
|
23
|
+
mkdir -p "${FRAMEWORK_DIR}"
|
|
24
|
+
|
|
25
|
+
# Copy the binary
|
|
26
|
+
cp "${BINARY_SOURCE}" "${FRAMEWORK_DIR}/${FRAMEWORK_NAME}"
|
|
27
|
+
|
|
28
|
+
# Create Info.plist
|
|
29
|
+
cat > "${FRAMEWORK_DIR}/Info.plist" <<PLIST_EOF
|
|
30
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
31
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
32
|
+
<plist version="1.0">
|
|
33
|
+
<dict>
|
|
34
|
+
<key>CFBundleExecutable</key>
|
|
35
|
+
<string>${FRAMEWORK_NAME}</string>
|
|
36
|
+
<key>CFBundleIdentifier</key>
|
|
37
|
+
<string>net.ezrabibleapp.${FRAMEWORK_NAME}</string>
|
|
38
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
39
|
+
<string>6.0</string>
|
|
40
|
+
<key>CFBundleName</key>
|
|
41
|
+
<string>${FRAMEWORK_NAME}</string>
|
|
42
|
+
<key>CFBundlePackageType</key>
|
|
43
|
+
<string>FMWK</string>
|
|
44
|
+
<key>CFBundleShortVersionString</key>
|
|
45
|
+
<string>1.0</string>
|
|
46
|
+
<key>CFBundleVersion</key>
|
|
47
|
+
<string>1</string>
|
|
48
|
+
<key>MinimumOSVersion</key>
|
|
49
|
+
<string>${IPHONEOS_DEPLOYMENT_TARGET}</string>
|
|
50
|
+
<key>CFBundleSupportedPlatforms</key>
|
|
51
|
+
<array>
|
|
52
|
+
<string>iPhoneOS</string>
|
|
53
|
+
</array>
|
|
54
|
+
</dict>
|
|
55
|
+
</plist>
|
|
56
|
+
PLIST_EOF
|
|
57
|
+
|
|
58
|
+
# Sign the framework (ad-hoc)
|
|
59
|
+
/usr/bin/codesign --force --sign - --timestamp=none "${FRAMEWORK_DIR}"
|
|
60
|
+
|
|
61
|
+
# Remove the source binary
|
|
62
|
+
rm "${BINARY_SOURCE}"
|
|
63
|
+
|
|
64
|
+
echo "Framework created successfully."
|