Improvements to AIR mobile options
This commit is contained in:
@@ -20,7 +20,7 @@ class AIRHelper {
|
||||
|
||||
case MAC:
|
||||
|
||||
// extension = ".app";
|
||||
extension = ".app";
|
||||
|
||||
case IOS:
|
||||
|
||||
@@ -50,7 +50,7 @@ class AIRHelper {
|
||||
|
||||
}
|
||||
|
||||
// extension = ".ipa";
|
||||
extension = ".ipa";
|
||||
|
||||
case ANDROID:
|
||||
|
||||
@@ -64,7 +64,7 @@ class AIRHelper {
|
||||
|
||||
}
|
||||
|
||||
// extension = ".apk";
|
||||
extension = ".apk";
|
||||
|
||||
default:
|
||||
|
||||
@@ -187,8 +187,8 @@ class AIRHelper {
|
||||
if (targetPlatform == ANDROID) {
|
||||
|
||||
AndroidHelper.initialize (project);
|
||||
AndroidHelper.install (project, FileSystem.fullPath (workingDirectory) + "/" + (rootDirectory != null ? rootDirectory + "/" : "") + project.app.file + ".apk");
|
||||
AndroidHelper.run (project.meta.packageName + "/.AppEntry");
|
||||
AndroidHelper.install (project, FileSystem.fullPath (workingDirectory) + "/" + project.app.file + ".apk");
|
||||
AndroidHelper.run ("air." + project.meta.packageName + "/.AppEntry");
|
||||
|
||||
} else if (targetPlatform == IOS) {
|
||||
|
||||
@@ -206,7 +206,7 @@ class AIRHelper {
|
||||
}
|
||||
|
||||
ProcessHelper.runCommand (workingDirectory, project.defines.get ("AIR_SDK") + "/bin/adt", [ "-uninstallApp" ].concat (args).concat ([ "-appid", project.meta.packageName ]));
|
||||
ProcessHelper.runCommand (workingDirectory, project.defines.get ("AIR_SDK") + "/bin/adt", [ "-installApp" ].concat (args).concat ([ "-package", FileSystem.fullPath (workingDirectory) + "/" + (rootDirectory != null ? rootDirectory + "/" : "") + project.app.file + ".ipa" ]));
|
||||
ProcessHelper.runCommand (workingDirectory, project.defines.get ("AIR_SDK") + "/bin/adt", [ "-installApp" ].concat (args).concat ([ "-package", FileSystem.fullPath (workingDirectory) + "/" + project.app.file + ".ipa" ]));
|
||||
|
||||
if (project.targetFlags.exists ("simulator")) {
|
||||
|
||||
@@ -239,46 +239,4 @@ class AIRHelper {
|
||||
}
|
||||
|
||||
|
||||
public static function trace (project:HXProject, workingDirectory:String, targetPlatform:Platform, applicationXML:String, rootDirectory:String = null) {
|
||||
|
||||
if (targetPlatform == ANDROID) {
|
||||
|
||||
AndroidHelper.initialize (project);
|
||||
var deviceID = null;
|
||||
var adbFilter = null;
|
||||
|
||||
// if (!LogHelper.verbose) {
|
||||
|
||||
if (project.debug) {
|
||||
|
||||
adbFilter = project.meta.packageName + ":I ActivityManager:I *:S";
|
||||
|
||||
} else {
|
||||
|
||||
adbFilter = project.meta.packageName + ":I *:S";
|
||||
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
AndroidHelper.trace (project, project.debug, deviceID, adbFilter);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function uninstall (project:HXProject, workingDirectory:String, targetPlatform:Platform, applicationXML:String, rootDirectory:String = null) {
|
||||
|
||||
if (targetPlatform == ANDROID) {
|
||||
|
||||
AndroidHelper.initialize (project);
|
||||
var deviceID = null;
|
||||
AndroidHelper.uninstall (project.meta.packageName, deviceID);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -403,7 +403,7 @@ class AndroidHelper {
|
||||
}
|
||||
|
||||
|
||||
public static function trace (project:HXProject, debug:Bool, deviceID:String = null, customFilter:String = null):Void {
|
||||
public static function trace (project:HXProject, debug:Bool, deviceID:String = null):Void {
|
||||
|
||||
// Use -DFULL_LOGCAT or <set name="FULL_LOGCAT" /> if you do not want to filter log messages
|
||||
|
||||
@@ -418,11 +418,7 @@ class AndroidHelper {
|
||||
|
||||
}
|
||||
|
||||
if (customFilter != null) {
|
||||
|
||||
ProcessHelper.runCommand (adbPath, adbName, args.concat ([ customFilter ]));
|
||||
|
||||
} else if (project.environment.exists("FULL_LOGCAT") || LogHelper.verbose) {
|
||||
if (project.environment.exists("FULL_LOGCAT") || LogHelper.verbose) {
|
||||
|
||||
ProcessHelper.runCommand (adbPath, adbName, args.concat ([ "-c" ]));
|
||||
ProcessHelper.runCommand (adbPath, adbName, args);
|
||||
|
||||
@@ -103,7 +103,7 @@ class AIRPlatform extends FlashPlatform {
|
||||
|
||||
}
|
||||
|
||||
AIRHelper.build (project, targetDirectory, targetPlatform, targetPath, "application.xml", files, "bin");
|
||||
AIRHelper.build (project, targetDirectory, targetPlatform, "bin/" + project.app.file + ".air", "application.xml", files, "bin");
|
||||
|
||||
}
|
||||
|
||||
@@ -180,13 +180,6 @@ class AIRPlatform extends FlashPlatform {
|
||||
}
|
||||
|
||||
|
||||
public override function install ():Void {
|
||||
|
||||
// TODO: Make separate install step
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override function run ():Void {
|
||||
|
||||
AIRHelper.run (project, targetDirectory, targetPlatform, "application.xml", "bin");
|
||||
@@ -194,20 +187,6 @@ class AIRPlatform extends FlashPlatform {
|
||||
}
|
||||
|
||||
|
||||
public override function trace ():Void {
|
||||
|
||||
AIRHelper.trace (project, targetDirectory, targetPlatform, "application.xml", "bin");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override function uninstall ():Void {
|
||||
|
||||
AIRHelper.uninstall (project, targetDirectory, targetPlatform, "application.xml", "bin");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override function update ():Void {
|
||||
|
||||
var destination = targetDirectory + "/bin/";
|
||||
@@ -332,7 +311,10 @@ class AIRPlatform extends FlashPlatform {
|
||||
}
|
||||
|
||||
|
||||
@ignore public override function install ():Void {}
|
||||
@ignore public override function rebuild ():Void {}
|
||||
@ignore public override function trace ():Void {}
|
||||
@ignore public override function uninstall ():Void {}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user