Skip to content

Commit

Permalink
chore: re-trying ios sdk previous fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Jun 18, 2024
1 parent 5e43065 commit d8a2e19
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "13.3.1"

- name: "Log xcode version"
run: xcodebuild -version

- name: "Log available xcodes"
run: ls -l /Applications

- name: "Log xcode sdks"
run: xcodebuild -showsdks

- name: "Log MacOSX SDKs"
run: ls -l /Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

# - name: "Link MacOSX.sdk to MacOSX12.sdk"
# run: ln -sfn /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

- uses: ningenMe/setup-rustup@v1.1.0

- name: Install Make
Expand All @@ -25,10 +41,7 @@ jobs:
run: make mac-setup

- name: Build Apple
env:
APPLE_XCODE_APP_NAME: Xcode_13.3.1.app
APPLE_MACOSX_SDK: MacOSX13
run: rm -f /usr/local/lib/libjpeg* ; make aarch64-apple-ios
run: rm -f /usr/local/lib/libjpeg* ; make apple

- name: Upload Apple Artifacts
uses: actions/upload-artifact@v3
Expand Down
27 changes: 9 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,15 @@ APPLE_BUILD := $(BUILD)/$(APPLE)
APPLE_IOS := ios
APPLE_IOS_PLATFORM := iPhoneOS
APPLE_IOS_SDK ?= iPhoneOS
APPLE_IOS_VERSION_MIN ?= 15.4
APPLE_XCODE_APP_NAME ?= Xcode.app
APPLE_IOS_VERSION_MIN ?= 11.0

APPLE_IOS_SIMULATOR := ios-simulator
APPLE_IOS_SIMULATOR_PLATFORM := iPhoneSimulator
APPLE_IOS_SIMULATOR_SDK ?= iPhoneSimulator

APPLE_MACOSX := macosx
APPLE_MACOSX_PLATFORM := MacOSX
APPLE_MACOSX_SDK ?= MacOSX
APPLE_MACOSX_SDK ?= MacOSX12.3

APPLE_IOS_FRAMEWORK_TYPE := $(APPLE_IOS)
APPLE_IOS_SIMULATOR_FRAMEWORK_TYPE := $(APPLE_IOS_SIMULATOR)
Expand Down Expand Up @@ -204,14 +203,14 @@ endef

define APPLE_CROSS_FILE
[binaries]
cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk']
cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk']
ld = 'ld'
ar = 'ar'
strip = 'strip'
pkg-config = 'pkg-APPLE_MACOSX_SDKconfig'
pkg-config = 'pkg-config'

[properties]
root = '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(SDK).platform/Developer'
root = '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(SDK).platform/Developer'
has_function_printf = true

$(if $(filter $(PLATFORM),$(APPLE_IOS_PLATFORM) $(APPLE_IOS_SIMULATOR_PLATFORM)),\
Expand Down Expand Up @@ -315,6 +314,7 @@ define SETUP_MESON
-Ddefault_library=static \
-Dbindings=capi \
-Dlog=$(LOG) \
-Dthreads=false \
-Dstatic=$(STATIC) \
-Dextra=$(EXTRA) \
$(CROSS_FILE) "$(THORVG_DEP_SOURCE_DIR)" "$(THORVG_DEP_BUILD_DIR)"
Expand Down Expand Up @@ -400,14 +400,6 @@ define LIPO_CREATE
-o $@
endef

MIN_OS_VERSION_IOS=15.4
MIN_OS_VERSION_MACOS=12
ifneq (,$(findstring MacOSX,$(PLIST_ENABLE)))
MIN_OS_VERSION = $(MIN_OS_VERSION_IOS)
else
MIN_OS_VERSION = $(MIN_OS_VERSION_MACOS)
endif

define CREATE_FRAMEWORK
rm -rf $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK) $(RELEASE)/$(APPLE)/$(DOTLOTTIE_PLAYER_XCFRAMEWORK)
mkdir -p $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/{$(FRAMEWORK_HEADERS),$(FRAMEWORK_MODULES)}
Expand All @@ -422,12 +414,11 @@ define CREATE_FRAMEWORK
-c "Add :CFBundleShortVersionString string 1.0.0" \
-c "Add :CFBundlePackageType string FMWK" \
-c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \
-c "Add :MinimumOSVersion string $(MIN_OS_VERSION)" \
-c "Add :MinimumOSVersion string 15.4" \
-c "Add :CFBundleSupportedPlatforms array" \
$(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \
$(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \
$(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST)

$(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST)

$(INSTALL_NAME_TOOL) -id @rpath/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE)
endef
Expand Down Expand Up @@ -1014,4 +1005,4 @@ help:
@echo " - $(YELLOW)bench$(NC) - run all benchmarks"
@echo " - $(YELLOW)clippy$(NC) - run clippy on all projects"
@echo
@echo
@echo

0 comments on commit d8a2e19

Please sign in to comment.