From 10e23041c4adf8e8f1f01f73a67a5263a432d617 Mon Sep 17 00:00:00 2001 From: Valerio Santinelli Date: Thu, 1 Oct 2015 19:16:10 +0200 Subject: [PATCH] Fixed the template project so that now it creates a viable Apple TV project --- lime/tools/platforms/TVOSPlatform.hx | 4 ++-- templates/tvos/PROJ.xcodeproj/project.pbxproj | 6 +----- templates/tvos/PROJ/haxe/Build.hxml | 1 + templates/tvos/PROJ/haxe/makefile | 6 +++--- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lime/tools/platforms/TVOSPlatform.hx b/lime/tools/platforms/TVOSPlatform.hx index 9d90b82f5..4c51a9bb4 100644 --- a/lime/tools/platforms/TVOSPlatform.hx +++ b/lime/tools/platforms/TVOSPlatform.hx @@ -198,11 +198,11 @@ class TVOSPlatform extends PlatformTarget { var requiredCapabilities = []; - requiredCapabilities.push( { name: "armv64", value: true } ); + requiredCapabilities.push( { name: "arm64", value: true } ); context.REQUIRED_CAPABILITY = requiredCapabilities; context.ARM64 = arm64; - context.TARGET_DEVICES = switch (project.config.getString ("ios.device", "universal")) { case "iphone": "1"; case "ipad": "2"; default: "1,2"; } + context.TARGET_DEVICES = switch (project.config.getString ("tvos.device", "appletv")) { case "appletv": "3"; default: "3"; } context.DEPLOYMENT = project.config.getString ("tvos.deployment", "9.0"); if (project.config.getString ("tvos.compiler") == "llvm" || project.config.getString ("tvos.compiler", "clang") == "clang") { diff --git a/templates/tvos/PROJ.xcodeproj/project.pbxproj b/templates/tvos/PROJ.xcodeproj/project.pbxproj index efa2c9bd7..97be4fea8 100644 --- a/templates/tvos/PROJ.xcodeproj/project.pbxproj +++ b/templates/tvos/PROJ.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ 1EEEBAA3121AF2210048A9DF /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAA2121AF2210048A9DF /* OpenAL.framework */; }; 1EEEBAA5121AF2210048A9DF /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAA4121AF2210048A9DF /* OpenGLES.framework */; }; 1EEEBAA7121AF2210048A9DF /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAA6121AF2210048A9DF /* QuartzCore.framework */; }; - 1EEEBAB3121AF2880048A9D0 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAB2121AF2880048A9D0 /* CoreMotion.framework */; }; 1EEEBAB3121AF2880048A9D1 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAB2121AF2880048A9D1 /* MediaPlayer.framework */; }; 1EEEBAB3121AF2880048A9DF /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAB2121AF2880048A9DF /* CoreAudio.framework */; }; 1EEEBAB5121AF2880048A9DF /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEEBAB4121AF2880048A9DF /* CoreGraphics.framework */; }; @@ -44,7 +43,6 @@ 1EEEBAA2121AF2210048A9DF /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; 1EEEBAA4121AF2210048A9DF /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; 1EEEBAA6121AF2210048A9DF /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 1EEEBAB2121AF2880048A9D0 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; 1EEEBAB2121AF2880048A9D1 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 1EEEBAB2121AF2880048A9DF /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 1EEEBAB4121AF2880048A9DF /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -76,7 +74,6 @@ 1EEEBAFC121BE2980048A9DF /* AudioToolbox.framework in Frameworks */, 1EEEBAFE121BE2980048A9DF /* AVFoundation.framework in Frameworks */, 1EEEBB00121BE2B30048A9DF /* Foundation.framework in Frameworks */, - 1EEEBAB3121AF2880048A9D0 /* CoreMotion.framework in Frameworks */, 1EEEBAB3121AF2880048A9D1 /* MediaPlayer.framework in Frameworks */, ::ADDL_PBX_FRAMEWORKS_BUILD_PHASE:: ); @@ -113,7 +110,6 @@ 1EEEBAFF121BE2B30048A9DF /* Foundation.framework */, 1EEEBAFB121BE2980048A9DF /* AudioToolbox.framework */, 1EEEBAFD121BE2980048A9DF /* AVFoundation.framework */, - 1EEEBAB2121AF2880048A9D0 /* CoreMotion.framework */, 1EEEBAB2121AF2880048A9D1 /* MediaPlayer.framework */, ::ADDL_PBX_FRAMEWORK_GROUP:: ); @@ -290,7 +286,7 @@ IPHONEOS_DEPLOYMENT_TARGET = ::DEPLOYMENT::; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; /* PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES; */ - SDKROOT = iphoneos; + SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = "::TARGET_DEVICES::"; ::THUMB_SUPPORT:: VALID_ARCHS = "::VALID_ARCHS::"; diff --git a/templates/tvos/PROJ/haxe/Build.hxml b/templates/tvos/PROJ/haxe/Build.hxml index b1dfaa605..4d9355c97 100644 --- a/templates/tvos/PROJ/haxe/Build.hxml +++ b/templates/tvos/PROJ/haxe/Build.hxml @@ -1,4 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: -D tvos +-D appletvos --macro keep("::APP_MAIN::") -D no-compilation \ No newline at end of file diff --git a/templates/tvos/PROJ/haxe/makefile b/templates/tvos/PROJ/haxe/makefile index c9a752afd..51d16aa93 100644 --- a/templates/tvos/PROJ/haxe/makefile +++ b/templates/tvos/PROJ/haxe/makefile @@ -1,6 +1,6 @@ ifeq ("$(ARCHS)","normal") - ARCHS = armv64 i386 + ARCHS = arm64 i386 endif HAXE_BUILDS := $(ARCHS:%=build-haxe-%) @@ -34,8 +34,8 @@ else endif HAXE_OS := $(PLATFORM_NAME) -ifeq ("$(HAXE_OS)","iphonesimulator") - HAXE_OS := iphonesim +ifeq ("$(HAXE_OS)","appletvsimulator") + HAXE_OS := appletvsim endif CONFIG := $(CONFIG)-$(HAXE_OS)