added support for native extensions for Adobe AIR
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package lime.tools.helpers;
|
package lime.tools.helpers;
|
||||||
|
|
||||||
|
|
||||||
|
import haxe.io.Path;
|
||||||
import lime.project.HXProject;
|
import lime.project.HXProject;
|
||||||
import lime.project.Platform;
|
import lime.project.Platform;
|
||||||
import sys.FileSystem;
|
import sys.FileSystem;
|
||||||
@@ -162,6 +163,29 @@ class AIRHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
args = args.concat (files);
|
args = args.concat (files);
|
||||||
|
|
||||||
|
var extDirs:Array<String> = [];
|
||||||
|
|
||||||
|
for (dependency in project.dependencies) {
|
||||||
|
|
||||||
|
if (StringTools.endsWith (dependency.path, ".ane") && extDirs.indexOf(dependency.path) == -1) {
|
||||||
|
|
||||||
|
extDirs.push(FileSystem.fullPath(Path.directory(dependency.path)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (extDirs.length > 0) {
|
||||||
|
|
||||||
|
args.push("-extdir");
|
||||||
|
|
||||||
|
for (extDir in extDirs) {
|
||||||
|
|
||||||
|
args.push(extDir);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (targetPlatform == ANDROID) {
|
if (targetPlatform == ANDROID) {
|
||||||
|
|
||||||
|
|||||||
@@ -277,6 +277,20 @@ class AIRPlatform extends FlashPlatform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (iconData.length > 0) context.icons = iconData;
|
if (iconData.length > 0) context.icons = iconData;
|
||||||
|
|
||||||
|
context.extensions = new Array<String>();
|
||||||
|
|
||||||
|
for (dependency in project.dependencies) {
|
||||||
|
|
||||||
|
if (StringTools.endsWith(dependency.path, ".ane")) {
|
||||||
|
|
||||||
|
var extension:Dynamic = { name: dependency.name };
|
||||||
|
context.extensions.push(extension);
|
||||||
|
context.HAXE_FLAGS += "\n-swf-lib " + dependency.path;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "haxe", targetDirectory + "/haxe", context);
|
FileHelper.recursiveCopyTemplate (project.templatePaths, "haxe", targetDirectory + "/haxe", context);
|
||||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "air/hxml", targetDirectory + "/haxe", context);
|
FileHelper.recursiveCopyTemplate (project.templatePaths, "air/hxml", targetDirectory + "/haxe", context);
|
||||||
|
|||||||
@@ -67,4 +67,7 @@
|
|||||||
<iPhone>
|
<iPhone>
|
||||||
<requestedDisplayResolution>::if WIN_ALLOW_HIGH_DPI::high::else::standard::end::</requestedDisplayResolution>
|
<requestedDisplayResolution>::if WIN_ALLOW_HIGH_DPI::high::else::standard::end::</requestedDisplayResolution>
|
||||||
</iPhone>
|
</iPhone>
|
||||||
|
::if (extensions != null)::<extensions>::foreach extensions::
|
||||||
|
<extensionID>::name::</extensionID>::end::
|
||||||
|
</extensions>::end::
|
||||||
</application>
|
</application>
|
||||||
Reference in New Issue
Block a user