Skip to content

Commit f0dc0aa

Browse files
committed
Merge branch 'develop' into 8.4.0-dev
2 parents 8c3e136 + 2032404 commit f0dc0aa

File tree

7 files changed

+64
-11
lines changed

7 files changed

+64
-11
lines changed

src/lime/_internal/backend/html5/HTML5Window.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ class HTML5Window
354354
context.canvas2D = cast canvas.getContext("2d");
355355
context.type = CANVAS;
356356
context.version = "";
357+
context.attributes.hardware = false;
357358
}
358359
else
359360
{
@@ -375,6 +376,7 @@ class HTML5Window
375376

376377
context.type = WEBGL;
377378
context.version = isWebGL2 ? "2" : "1";
379+
context.attributes.hardware = true;
378380
}
379381
}
380382

src/lime/_internal/backend/native/NativeApplication.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,7 @@ class NativeApplication
10481048
}
10491049

10501050
#if android
1051+
@:keep
10511052
private class OrientationChangeListener implements JNISafety
10521053
{
10531054
private var callback:Int->Void;

src/lime/tools/AndroidHelper.hx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ class AndroidHelper
189189

190190
if (project.environment.exists("JAVA_HOME"))
191191
{
192+
var javaHome = project.environment.get("JAVA_HOME");
193+
if (!FileSystem.exists(javaHome))
194+
{
195+
Log.error("The path specified for JAVA_HOME does not exist: " + javaHome);
196+
Sys.exit(1);
197+
}
198+
if (!FileSystem.isDirectory(javaHome))
199+
{
200+
Log.error("The path specified for JAVA_HOME must be a directory: " + javaHome);
201+
Sys.exit(1);
202+
}
192203
Sys.putEnv("JAVA_HOME", project.environment.get("JAVA_HOME"));
193204
}
194205
}

templates/ios/template/{{app.file}}/haxe/makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ $(HAXE_BUILDS): build-haxe-%:
5555
@echo "Haxe $(if $(filter $*,$(SIMULATOR_ARCH)),simulator,device) build: $(CONFIG)$(SUFFIX_$*)"
5656
haxe Build.hxml $(HXCPP_FLAGS_$*) -cpp build/$(CONFIG)$(SUFFIX_$*) $(DEBUG)
5757
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
58-
haxelib run ::CPP_BUILD_LIBRARY:: Build.xml haxe -Ddestination=$(CURDIR)/../lib/$*$(LIB_DEST) \
58+
haxelib run ::CPP_BUILD_LIBRARY:: Build.xml haxe -Ddestination="$(CURDIR)/../lib/$*$(LIB_DEST)" \
5959
-options Options.txt $(DEBUG)
6060
touch ../Classes/Main.mm
6161
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
62-
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
63-
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
64-
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)
62+
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: "$(CURDIR)/BuildHxcppMbedtls.xml" \
63+
-Ddestination="$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST)" \
64+
-options "$(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt" $(DEBUG)
6565

6666
clean:
6767
rm -rf build

templates/tvos/PROJ/haxe/makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ $(HAXE_BUILDS): build-haxe-%:
4949
@echo "Haxe $(if $(filter $*,$(SIMULATOR_ARCH)),simulator,device) build: $(CONFIG)$(SUFFIX_$*)"
5050
haxe Build.hxml $(HXCPP_FLAGS_$*) -cpp build/$(CONFIG)$(SUFFIX_$*) $(DEBUG)
5151
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
52-
haxelib run ::CPP_BUILD_LIBRARY:: Build.xml haxe -Ddestination=$(CURDIR)/../lib/$*$(LIB_DEST) \
52+
haxelib run ::CPP_BUILD_LIBRARY:: Build.xml haxe -Ddestination="$(CURDIR)/../lib/$*$(LIB_DEST)" \
5353
-options Options.txt $(DEBUG)
5454
touch ../Classes/Main.mm
5555
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
56-
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
57-
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
58-
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)
56+
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: "$(CURDIR)/BuildHxcppMbedtls.xml" \
57+
-Ddestination="$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST)" \
58+
-options "$(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt" $(DEBUG)
5959

