IOS7: Add AppleTV support to configure

This commit is contained in:
Le Philousophe 2022-12-31 09:33:29 +01:00 committed by Thierry Crozat
parent a5cc5e17b8
commit c38c1512a9
4 changed files with 90 additions and 20 deletions

20
configure vendored
View file

@ -853,6 +853,7 @@ Special configuration feature:
psp for PlayStation Portable
samsungtv for Samsung TV
switch for Nintendo Switch
tvos for Apple TV (tvOS 9.0+)
wasm32-unknown-emscripten for WebAssembly
wii for Nintendo Wii
@ -1737,6 +1738,12 @@ switch)
datadir='${datarootdir}'
docdir='${prefix}/doc'
;;
tvos)
_host_os=iphone
# Remains of configure not knowing about arm64
_host_cpu=aarch64
_host_alias=arm64-apple-darwin11
;;
wasm32-*)
_endian=little # the endian check below fails, but emscripten is always little endian anyway
_host_os=emscripten
@ -3771,6 +3778,13 @@ if test -n "$_host"; then
_mt32emu=no
_port_mk="backends/platform/psp/psp.mk"
;;
tvos)
add_line_to_config_mk 'IPHONE = 1'
append_var DEFINES "-DIPHONE -DIPHONE_IOS7 -DIPHONE_SANDBOXED"
_backend="ios7"
_seq_midi=no
_timidity=no
;;
samsungtv)
append_var DEFINES "-DSAMSUNGTV"
append_var DEFINES "-DDISABLE_COMMAND_LINE"
@ -3874,7 +3888,11 @@ case $_backend in
append_var LIBS "-framework QuartzCore -framework CoreFoundation -framework Foundation"
append_var LIBS "-framework AudioToolbox -framework CoreAudio -framework SystemConfiguration "
append_var LIBS "-framework GameController -framework Accelerate"
if test "$_host_cpu" = 'aarch64' ; then
if test "$_host" = 'tvos'; then
append_var LDFLAGS "-mtvos-version-min=9 -arch arm64"
append_var CFLAGS "-mtvos-version-min=9 -arch arm64"
append_var CXXFLAGS "-mtvos-version-min=9 -arch arm64"
elif test "$_host_cpu" = 'aarch64' ; then
append_var LDFLAGS "-miphoneos-version-min=7.1 -arch arm64"
append_var CFLAGS "-miphoneos-version-min=7.1 -arch arm64"
append_var CXXFLAGS "-miphoneos-version-min=7.1 -arch arm64"

View file

@ -46,7 +46,7 @@
<key>UILaunchImages</key>
<array/>
<key>UILaunchStoryboardName</key>
<string></string>
<string>LaunchScreen_tvos</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiresFullScreen</key>

View file

@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.7.0git</string>
<string>@VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.7.0git</string>
<string>@VERSION@</string>
<key>GCSupportedGameControllers</key>
<array>
<dict>

View file

@ -239,22 +239,6 @@ ios7bundle: iphone
print "\t\t</dict>";\
print "\t</dict>";\
s=2}\
/<key>CFBundleIcons~ipad<\/key>/ {\
print $$0;\
print "\t<dict>";\
print "\t\t<key>CFBundlePrimaryIcon</key>";\
print "\t\t<dict>";\
print "\t\t\t<key>CFBundleIconFiles</key>";\
print "\t\t\t<array>";\
print "\t\t\t\t<string>AppIcon29x29</string>";\
print "\t\t\t\t<string>AppIcon40x40</string>";\
print "\t\t\t\t<string>AppIcon60x60</string>";\
print "\t\t\t\t<string>AppIcon76x76</string>";\
print "\t\t\t\t<string>AppIcon83.5x83.5</string>";\
print "\t\t\t</array>";\
print "\t\t</dict>";\
print "\t</dict>";\
s=2}\
/<key>UILaunchImages<\/key>/ {\
print $$0;\
print "\t<array>";\
@ -359,6 +343,74 @@ endif
cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png $(bundle_name)/LaunchImage-800-667h@2x.png
codesign -s - --deep --force $(bundle_name)
tvosbundle: iphone
mkdir -p $(bundle_name)
awk 'BEGIN {s=0}\
/<key>CFBundleIcons<\/key>/ {\
print $$0;\
print "\t<dict>";\
print "\t\t<key>CFBundlePrimaryIcon</key>";\
print "\t\t<string>App Icon</string>";\
print "\t</dict>";\
s=2}\
/<key>TVTopShelfImage<\/key>/ {\
print $$0;\
print "\t<dict>";\
print "\t\t<key>TVTopShelfPrimaryImageWide</key>";\
print "\t\t<string>Top Shelf Image</string>";\
print "\t\t<key>TVTopShelfPrimaryImage</key>";\
print "\t\t<string>Top Shelf Image Wide</string>";\
print "\t</dict>";\
s=2}\
/<key>UILaunchImages<\/key>/ {\
print $$0;\
print "\t<array>";\
print "\t\t<dict>";\
print "\t\t\t<key>UILaunchImageMinimumOSVersion</key>";\
print "\t\t\t<string>9.0</string>";\
print "\t\t\t<key>UILaunchImageName</key>";\
print "\t\t\t<string>LaunchImage</string>";\
print "\t\t\t<key>UILaunchImageOrientation</key>";\
print "\t\t\t<string>Landscape</string>";\
print "\t\t\t<key>UILaunchImageSize</key>";\
print "\t\t\t<string>{1920, 1080}</string>";\
print "\t\t</dict>";\
print "\t\t<dict>";\
print "\t\t\t<key>UILaunchImageMinimumOSVersion</key>";\
print "\t\t\t<string>11.0</string>";\
print "\t\t\t<key>UILaunchImageName</key>";\
print "\t\t\t<string>LaunchImage</string>";\
print "\t\t\t<key>UILaunchImageOrientation</key>";\
print "\t\t\t<string>Landscape</string>";\
print "\t\t\t<key>UILaunchImageSize</key>";\
print "\t\t\t<string>{1920, 1080}</string>";\
print "\t\t</dict>";\
print "\t</array>";\
s=2}\
s==0 {print $$0}\
s > 0 { s-- }' $(srcdir)/dists/tvos/Info.plist >$(bundle_name)/Info.plist
sed -i'' -e 's/$$(PRODUCT_BUNDLE_IDENTIFIER)/org.scummvm.scummvm/' $(bundle_name)/Info.plist
sed -i'' -e 's/$$(EXECUTABLE_NAME)/ScummVM/' $(bundle_name)/Info.plist
sed -i'' -e '/UILaunchStoryboardName/{N;d;}' $(bundle_name)/Info.plist
cp $(DIST_FILES_DOCS) $(bundle_name)/
cp $(DIST_FILES_THEMES) $(bundle_name)/
ifdef DIST_FILES_NETWORKING
cp $(DIST_FILES_NETWORKING) $(bundle_name)/
endif
ifdef DIST_FILES_ENGINEDATA
cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/
endif
ifdef DIST_FILES_VKEYBD
cp $(DIST_FILES_VKEYBD) $(bundle_name)/
endif
ifneq ($(DIST_FILES_SHADERS),)
cp $(DIST_FILES_SHADERS) $(bundle_name)/
endif
$(STRIP) scummvm
chmod 755 scummvm
cp scummvm $(bundle_name)/ScummVM
cp -r $(srcdir)/dists/tvos/Assets.car $(bundle_name)/Assets.car
codesign -s - --deep --force $(bundle_name)
ifndef WITHOUT_SDL
OSX_STATIC_LIBS := `$(SDLCONFIG) --prefix=$(STATICLIBPATH) --static-libs`