Fixes for tvOS.
Forces the architecture to be 64 bit only when using the simulator. Also fixes an issue where it was being set the wrong define thus not allowing to build for the simulator as expected.
This commit is contained in:
@@ -42,7 +42,7 @@ class TVOSHelper {
|
|||||||
if (project.targetFlags.exists("simulator")) {
|
if (project.targetFlags.exists("simulator")) {
|
||||||
|
|
||||||
commands.push ("-arch");
|
commands.push ("-arch");
|
||||||
commands.push ("i386");
|
commands.push ("x86_64");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +101,6 @@ class TVOSHelper {
|
|||||||
var best = "";
|
var best = "";
|
||||||
var files = FileSystem.readDirectory (dev_path);
|
var files = FileSystem.readDirectory (dev_path);
|
||||||
var extract_version = ~/^AppleTVOS(.*).sdk$/;
|
var extract_version = ~/^AppleTVOS(.*).sdk$/;
|
||||||
|
|
||||||
for (file in files) {
|
for (file in files) {
|
||||||
if (extract_version.match (file)) {
|
if (extract_version.match (file)) {
|
||||||
var ver = extract_version.matched (1);
|
var ver = extract_version.matched (1);
|
||||||
@@ -110,6 +109,7 @@ class TVOSHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (best != "")
|
if (best != "")
|
||||||
project.environment.set ("TVOS_VER", best);
|
project.environment.set ("TVOS_VER", best);
|
||||||
}
|
}
|
||||||
@@ -201,9 +201,9 @@ class TVOSHelper {
|
|||||||
Sys.command ("chmod", [ "+x", launcher ]);
|
Sys.command ("chmod", [ "+x", launcher ]);
|
||||||
|
|
||||||
// device config
|
// device config
|
||||||
var defaultDevice = "appletv";
|
var defaultDevice = "apple-tv-1080p";
|
||||||
var devices:Array<String> = ["appletv", "iphone-4s", "iphone-5", "iphone-5s", "iphone-6-plus", "iphone-6", "ipad-2", "ipad-retina", "ipad-air"];
|
var devices:Array<String> = ["apple-tv-1080p"];
|
||||||
var oldDevices:Map<String, String> = ["iphone" => "iphone-6", "ipad" => "ipad-air"];
|
var oldDevices:Map<String, String> = ["appletv" => "apple-tv-1080p"];
|
||||||
|
|
||||||
var deviceFlag:String = null;
|
var deviceFlag:String = null;
|
||||||
var deviceTypeID = null;
|
var deviceTypeID = null;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
-main ApplicationMain ::HAXE_FLAGS::
|
-main ApplicationMain ::HAXE_FLAGS::
|
||||||
-D tvos
|
-D tvos
|
||||||
-D appletvos
|
-D appletv
|
||||||
--macro keep("::APP_MAIN::")
|
--macro keep("::APP_MAIN::")
|
||||||
-D no-compilation
|
-D no-compilation
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
ifeq ("$(ARCHS)","normal")
|
ifeq ("$(ARCHS)","normal")
|
||||||
ARCHS = arm64 i386
|
ARCHS = arm64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HAXE_BUILDS := $(ARCHS:%=build-haxe-%)
|
HAXE_BUILDS := $(ARCHS:%=build-haxe-%)
|
||||||
@@ -45,13 +45,6 @@ debug_print:
|
|||||||
LIB_BASE := build/$(CONFIG)/::CPP_LIBPREFIX::ApplicationMain$(DEBUG)
|
LIB_BASE := build/$(CONFIG)/::CPP_LIBPREFIX::ApplicationMain$(DEBUG)
|
||||||
LIB_DEST := $(DEBUG)/libApplicationMain.a
|
LIB_DEST := $(DEBUG)/libApplicationMain.a
|
||||||
|
|
||||||
build-haxe-i386:
|
|
||||||
@echo "Haxe simulator build: $(CONFIG)"
|
|
||||||
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG)
|
|
||||||
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dtvos -Dsimulator -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `cat Options.txt | while read LINE; do printf " -D$$LINE"; done`
|
|
||||||
cp build/$(CONFIG)/::CPP_LIBPREFIX::ApplicationMain$(DEBUG).appletvsim.a ../lib/i386$(LIB_DEST)
|
|
||||||
touch ../Classes/Main.mm
|
|
||||||
|
|
||||||
build-haxe-x86_64:
|
build-haxe-x86_64:
|
||||||
@echo "Haxe simulator build: $(CONFIG)-64"
|
@echo "Haxe simulator build: $(CONFIG)-64"
|
||||||
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
||||||
|
|||||||
Reference in New Issue
Block a user