Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 3fdecd4

Browse files
committed
[[ CodeResources ]] Add copy param to build-extension-ios
This patch adds an additional option to the `build-extension-ios.sh` script to copy the built library to the specified path.
1 parent 0e1aa09 commit 3fdecd4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

config/ios.gypi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
'variables':
5252
{
5353
'ios_external_symbol_list': '',
54+
'ios_external_copy_to': '',
5455

5556
'app_bundle_suffix': '.ios-engine',
5657
'ext_bundle_suffix': '.ios-extension',
@@ -132,6 +133,7 @@
132133
'<@(_inputs)',
133134
'>(ios_external_symbols)',
134135
'>(ios_external_symbol_list)',
136+
'>(ios_external_copy_to)',
135137
],
136138
},
137139
],

tools/build-extension-ios.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -e
44

55
SYMBOLS=$1
66
SYMBOLS_FILE=$2
7+
COPY_PATH=$3
78

89
DEPS=`cat "$SRCROOT/$PRODUCT_NAME.ios"`
910
DEPS=${DEPS//library /-l}
@@ -131,3 +132,11 @@ else
131132
ln -sf "$PRODUCT_NAME.lcext" "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.ios-extension"
132133
fi
133134

135+
if [ "$COPY_PATH" != "" ]; then
136+
mkdir -p "$COPY_PATH"
137+
if [ $BUILD_DYLIB -eq 1 ]; then
138+
cp -f "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.dylib" "$COPY_PATH/$PRODUCT_NAME.dylib"
139+
else
140+
cp -f "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.lcext" "$COPY_PATH/$PRODUCT_NAME.lcext"
141+
fi
142+
fi

0 commit comments

Comments
 (0)