mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-17 02:33:27 +01:00
Change AltStore naming to SideStore
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenterAnalytics
|
||||
${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter
|
||||
${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenterCrashes
|
||||
${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Analytics/AppCenterAnalytics.framework
|
||||
${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Core/AppCenter.framework
|
||||
${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Crashes/AppCenterCrashes.framework
|
||||
@@ -14,20 +14,142 @@ trap 'on_error $LINENO' ERR
|
||||
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
||||
|
||||
|
||||
variant_for_slice()
|
||||
{
|
||||
case "$1" in
|
||||
"AppCenterAnalytics.xcframework/ios-arm64_x86_64-maccatalyst")
|
||||
echo "maccatalyst"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/ios-arm64_i386_x86_64-simulator")
|
||||
echo "simulator"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/macos-arm64_x86_64")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/tvos-arm64_x86_64-simulator")
|
||||
echo "simulator"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/ios-arm64_arm64e_armv7_armv7s")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/tvos-arm64")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenter.xcframework/tvos-arm64_x86_64-simulator")
|
||||
echo "simulator"
|
||||
;;
|
||||
"AppCenter.xcframework/ios-arm64_i386_x86_64-simulator")
|
||||
echo "simulator"
|
||||
;;
|
||||
"AppCenter.xcframework/ios-arm64_x86_64-maccatalyst")
|
||||
echo "maccatalyst"
|
||||
;;
|
||||
"AppCenter.xcframework/ios-arm64_arm64e_armv7_armv7s")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenter.xcframework/macos-arm64_x86_64")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenter.xcframework/tvos-arm64")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/macos-arm64_x86_64")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/tvos-arm64")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/ios-arm64_arm64e_armv7_armv7s")
|
||||
echo ""
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/ios-arm64_x86_64-maccatalyst")
|
||||
echo "maccatalyst"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/tvos-arm64_x86_64-simulator")
|
||||
echo "simulator"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/ios-arm64_i386_x86_64-simulator")
|
||||
echo "simulator"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
archs_for_slice()
|
||||
{
|
||||
case "$1" in
|
||||
"AppCenterAnalytics.xcframework/ios-arm64_x86_64-maccatalyst")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/ios-arm64_i386_x86_64-simulator")
|
||||
echo "arm64 i386 x86_64"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/macos-arm64_x86_64")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/tvos-arm64_x86_64-simulator")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/ios-arm64_arm64e_armv7_armv7s")
|
||||
echo "arm64 arm64e armv7 armv7s"
|
||||
;;
|
||||
"AppCenterAnalytics.xcframework/tvos-arm64")
|
||||
echo "arm64"
|
||||
;;
|
||||
"AppCenter.xcframework/tvos-arm64_x86_64-simulator")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenter.xcframework/ios-arm64_i386_x86_64-simulator")
|
||||
echo "arm64 i386 x86_64"
|
||||
;;
|
||||
"AppCenter.xcframework/ios-arm64_x86_64-maccatalyst")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenter.xcframework/ios-arm64_arm64e_armv7_armv7s")
|
||||
echo "arm64 arm64e armv7 armv7s"
|
||||
;;
|
||||
"AppCenter.xcframework/macos-arm64_x86_64")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenter.xcframework/tvos-arm64")
|
||||
echo "arm64"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/macos-arm64_x86_64")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/tvos-arm64")
|
||||
echo "arm64"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/ios-arm64_arm64e_armv7_armv7s")
|
||||
echo "arm64 arm64e armv7 armv7s"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/ios-arm64_x86_64-maccatalyst")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/tvos-arm64_x86_64-simulator")
|
||||
echo "arm64 x86_64"
|
||||
;;
|
||||
"AppCenterCrashes.xcframework/ios-arm64_i386_x86_64-simulator")
|
||||
echo "arm64 i386 x86_64"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
copy_dir()
|
||||
{
|
||||
local source="$1"
|
||||
local destination="$2"
|
||||
|
||||
# Use filter instead of exclude so missing patterns don't throw errors.
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}" "${destination}"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}*\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}"
|
||||
}
|
||||
|
||||
SELECT_SLICE_RETVAL=""
|
||||
|
||||
select_slice() {
|
||||
local paths=("$@")
|
||||
local xcframework_name="$1"
|
||||
xcframework_name="${xcframework_name##*/}"
|
||||
local paths=("${@:2}")
|
||||
# Locate the correct slice of the .xcframework for the current architectures
|
||||
local target_path=""
|
||||
|
||||
@@ -43,29 +165,15 @@ select_slice() {
|
||||
fi
|
||||
for i in ${!paths[@]}; do
|
||||
local matched_all_archs="1"
|
||||
for target_arch in $target_archs
|
||||
do
|
||||
if ! [[ "${paths[$i]}" == *"$target_variant"* ]]; then
|
||||
local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")"
|
||||
local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")"
|
||||
for target_arch in $target_archs; do
|
||||
if ! [[ "${slice_variant}" == "$target_variant" ]]; then
|
||||
matched_all_archs="0"
|
||||
break
|
||||
fi
|
||||
|
||||
# Verifies that the path contains the variant string (simulator or maccatalyst) if the variant is set.
|
||||
if [[ -z "$target_variant" && ("${paths[$i]}" == *"simulator"* || "${paths[$i]}" == *"maccatalyst"*) ]]; then
|
||||
matched_all_archs="0"
|
||||
break
|
||||
fi
|
||||
|
||||
# This regex matches all possible variants of the arch in the folder name:
|
||||
# Let's say the folder name is: ios-armv7_armv7s_arm64_arm64e/CoconutLib.framework
|
||||
# We match the following: -armv7_, _armv7s_, _arm64_ and _arm64e/.
|
||||
# If we have a specific variant: ios-i386_x86_64-simulator/CoconutLib.framework
|
||||
# We match the following: -i386_ and _x86_64-
|
||||
# When the .xcframework wraps a static library, the folder name does not include
|
||||
# any .framework. In that case, the folder name can be: ios-arm64_armv7
|
||||
# We also match _armv7$ to handle that case.
|
||||
local target_arch_regex="[_\-]${target_arch}([\/_\-]|$)"
|
||||
if ! [[ "${paths[$i]}" =~ $target_arch_regex ]]; then
|
||||
if ! echo "${slice_archs}" | tr " " "\n" | grep -F -q -x "$target_arch"; then
|
||||
matched_all_archs="0"
|
||||
break
|
||||
fi
|
||||
@@ -80,60 +188,17 @@ select_slice() {
|
||||
done
|
||||
}
|
||||
|
||||
install_library() {
|
||||
local source="$1"
|
||||
local name="$2"
|
||||
local destination="${PODS_XCFRAMEWORKS_BUILD_DIR}/${name}"
|
||||
|
||||
# Libraries can contain headers, module maps, and a binary, so we'll copy everything in the folder over
|
||||
|
||||
local source="$binary"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}/*\" \"${destination}\""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}/*" "${destination}"
|
||||
}
|
||||
|
||||
# Copies a framework to derived data for use in later build phases
|
||||
install_framework()
|
||||
{
|
||||
local source="$1"
|
||||
local name="$2"
|
||||
local destination="${PODS_XCFRAMEWORKS_BUILD_DIR}/${name}"
|
||||
|
||||
if [ ! -d "$destination" ]; then
|
||||
mkdir -p "$destination"
|
||||
fi
|
||||
|
||||
copy_dir "$source" "$destination"
|
||||
echo "Copied $source to $destination"
|
||||
}
|
||||
|
||||
install_xcframework_library() {
|
||||
local basepath="$1"
|
||||
local name="$2"
|
||||
local paths=("$@")
|
||||
|
||||
# Locate the correct slice of the .xcframework for the current architectures
|
||||
select_slice "${paths[@]}"
|
||||
local target_path="$SELECT_SLICE_RETVAL"
|
||||
if [[ -z "$target_path" ]]; then
|
||||
echo "warning: [CP] Unable to find matching .xcframework slice in '${paths[@]}' for the current build architectures ($ARCHS)."
|
||||
return
|
||||
fi
|
||||
|
||||
install_framework "$basepath/$target_path" "$name"
|
||||
}
|
||||
|
||||
install_xcframework() {
|
||||
local basepath="$1"
|
||||
local name="$2"
|
||||
local package_type="$3"
|
||||
local paths=("$@")
|
||||
local paths=("${@:4}")
|
||||
|
||||
# Locate the correct slice of the .xcframework for the current architectures
|
||||
select_slice "${paths[@]}"
|
||||
select_slice "${basepath}" "${paths[@]}"
|
||||
local target_path="$SELECT_SLICE_RETVAL"
|
||||
if [[ -z "$target_path" ]]; then
|
||||
echo "warning: [CP] Unable to find matching .xcframework slice in '${paths[@]}' for the current build architectures ($ARCHS)."
|
||||
echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})."
|
||||
return
|
||||
fi
|
||||
local source="$basepath/$target_path"
|
||||
@@ -145,11 +210,10 @@ install_xcframework() {
|
||||
fi
|
||||
|
||||
copy_dir "$source/" "$destination"
|
||||
|
||||
echo "Copied $source to $destination"
|
||||
}
|
||||
|
||||
install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterAnalytics.xcframework" "AppCenterAnalytics" "framework" "ios-arm64_x86_64-maccatalyst" "ios-arm64_i386_x86_64-simulator" "ios-arm64_arm64e_armv7_armv7s"
|
||||
install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenter.xcframework" "AppCenter" "framework" "ios-arm64_i386_x86_64-simulator" "ios-arm64_x86_64-maccatalyst" "ios-arm64_arm64e_armv7_armv7s"
|
||||
install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterCrashes.xcframework" "AppCenterCrashes" "framework" "ios-arm64_arm64e_armv7_armv7s" "ios-arm64_x86_64-maccatalyst" "ios-arm64_i386_x86_64-simulator"
|
||||
install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterAnalytics.xcframework" "AppCenter/Analytics" "framework" "ios-arm64_x86_64-maccatalyst" "ios-arm64_i386_x86_64-simulator" "ios-arm64_arm64e_armv7_armv7s"
|
||||
install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenter.xcframework" "AppCenter/Core" "framework" "ios-arm64_i386_x86_64-simulator" "ios-arm64_x86_64-maccatalyst" "ios-arm64_arm64e_armv7_armv7s"
|
||||
install_xcframework "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterCrashes.xcframework" "AppCenter/Crashes" "framework" "ios-arm64_arm64e_armv7_armv7s" "ios-arm64_x86_64-maccatalyst" "ios-arm64_i386_x86_64-simulator"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AppCenter
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenterAnalytics" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenterCrashes"
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Analytics" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Core" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Crashes"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"z" -framework "CoreTelephony" -framework "Foundation" -framework "SystemConfiguration" -framework "UIKit"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AppCenter
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenterAnalytics" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenterCrashes"
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Analytics" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Core" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppCenter/Crashes"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_LDFLAGS = $(inherited) -l"c++" -l"sqlite3" -l"z" -framework "CoreTelephony" -framework "Foundation" -framework "SystemConfiguration" -framework "UIKit"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
|
||||
Reference in New Issue
Block a user