6060
clean:
6161
rm -rf build

tools/platforms/AIRPlatform.hx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ class AIRPlatform extends FlashPlatform
133133
{
134134
Log.error("You must define AIR_SDK with the path to your AIR SDK");
135135
}
136+
else
137+
{
138+
var airSdk = project.environment.get("AIR_SDK");
139+
if (!FileSystem.exists(airSdk))
140+
{
141+
Log.error("The path specified for AIR_SDK does not exist: " + airSdk);
142+
Sys.exit(1);
143+
}
144+
if (!FileSystem.isDirectory(airSdk))
145+
{
146+
Log.error("The path specified for AIR_SDK must be a directory: " + airSdk);
147+
Sys.exit(1);
148+
}
149+
}
136150

137151
// TODO: Should we package on desktop in "deploy" command instead?
138152

tools/platforms/AndroidPlatform.hx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ class AndroidPlatform extends PlatformTarget
163163
{
164164
var minSDKVer = project.config.getInt("android.minimum-sdk-version", 21);
165165
//PLATFORM define needed for older ndk and gcc toolchain
166-
var haxeParams = [hxml, "-D", "android", "-D", 'PLATFORM_NUMBER=$minSDKVer', "-D", 'PLATFORM=$minSDKVer'];
167-
var cppParams = ["-Dandroid", '-DPLATFORM_NUMBER=$minSDKVer', '-DPLATFORM=$minSDKVer'];
166+
var haxeParams = [hxml, "-D", "android", "-D", 'PLATFORM_NUMBER=$minSDKVer', "-D", 'PLATFORM=android-$minSDKVer'];
167+
var cppParams = ["-Dandroid", '-DPLATFORM_NUMBER=$minSDKVer', '-DPLATFORM=android-$minSDKVer'];
168168
var path = sourceSet + "/jniLibs/armeabi";
169169
var suffix = ".so";
170170

@@ -369,7 +369,7 @@ class AndroidPlatform extends PlatformTarget
369369
var minSDKVer = 21;
370370
var platformNumberDefine = '-DPLATFORM_NUMBER=$minSDKVer';
371371
// Required for older ndk and gcc toolchain
372-
var platformDefine = '-DPLATFORM=$minSDKVer';
372+
var platformDefine = '-DPLATFORM=android-$minSDKVer';
373373

374374
if (armv5) commands.push(["-Dandroid", platformDefine]);
375375
if (armv7) commands.push(["-Dandroid", "-DHXCPP_ARMV7", platformDefine, platformNumberDefine]);
@@ -470,6 +470,31 @@ class AndroidPlatform extends PlatformTarget
470470
Log.error("You must define ANDROID_SDK and ANDROID_NDK_ROOT to target Android, please run '" + command + " setup android' first");
471471
Sys.exit(1);
472472
}
473+
else
474+
{
475+
var sdkPath = project.environment.get("ANDROID_SDK");
476+
if (!FileSystem.exists(sdkPath))
477+
{
478+
Log.error("The path specified for ANDROID_SDK does not exist: " + sdkPath);
479+
Sys.exit(1);
480+
}
481+
if (!FileSystem.isDirectory(sdkPath))
482+
{
483+
Log.error("The path specified for ANDROID_SDK must be a directory: " + sdkPath);
484+
Sys.exit(1);
485+
}
486+
var ndkPath = project.environment.get("ANDROID_NDK_ROOT");
487+
if (!FileSystem.exists(ndkPath))
488+
{
489+
Log.error("The path specified for ANDROID_NDK_ROOT does not exist: " + ndkPath);
490+
Sys.exit(1);
491+
}
492+
if (!FileSystem.isDirectory(ndkPath))
493+
{
494+
Log.error("The path specified for ANDROID_NDK_ROOT must be a directory: " + ndkPath);
495+
Sys.exit(1);
496+
}
497+
}
473498

474499
if (project.config.exists("android.gradle-build-directory"))
475500
{

0 commit comments

Comments
 (0)