diff --git a/ion/src/sdl/ios/Info.plist b/ion/src/sdl/ios/Info.plist index ae06bbe5a..b4541a833 100644 --- a/ion/src/sdl/ios/Info.plist +++ b/ion/src/sdl/ios/Info.plist @@ -2,18 +2,16 @@ - BuildMachineOSBuild - 18B75 CFBundleDevelopmentRegion en CFBundleExecutable Epsilon CFBundleIdentifier - com.blabla.PlifPlouf + com.numworks.calculator CFBundleInfoDictionaryVersion 6.0 CFBundleName - PlifPlouf + NumWorks Graphing Calculator CFBundlePackageType APPL CFBundleShortVersionString @@ -24,12 +22,6 @@ CFBundleVersion 1 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 10B61 - DTPlatformName - iphonesimulator DTPlatformVersion 12.1 DTSDKBuild @@ -47,11 +39,21 @@ UIRequiredDeviceCapabilities - armv7 UILaunchStoryboardName launch UISupportedInterfaceOrientations + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + diff --git a/ion/src/sdl/ios/Makefile b/ion/src/sdl/ios/Makefile index 9d5c9642e..8e6648431 100644 --- a/ion/src/sdl/ios/Makefile +++ b/ion/src/sdl/ios/Makefile @@ -3,3 +3,72 @@ src += $(addprefix ion/src/sdl/ios/, \ ) $(call object_for,ion/src/sdl/shared/main.cpp) : SFLAGS += -DEPSILON_SDL_FULLSCREEN=1 + + +# Cross-ARCH epsilon.bin + +.PHONY: force_remake + +$(BUILD_DIR)/%/epsilon.bin: force_remake + $(Q) echo "MAKE ARCH=$*" + $(Q) $(MAKE) ARCH=$* + +ARCHS ?= x86_64 + +# iOS resources + +ios_resource = $(addprefix $(BUILD_DIR)/app/Payload/Epsilon.app/,$(1)) + +$(BUILD_DIR)/app/entitlements.plist: ion/src/sdl/ios/entitlements.plist + $(call rule_label,PLUTIL) + $(Q) cp $^ $@ + $(Q) plutil -insert "com\.apple\.developer\.team-identifier" -string "$(IOS_IDENTIFIER)" $@ + $(Q) plutil -insert "application-identifier" -string "$(IOS_IDENTIFIER).com.numworks.calculator" $@ + $(Q) plutil -insert "keychain-access-groups.0" -string "$(IOS_IDENTIFIER).com.numworks.calculator" $@ + +$(call ios_resource,icon.png):: ion/src/sdl/assets/logo.svg | $$(@D)/. + $(call rule_label,CONVERT) + $(Q) convert -background "#FFB734" $< $@ + +$(call ios_resource,Epsilon): $(patsubst %,$(BUILD_DIR)/%/epsilon.bin,$(ARCHS)) | $$(@D)/. + $(call rule_label,LIPO) + $(Q) lipo -create $^ -output $@ + +.PHONY: $(call ios_resource,Epsilon).signed +$(call ios_resource,Epsilon).signed: $(call ios_resource,Epsilon) $(BUILD_DIR)/app/entitlements.plist + $(call rule_label,SIGN) + $(Q) codesign --force --entitlements $(BUILD_DIR)/app/entitlements.plist --sign "iPhone Distribution: NumWorks" $< + +$(call ios_resource,background.jpg): ion/src/sdl/assets/background.jpg + $(call rule_label,COPY) + $(Q) cp $^ $@ + +$(call ios_resource,Info.plist): ion/src/sdl/ios/Info.plist + $(call rule_label,PLUTIL) + $(Q) cp $^ $@ + $(Q) plutil -insert "DTPlatformName" -string "$(SDK)" $@ + $(foreach arch,$(ARCHS),$(Q) plutil -insert "UIRequiredDeviceCapabilities.0" -string "$(arch)" $@) + +$(call ios_resource,launch.storyboardc): ion/src/sdl/ios/launch.storyboard + $(call rule_label,IBTOOL) + $(Q) ibtool --compile $@ $^ + +$(call ios_resource,embedded.mobileprovision): $(IOS_PROVISIONNING_PROFILE) + $(call rule_label,COPY) + $(Q) cp $^ $@ + +epsion_ipa_deps: $(call ios_resource,\ + Epsilon.signed \ + Info.plist \ + background.jpg \ + embedded.mobileprovision \ + icon.png \ + launch.storyboardc \ +) + +$(BUILD_DIR)/app/epsilon.ipa: epsion_ipa_deps + $(call rule_label,ZIP) + $(Q) cd $(dir $@) ; zip -qr9 $(notdir $@) Payload + +epsilon_run: $(BUILD_DIR)/app/Epsilon.app + xcrun simctl install booted $(BUILD_DIR)/app/Epsilon.app diff --git a/ion/src/sdl/ios/entitlements.plist b/ion/src/sdl/ios/entitlements.plist new file mode 100644 index 000000000..0ab20a7da --- /dev/null +++ b/ion/src/sdl/ios/entitlements.plist @@ -0,0 +1,13 @@ + + + + + beta-reports-active + + get-task-allow + + keychain-access-groups + + + + diff --git a/scripts/targets.sdl.ios.mak b/scripts/targets.sdl.ios.mak deleted file mode 100644 index fca46bc5d..000000000 --- a/scripts/targets.sdl.ios.mak +++ /dev/null @@ -1,21 +0,0 @@ -.PHONY: force_rebuild_libepsilon - -$(BUILD_DIR)/%/epsilon.bin: force_rebuild_libepsilon - $(Q) echo "MAKE ARCH=$*" - $(Q) $(MAKE) ARCH=$* - -ARCHS ?= x86_64 - -.PHONY: epsilon.ipa -epsilon.ipa: $(BUILD_DIR)/app/Epsilon.app - -$(BUILD_DIR)/app/Epsilon.app: $(patsubst %,$(BUILD_DIR)/%/epsilon.bin,$(ARCHS)) - rm -rf $@ - mkdir -p $@ - lipo -create $^ -output $@/Epsilon - cp ion/src/sdl/ios/Info.plist $@/ - cp ion/src/sdl/assets/* $@/ - ibtool --compile $@/launch.storyboardc ion/src/sdl/ios/launch.storyboard - -epsilon_run: $(BUILD_DIR)/app/Epsilon.app - xcrun simctl install booted $(BUILD_DIR)/app/Epsilon.app