mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 06:40:37 +01:00
[ion/sdl/ios] Improve the iOS build
This commit is contained in:
@@ -2,18 +2,16 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>18B75</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Epsilon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.blabla.PlifPlouf</string>
|
||||
<string>com.numworks.calculator</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>PlifPlouf</string>
|
||||
<string>NumWorks Graphing Calculator</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
@@ -24,12 +22,6 @@
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>10B61</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphonesimulator</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>12.1</string>
|
||||
<key>DTSDKBuild</key>
|
||||
@@ -47,11 +39,21 @@
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>launch</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -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
|
||||
|
||||
13
ion/src/sdl/ios/entitlements.plist
Normal file
13
ion/src/sdl/ios/entitlements.plist
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beta-reports-active</key>
|
||||
<true/>
|
||||
<key>get-task-allow</key>
|
||||
<false/>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user