Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/3.3.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmer Loen committed Mar 13, 2018
2 parents 77ba1ae + f5adf4d commit 5f29d86
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,3 @@ xcuserdata/
/pjsip/
.vscode/*
/lib/

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

---

## [3.3.4](https://github.com/VoIPGRID/Vialer-pjsip-iOS/tree/3.3.4) (13/03/2018)
Released on Tuesday, March 13, 2018
* Added a post compile script to the podspec to combine the VialerPJSIP split archives into one archive

## [3.3.2](https://github.com/VoIPGRID/Vialer-pjsip-iOS/tree/3.3.2) (06/03/2018)
Released on Tuesday, March 6, 2018
* Updated PJSIP to 2.7.2
Expand Down
32 changes: 29 additions & 3 deletions Vialer-pjsip-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Vialer-pjsip-iOS"
s.version = "3.3.2"
s.version = "3.3.4"
s.summary = "PJSIP 2.7.1 for iOS"
s.description = "Pod for distributing PJSIP 2.7.1 wrapped in a framework. With Opus, OpenSSL and openh264."
s.homepage = "https://www.wearespindle.com"
Expand All @@ -22,7 +22,33 @@ Pod::Spec.new do |s|
s.libraries = 'stdc++'
s.frameworks = "AudioToolbox", "AVFoundation", "CFNetwork", "CoreMedia"

s.xcconfig = {
s.script_phase = {
:name => "Combine VialerPJSIP library in one file",
:execution_position => :after_compile,
:script => '
BINARY_FILENAME=VialerPJSIP
SPLIT_FILENAME_PREFIX=${BINARY_FILENAME}_Split
VIALERPJSIP_FRAMEWORK_DIR=${SRCROOT}/Vialer-pjsip-iOS/VialerPJSIP.framework/Versions/Current
VIALERPJSIP_FRAMEWORK_FILE=$VIALERPJSIP_FRAMEWORK_DIR/$BINARY_FILENAME
minimumsize=50000000
actualsize=$(wc -c <"${VIALERPJSIP_FRAMEWORK_FILE}")
if [[ -f "${VIALERPJSIP_FRAMEWORK_FILE}" && $actualsize -ge $minimumsize ]]; then
echo "The library is already combined"
else
cd ${VIALERPJSIP_FRAMEWORK_DIR}
# But we have chunks! ...Probably
if [ -f ${SPLIT_FILENAME_PREFIX}_aa ]; then
echo "Creating file from smaller files with ${SPLIT_FILENAME_PREFIX} prefix"
cat ${SPLIT_FILENAME_PREFIX}_* > ${BINARY_FILENAME}
rm ${SPLIT_FILENAME_PREFIX}_*
fi
fi
'
}
s.xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => 'PJ_AUTOCONF=1',
}
}
end

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 13 additions & 4 deletions vialerbuild
Original file line number Diff line number Diff line change
Expand Up @@ -729,24 +729,33 @@ function create_framework {
PRODUCT_NAME="VialerPJSIP"
PUBLIC_HEADERS_FOLDER_PATH="${BASE_DIR}/Pod/vialer-pjsip-include"
LIBRARY_LOCATION="${BASE_DIR}/Pod/"
export FRAMEWORK_LOCN="${BASE_DIR}/${PRODUCT_NAME}.framework"
FRAMEWORK_LOCN="${BASE_DIR}/${PRODUCT_NAME}.framework"

echo "Creating the $PRODUCT_NAME framework in $FRAMEWORK_LOCN"
copy_headers

# Remove old framework.
echo "Remove old Framework"
rm -rf ${FRAMEWORK_LOCN}

# Create the path to the real Headers dir
mkdir -p "${FRAMEWORK_LOCN}/Versions/A/Headers"

# Create the required symlinks
ln -sfh A "${FRAMEWORK_LOCN}/Versions/Current"
ln -sfh Versions/Current/Headers "${FRAMEWORK_LOCN}/Headers"
ln -sfh "Versions/Current/Headers" "${FRAMEWORK_LOCN}/Headers"
ln -sfh "Versions/Current/${PRODUCT_NAME}" "${FRAMEWORK_LOCN}/${PRODUCT_NAME}"

# Copy the public headers into the framework
cp -a "${PUBLIC_HEADERS_FOLDER_PATH}/" "${FRAMEWORK_LOCN}/Versions/A/Headers"
cp -a "${LIBRARY_LOCATION}/VialerPJSIP.a" "${BASE_DIR}/${PRODUCT_NAME}.framework/Versions/A/${PRODUCT_NAME}"
cp -a "${LIBRARY_LOCATION}/${PRODUCT_NAME}.a" "${FRAMEWORK_LOCN}/Versions/A/${PRODUCT_NAME}"

echo "Split ${PRODUCT_NAME} into small bits for convience."

split -b 30m "${FRAMEWORK_LOCN}/Versions/A/${PRODUCT_NAME}" "${FRAMEWORK_LOCN}/Versions/A/${PRODUCT_NAME}_Split_"
rm "${FRAMEWORK_LOCN}/Versions/A/${PRODUCT_NAME}"

echo "$PRE Adapting the framework's header files"
echo "Adapting the framework's header files"
# Now, replace the include statements of the framework headers
i=0
while IFS= read -r -d '' file; do
Expand Down

0 comments on commit 5f29d86

Please sign in to comment.