Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lcidlc/lclink.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Dependencies are calculated from the .ios file that lists which libraries and frameworks to link
# against.
if [ "$LIVECODE_DEP_FILE" == "" ]; then
LIVECODE_DEP_FILE="$SRCROOT/$PRODUCT_NAME.ios"
fi

read SDK_MAJORVERSION SDK_MINORVERSION <<<${SDK_NAME//[^0-9]/ }
read SDK_PLATFORM <<<${SDK_NAME//[0-9.]/ }

if [ "$LIVECODE_DEP_FILE" == "" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@livecodepanos sorry. Little late to the review. This change is not necessary and should be reverted because lclidl based externals have a different mechanism for conditional inclusion of frameworks

if [[ $SDK_MAJORVERSION -ge 14 && $PRODUCT_NAME == "standalone" ]] ; then
LIVECODE_DEP_FILE="$SRCROOT/${PRODUCT_NAME}14.ios"
else
LIVECODE_DEP_FILE="$SRCROOT/$PRODUCT_NAME.ios"
fi
fi

if [ -f "$LIVECODE_DEP_FILE" ]; then

DEPS=$(cat "$LIVECODE_DEP_FILE")
Expand Down
15 changes: 12 additions & 3 deletions tools/build-extension-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ SYMBOLS=$1
SYMBOLS_FILE=$2
COPY_PATH=$3

DEPS=`cat "$SRCROOT/$PRODUCT_NAME.ios"`
read SDK_MAJORVERSION SDK_MINORVERSION <<<${SDK_NAME//[^0-9]/ }

if [[ $SDK_MAJORVERSION -ge 14 && "$PRODUCT_NAME" == "standalone" ]] ; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@livecodepanos I think this means you need to add this file for each of the externals. Perhaps check if it's there and fallback?

DEPS_PATH="$SRCROOT/${PRODUCT_NAME}14.ios"
else
DEPS_PATH="$SRCROOT/$PRODUCT_NAME.ios"
fi

DEPS=`cat $DEPS_PATH`

DEPS=${DEPS//library /-l}
DEPS=${DEPS//framework /-framework }

Expand Down Expand Up @@ -68,7 +77,7 @@ if [ -z "$FAT_INFO" -o $BUILD_DYLIB -eq 1 ]; then
exit $?
fi

$BIN_DIR/g++ -stdlib=libc++ -nodefaultlibs $STRIP_OPTIONS ${ARCHS} $MIN_OS_VERSION -isysroot $SDKROOT -L"$SOLUTION_DIR/prebuilt/lib/ios/$SDK_NAME" -o "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.lcext" "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME" -Wl,-sectcreate -Wl,__MISC -Wl,__deps -Wl,"$SRCROOT/$PRODUCT_NAME.ios" -Wl,-exported_symbol -Wl,___libinfoptr_$PRODUCT_NAME $STATIC_DEPS
$BIN_DIR/g++ -stdlib=libc++ -nodefaultlibs $STRIP_OPTIONS ${ARCHS} $MIN_OS_VERSION -isysroot $SDKROOT -L"$SOLUTION_DIR/prebuilt/lib/ios/$SDK_NAME" -o "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.lcext" "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME" -Wl,-sectcreate -Wl,__MISC -Wl,__deps -Wl,$DEPS_PATH -Wl,-exported_symbol -Wl,___libinfoptr_$PRODUCT_NAME $STATIC_DEPS

if [ $? -ne 0 ]; then
exit $?
Expand Down Expand Up @@ -102,7 +111,7 @@ else
fi
fi

OUTPUT=$($BIN_DIR/g++ -stdlib=libc++ -nodefaultlibs $STRIP_OPTIONS -arch ${ARCH} -miphoneos-version-min=${MIN_VERSION} -isysroot $SDKROOT -L"$SOLUTION_DIR/prebuilt/lib/ios/$SDK_NAME" -o "${LCEXT_FILE}" "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME" -Wl,-sectcreate -Wl,__MISC -Wl,__deps -Wl,"$SRCROOT/$PRODUCT_NAME.ios" -Wl,-exported_symbol -Wl,___libinfoptr_$PRODUCT_NAME $STATIC_DEPS)
OUTPUT=$($BIN_DIR/g++ -stdlib=libc++ -nodefaultlibs $STRIP_OPTIONS -arch ${ARCH} -miphoneos-version-min=${MIN_VERSION} -isysroot $SDKROOT -L"$SOLUTION_DIR/prebuilt/lib/ios/$SDK_NAME" -o "${LCEXT_FILE}" "$BUILT_PRODUCTS_DIR/$EXECUTABLE_NAME" -Wl,-sectcreate -Wl,__MISC -Wl,__deps -Wl,$DEPS_PATH -Wl,-exported_symbol -Wl,___libinfoptr_$PRODUCT_NAME $STATIC_DEPS)

if [ $? -ne 0 ]; then
echo "Linking ""${LCEXT_FILE}""failed:"
Expand Down