mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 12:10:03 +02:00
[ion/sdl/ios] Use assets for the icon
This commit is contained in:
@@ -14,14 +14,10 @@
|
||||
<string>NumWorks Graphing Calculator</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneSimulator</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>12.1</string>
|
||||
<key>DTSDKBuild</key>
|
||||
@@ -30,8 +26,6 @@
|
||||
<string>iphonesimulator12.1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.1</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -26,10 +25,6 @@ $(BUILD_DIR)/app/entitlements.plist: ion/src/sdl/ios/entitlements.plist
|
||||
$(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 $@
|
||||
@@ -43,11 +38,16 @@ $(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 ios_resource,Info.plist): ion/src/sdl/ios/Info.plist $(call ios_resource,Assets.car)
|
||||
$(call rule_label,PLUTIL)
|
||||
$(Q) cp $^ $@
|
||||
$(Q) plutil -insert "DTPlatformName" -string "$(SDK)" $@
|
||||
$(Q) cp $< $@
|
||||
$(Q) plutil -insert "MinimumOSVersion" -string "$(IOS_MIN_VERSION)" $@
|
||||
$(Q) plutil -insert "DTPlatformName" -string "$(IOS_PLATFORM)" $@
|
||||
$(Q) plutil -insert "CFBundleVersion" -string "$(EPSILON_VERSION).$(PATCH_LEVEL)" $@
|
||||
$(Q) plutil -insert "CFBundleShortVersionString" -string "$(EPSILON_VERSION)" $@
|
||||
$(foreach arch,$(ARCHS),$(Q) plutil -insert "UIRequiredDeviceCapabilities.0" -string "$(arch)" $@)
|
||||
$(Q) plutil -replace CFBundleIcons -json `plutil -extract CFBundleIcons json -o - $(BUILD_DIR)/app/assets/partial.plist` $@
|
||||
$(Q) plutil -replace CFBundleIcons~ipad -json `plutil -extract CFBundleIcons~ipad json -o - $(BUILD_DIR)/app/assets/partial.plist` $@
|
||||
|
||||
$(call ios_resource,launch.storyboardc): ion/src/sdl/ios/launch.storyboard
|
||||
$(call rule_label,IBTOOL)
|
||||
@@ -57,16 +57,37 @@ $(call ios_resource,embedded.mobileprovision): $(IOS_PROVISIONNING_PROFILE)
|
||||
$(call rule_label,COPY)
|
||||
$(Q) cp $^ $@
|
||||
|
||||
epsion_ipa_deps: $(call ios_resource,\
|
||||
asset_for = $(addprefix $(BUILD_DIR)/app/assets/Assets.xcassets/AppIcon.appiconset/,$(1))
|
||||
|
||||
icon_assets = $(addsuffix .png,$(addprefix icon_, \
|
||||
20x20 29x29 40x40 40x40 40x40 58x58 58x58 60x60 76x76 80x80 80x80 87x87 \
|
||||
120x120 120x120 152x152 167x167 180x180 1024x1024 \
|
||||
))
|
||||
|
||||
$(call asset_for,Contents.json): ion/src/sdl/ios/icon_assets.json $(call asset_for,$(icon_assets)) | $$(@D)/.
|
||||
$(call rule_label,COPY)
|
||||
$(Q) cp $< $@
|
||||
|
||||
$(call asset_for,icon_%.png): ion/src/sdl/assets/logo.svg | $$(@D)/.
|
||||
$(call rule_label,CONVERT)
|
||||
$(Q) convert -background "#FFB734" -resize $* $< $@
|
||||
|
||||
$(call ios_resource,Assets.car): $(call asset_for,Contents.json)
|
||||
$(call rule_label,ACTOOL)
|
||||
$(Q) actool --compile $(BUILD_DIR)/app/Payload/Epsilon.app --minimum-deployment-target $(IOS_MIN_VERSION) --platform $(IOS_PLATFORM) --app-icon AppIcon --output-partial-info-plist $(BUILD_DIR)/app/assets/partial.plist $(BUILD_DIR)/app/assets/Assets.xcassets
|
||||
|
||||
epsilon_ipa_deps: $(call ios_resource,\
|
||||
Assets.car \
|
||||
Epsilon.signed \
|
||||
Info.plist \
|
||||
background.jpg \
|
||||
embedded.mobileprovision \
|
||||
icon.png \
|
||||
launch.storyboardc \
|
||||
)
|
||||
|
||||
$(BUILD_DIR)/app/epsilon.ipa: epsion_ipa_deps
|
||||
$(epsilon_ipa_deps): | $$(@D)/.
|
||||
|
||||
$(BUILD_DIR)/app/epsilon.ipa: epsilon_ipa_deps
|
||||
$(call rule_label,ZIP)
|
||||
$(Q) cd $(dir $@) ; zip -qr9 $(notdir $@) Payload
|
||||
|
||||
|
||||
112
ion/src/sdl/ios/icon_assets.json
Normal file
112
ion/src/sdl/ios/icon_assets.json
Normal file
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"filename" : "icon_40x40.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"filename" : "icon_60x60.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"filename" : "icon_58x58.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"filename" : "icon_87x87.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"filename" : "icon_80x80.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"filename" : "icon_120x120.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "icon_120x120.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"filename" : "icon_180x180.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"filename" : "icon_20x20.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"filename" : "icon_40x40.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"filename" : "icon_29x29.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"filename" : "icon_58x58.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"filename" : "icon_40x40.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"filename" : "icon_80x80.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"filename" : "icon_76x76.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"filename" : "icon_152x152.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"filename" : "icon_167x167.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"filename" : "icon_1024x1024.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
TOOLCHAIN ?= ios
|
||||
EXE = bin
|
||||
|
||||
SDK ?= iphonesimulator
|
||||
IOS_PLATFORM ?= iphonesimulator
|
||||
IOS_MIN_VERSION = 8.0
|
||||
IOS_IDENTIFIER ?= unknown
|
||||
IOS_PROVISIONNING_PROFILE ?= unknown
|
||||
|
||||
BUILD_DIR := $(BUILD_DIR)/$(SDK)
|
||||
BUILD_DIR := $(BUILD_DIR)/$(IOS_PLATFORM)
|
||||
|
||||
ifdef ARCH
|
||||
BUILD_DIR := $(BUILD_DIR)/$(ARCH)
|
||||
|
||||
Reference in New Issue
Block a user