diff --git a/lime/Assets.hx b/lime/Assets.hx index 9a5ed2f33..d1902aa15 100644 --- a/lime/Assets.hx +++ b/lime/Assets.hx @@ -41,7 +41,7 @@ class Assets { public static var cache = new AssetCache (); - public static var libraries (default, null) = new Map (); + public static var libraries (default, null) = new Map (); public static var onChange = new EventVoid> (); diff --git a/lime/project/CLICommand.hx b/lime/project/CLICommand.hx index 97f29e1b9..83411388f 100644 --- a/lime/project/CLICommand.hx +++ b/lime/project/CLICommand.hx @@ -6,13 +6,13 @@ class CLICommand { public var command:String; - public var args:Array ; + public var args:Array; - public function new (command:String, args:Array = null) { + public function new (command:String, args:Array = null) { this.command = command; - this.args = args != null ? args : new Array (); + this.args = args != null ? args : new Array (); } diff --git a/lime/project/HXProject.hx b/lime/project/HXProject.hx index 4d8229668..df8f62fa7 100644 --- a/lime/project/HXProject.hx +++ b/lime/project/HXProject.hx @@ -32,39 +32,39 @@ class HXProject { public var app:ApplicationData; - public var architectures:Array ; - public var assets:Array ; - public var certificate:Keystore; + public var architectures:Array; + public var assets:Array; public var command:String; public var config:ConfigData; public var debug:Bool; - public var defines:Map ; - public var dependencies:Array ; - public var environment:Map ; - public var haxedefs:Map ; - public var haxeflags:Array ; - public var haxelibs:Array ; + public var defines:Map; + public var dependencies:Array; + public var environment:Map; + public var haxedefs:Map; + public var haxeflags:Array; + public var haxelibs:Array; public var host (get_host, null):Platform; - public var icons:Array ; - public var javaPaths:Array ; - public var libraries:Array ; - public var libraryHandlers:Map ; + public var icons:Array; + public var javaPaths:Array; + public var keystore:Keystore; + public var libraries:Array; + public var libraryHandlers:Map; public var meta:MetaData; public var modules:Map; - public var ndlls:Array ; + public var ndlls:Array; public var platformType:PlatformType; - public var postBuildCallbacks:Array ; - public var preBuildCallbacks:Array ; - public var samplePaths:Array ; - public var sources:Array ; - public var splashScreens:Array ; + public var postBuildCallbacks:Array; + public var preBuildCallbacks:Array; + public var samplePaths:Array; + public var sources:Array; + public var splashScreens:Array; public var target:Platform; - public var targetFlags:Map ; - public var targetHandlers:Map ; + public var targetFlags:Map; + public var targetHandlers:Map; public var templateContext (get_templateContext, null):Dynamic; public var templatePaths:Array; @:isVar public var window (get, set):WindowData; - public var windows:Array ; + public var windows:Array; private var defaultApp:ApplicationData; private var defaultMeta:MetaData; @@ -217,7 +217,7 @@ class HXProject { app = ObjectHelper.copyFields (defaultApp, {}); window = ObjectHelper.copyFields (defaultWindow, {}); windows = [ window ]; - assets = new Array (); + assets = new Array (); if (_userDefines != null) { @@ -225,11 +225,11 @@ class HXProject { } else { - defines = new Map (); + defines = new Map (); } - dependencies = new Array (); + dependencies = new Array (); if (_environment != null) { @@ -241,21 +241,21 @@ class HXProject { } - haxedefs = new Map (); - haxeflags = new Array (); - haxelibs = new Array (); - icons = new Array (); - javaPaths = new Array (); - libraries = new Array (); - libraryHandlers = new Map (); + haxedefs = new Map (); + haxeflags = new Array (); + haxelibs = new Array (); + icons = new Array (); + javaPaths = new Array (); + libraries = new Array (); + libraryHandlers = new Map (); modules = new Map (); - ndlls = new Array (); - postBuildCallbacks = new Array (); - preBuildCallbacks = new Array (); - sources = new Array (); - samplePaths = new Array (); - splashScreens = new Array (); - targetHandlers = new Map (); + ndlls = new Array (); + postBuildCallbacks = new Array (); + preBuildCallbacks = new Array (); + sources = new Array (); + samplePaths = new Array (); + splashScreens = new Array (); + targetHandlers = new Map (); } @@ -274,12 +274,6 @@ class HXProject { } - if (certificate != null) { - - project.certificate = certificate.clone (); - - } - project.command = command; project.config = config.clone (); project.debug = debug; @@ -324,6 +318,12 @@ class HXProject { project.javaPaths = javaPaths.copy (); + if (keystore != null) { + + project.keystore = keystore.clone (); + + } + for (library in libraries) { project.libraries.push (library.clone ()); @@ -504,7 +504,7 @@ class HXProject { } - public static function fromHaxelib (haxelib:Haxelib, userDefines:Map = null, clearCache:Bool = false):HXProject { + public static function fromHaxelib (haxelib:Haxelib, userDefines:Map = null, clearCache:Bool = false):HXProject { if (haxelib.name == null || haxelib.name == "") { @@ -531,7 +531,7 @@ class HXProject { } - public static function fromPath (path:String, userDefines:Map = null):HXProject { + public static function fromPath (path:String, userDefines:Map = null):HXProject { if (!FileSystem.exists (path) || !FileSystem.isDirectory (path)) { @@ -607,7 +607,7 @@ class HXProject { } - public function includeAssets (path:String, rename:String = null, include:Array = null, exclude:Array = null):Void { + public function includeAssets (path:String, rename:String = null, include:Array = null, exclude:Array = null):Void { if (include == null) { @@ -706,13 +706,13 @@ class HXProject { if (_targetFlags == null) { - _targetFlags = new Map (); + _targetFlags = new Map (); } if (_templatePaths == null) { - _templatePaths = new Array (); + _templatePaths = new Array (); } @@ -750,16 +750,6 @@ class HXProject { StringMapHelper.copyUniqueKeys (project.libraryHandlers, libraryHandlers); StringMapHelper.copyUniqueKeys (project.targetHandlers, targetHandlers); - if (certificate == null) { - - certificate = project.certificate; - - } else { - - certificate.merge (project.certificate); - - } - config.merge (project.config); assets = ArrayHelper.concatUnique (assets, project.assets); @@ -768,6 +758,18 @@ class HXProject { haxelibs = ArrayHelper.concatUnique (haxelibs, project.haxelibs, true, "name"); icons = ArrayHelper.concatUnique (icons, project.icons); javaPaths = ArrayHelper.concatUnique (javaPaths, project.javaPaths, true); + + if (keystore == null) { + + keystore = project.keystore; + + } else { + + keystore.merge (project.keystore); + + } + + libraries = ArrayHelper.concatUnique (libraries, project.libraries, true); for (key in project.modules.keys ()) { @@ -814,7 +816,7 @@ class HXProject { #if lime - @:noCompletion private static function processHaxelibs (project:HXProject, userDefines:Map ):Void { + @:noCompletion private static function processHaxelibs (project:HXProject, userDefines:Map):Void { var haxelibs = project.haxelibs.copy (); project.haxelibs = []; @@ -989,7 +991,7 @@ class HXProject { } - context.assets = new Array (); + context.assets = new Array (); for (asset in assets) { @@ -1029,7 +1031,7 @@ class HXProject { } - context.libraries = new Array (); + context.libraries = new Array (); for (library in libraries) { @@ -1039,7 +1041,7 @@ class HXProject { } - context.ndlls = new Array (); + context.ndlls = new Array (); for (ndll in ndlls) { @@ -1287,39 +1289,33 @@ class HXProject { context.SWF_VERSION = app.swfVersion; context.PRELOADER_NAME = app.preloader; - if (certificate != null) { + if (keystore != null) { - context.KEY_STORE = PathHelper.tryFullPath (certificate.path); + context.KEY_STORE = PathHelper.tryFullPath (keystore.path); - if (certificate.password != null) { + if (keystore.password != null) { - context.KEY_STORE_PASSWORD = certificate.password; + context.KEY_STORE_PASSWORD = keystore.password; } - if (certificate.alias != null) { + if (keystore.alias != null) { - context.KEY_STORE_ALIAS = certificate.alias; + context.KEY_STORE_ALIAS = keystore.alias; - } else if (certificate.path != null) { + } else if (keystore.path != null) { - context.KEY_STORE_ALIAS = Path.withoutExtension (Path.withoutDirectory (certificate.path)); + context.KEY_STORE_ALIAS = Path.withoutExtension (Path.withoutDirectory (keystore.path)); } - if (certificate.aliasPassword != null) { + if (keystore.aliasPassword != null) { - context.KEY_STORE_ALIAS_PASSWORD = certificate.aliasPassword; + context.KEY_STORE_ALIAS_PASSWORD = keystore.aliasPassword; - } else if (certificate.password != null) { + } else if (keystore.password != null) { - context.KEY_STORE_ALIAS_PASSWORD = certificate.password; - - } - - if (certificate.identity != null) { - - context.KEY_STORE_IDENTITY = certificate.identity; + context.KEY_STORE_ALIAS_PASSWORD = keystore.password; } diff --git a/lime/project/Keystore.hx b/lime/project/Keystore.hx index 5c16d39f8..033959b75 100644 --- a/lime/project/Keystore.hx +++ b/lime/project/Keystore.hx @@ -5,26 +5,22 @@ class Keystore { public var alias:String; public var aliasPassword:String; - public var identity:String; public var password:String; public var path:String; - public var teamID:String; public var type:String; - public function new (path:String = null, password:String = null, alias:String = null, aliasPassword:String = null, identity:String = null, teamID:String = null) { + public function new (path:String = null, password:String = null, alias:String = null, aliasPassword:String = null) { this.path = path; this.password = password; this.alias = alias; this.aliasPassword = aliasPassword; - this.identity = identity; - this.teamID = teamID; } public function clone ():Keystore { - return new Keystore (path, password, alias, aliasPassword, identity, teamID); + return new Keystore (path, password, alias, aliasPassword); } @@ -36,8 +32,6 @@ class Keystore { if (keystore.password != null) path = keystore.password; if (keystore.alias != null) path = keystore.alias; if (keystore.aliasPassword != null) path = keystore.aliasPassword; - if (keystore.identity != null) identity = keystore.identity; - if (keystore.teamID != null) teamID = keystore.teamID; } diff --git a/lime/project/PlatformTarget.hx b/lime/project/PlatformTarget.hx index 114d43b2f..9d7b0a3c1 100644 --- a/lime/project/PlatformTarget.hx +++ b/lime/project/PlatformTarget.hx @@ -10,16 +10,16 @@ import lime.tools.helpers.LogHelper; class PlatformTarget { - public var additionalArguments:Array ; + public var additionalArguments:Array; public var buildType:String; public var command:String; public var project:HXProject; public var targetDirectory:String; - public var targetFlags:Map ; + public var targetFlags:Map; public var traceEnabled = true; - public function new (command:String = null, project:HXProject = null, targetFlags:Map = null) { + public function new (command:String = null, project:HXProject = null, targetFlags:Map = null) { this.command = command; this.project = project; @@ -44,7 +44,7 @@ class PlatformTarget { } - public function execute (additionalArguments:Array ):Void { + public function execute (additionalArguments:Array):Void { LogHelper.info ("", LogHelper.accentColor + "Using target platform: " + Std.string (project.target).toUpperCase () + LogHelper.resetColor); diff --git a/lime/project/ProjectXMLParser.hx b/lime/project/ProjectXMLParser.hx index da6a47d9f..dab52e2e6 100644 --- a/lime/project/ProjectXMLParser.hx +++ b/lime/project/ProjectXMLParser.hx @@ -23,13 +23,13 @@ import sys.FileSystem; class ProjectXMLParser extends HXProject { - public var includePaths:Array ; + public var includePaths:Array; private static var doubleVarMatch = new EReg ("\\$\\${(.*?)}", ""); private static var varMatch = new EReg ("\\${(.*?)}", ""); - public function new (path:String = "", defines:Map = null, includePaths:Array = null, useExtensionPath:Bool = false) { + public function new (path:String = "", defines:Map = null, includePaths:Array = null, useExtensionPath:Bool = false) { super (); @@ -45,7 +45,7 @@ class ProjectXMLParser extends HXProject { } else { - this.includePaths = new Array (); + this.includePaths = new Array (); } @@ -1674,53 +1674,63 @@ class ProjectXMLParser extends HXProject { case "certificate": + var path = null; + if (element.has.path) { - certificate = new Keystore (PathHelper.combine (extensionPath, substitute (element.att.path))); + path = element.att.path; + + } else if (element.has.keystore) { + + path = element.att.keystore; + + } + + if (path != null) { + + keystore = new Keystore (PathHelper.combine (extensionPath, substitute (element.att.path))); if (element.has.type) { - certificate.type = substitute (element.att.type); + keystore.type = substitute (element.att.type); } if (element.has.password) { - certificate.password = substitute (element.att.password); + keystore.password = substitute (element.att.password); } if (element.has.alias) { - certificate.alias = substitute (element.att.alias); + keystore.alias = substitute (element.att.alias); } if (element.has.resolve ("alias-password")) { - certificate.aliasPassword = substitute (element.att.resolve ("alias-password")); + keystore.aliasPassword = substitute (element.att.resolve ("alias-password")); } else if (element.has.alias_password) { - certificate.aliasPassword = substitute (element.att.alias_password); + keystore.aliasPassword = substitute (element.att.alias_password); } - } else if (element.has.identity || element.has.resolve ("team-id")) { + } + + if (element.has.identity) { - certificate = new Keystore (); + config.set ("ios.identity", element.att.identity); + config.set ("tvos.identity", element.att.identity); - if (element.has.identity) { - - certificate.identity = substitute (element.att.identity); - - } + } + + if (element.has.resolve ("team-id")) { - if (element.has.resolve ("team-id")) { - - certificate.teamID = substitute (element.att.resolve ("team-id")); - - } + config.set ("ios.team-id", element.att.resolve ("team-id")); + config.set ("tvos.team-id", element.att.resolve ("team-id")); } diff --git a/lime/tools/helpers/AIRHelper.hx b/lime/tools/helpers/AIRHelper.hx index bcbc7c872..61ecc8e42 100644 --- a/lime/tools/helpers/AIRHelper.hx +++ b/lime/tools/helpers/AIRHelper.hx @@ -7,12 +7,12 @@ import sys.FileSystem; class AIRHelper { - /*private static var defines:Map ; + /*private static var defines:Map; private static var target:String; - private static var targetFlags:Map ; + private static var targetFlags:Map; - public static function initialize (defines:Map , targetFlags:Map , target:String, NME:String):Void { + public static function initialize (defines:Map, targetFlags:Map, target:String, NME:String):Void { AIRHelper.defines = defines; AIRHelper.targetFlags = targetFlags; @@ -33,7 +33,7 @@ class AIRHelper { } - public static function build (workingDirectory:String, targetPath:String, applicationXML:String, files:Array , debug:Bool):Void { + public static function build (workingDirectory:String, targetPath:String, applicationXML:String, files:Array, debug:Bool):Void { var airTarget = "air"; var extension = ".air"; diff --git a/lime/tools/helpers/AndroidHelper.hx b/lime/tools/helpers/AndroidHelper.hx index 832a80042..621405a3d 100644 --- a/lime/tools/helpers/AndroidHelper.hx +++ b/lime/tools/helpers/AndroidHelper.hx @@ -30,7 +30,7 @@ class AndroidHelper { var task = "assembleDebug"; - if (project.certificate != null) { + if (project.keystore != null) { task = "assembleRelease"; @@ -254,9 +254,9 @@ class AndroidHelper { } - public static function listAVDs ():Array { + public static function listAVDs ():Array { - var avds = new Array (); + var avds = new Array (); var output = ProcessHelper.runProcess (androidPath, androidName, [ "list", "avd" ]); if (output != null && output != "") { @@ -278,9 +278,9 @@ class AndroidHelper { } - public static function listDevices ():Array { + public static function listDevices ():Array { - var devices = new Array (); + var devices = new Array (); var output = ""; if (PlatformHelper.hostPlatform != Platform.WINDOWS) { diff --git a/lime/tools/helpers/AntHelper.hx b/lime/tools/helpers/AntHelper.hx index 3dd787f87..7d67072bd 100644 --- a/lime/tools/helpers/AntHelper.hx +++ b/lime/tools/helpers/AntHelper.hx @@ -7,7 +7,7 @@ class AntHelper { private static var ant:String; - public static function initialize (defines:Map ):Void { + public static function initialize (defines:Map):Void { if (defines.exists ("ANDROID_SDK")) { @@ -30,7 +30,7 @@ class AntHelper { } - public static function run (workingDirectory:String, commands:Array ):Void { + public static function run (workingDirectory:String, commands:Array):Void { if (commands == null) { diff --git a/lime/tools/helpers/ArrayHelper.hx b/lime/tools/helpers/ArrayHelper.hx index 35470d516..6c9e77a5d 100644 --- a/lime/tools/helpers/ArrayHelper.hx +++ b/lime/tools/helpers/ArrayHelper.hx @@ -94,7 +94,7 @@ class ArrayHelper { } - public static function containsValue (array:Array < T > , value:T):Bool { + public static function containsValue (array:Array< T > , value:T):Bool { for (arrayValue in array) { diff --git a/lime/tools/helpers/AssetHelper.hx b/lime/tools/helpers/AssetHelper.hx index ec2467179..7a144f81f 100644 --- a/lime/tools/helpers/AssetHelper.hx +++ b/lime/tools/helpers/AssetHelper.hx @@ -16,7 +16,7 @@ class AssetHelper { public static function createManifest (project:HXProject, targetPath:String = ""):String { - var manifest = new Array (); + var manifest = new Array (); for (asset in project.assets) { @@ -50,7 +50,7 @@ class AssetHelper { public static function processLibraries (project:HXProject, targetDirectory:String = null):Void { - var handlers = new Array (); + var handlers = new Array (); for (library in project.libraries) { diff --git a/lime/tools/helpers/BlackBerryHelper.hx b/lime/tools/helpers/BlackBerryHelper.hx index 9af5ba798..e999abb2c 100644 --- a/lime/tools/helpers/BlackBerryHelper.hx +++ b/lime/tools/helpers/BlackBerryHelper.hx @@ -18,8 +18,8 @@ class BlackBerryHelper { private static var binDirectory:String; - private static var defines:Map ; - private static var targetFlags:Map ; + private static var defines:Map; + private static var targetFlags:Map; public static function createPackage (project:HXProject, workingDirectory:String, descriptorFile:String, targetPath:String):Void { @@ -27,9 +27,9 @@ class BlackBerryHelper { var args = [ "-package", targetPath, descriptorFile ]; var password = null; - if (project.certificate != null) { + if (project.keystore != null) { - password = project.certificate.password; + password = project.keystore.password; if (password == null) { @@ -40,10 +40,10 @@ class BlackBerryHelper { } - if (project.certificate != null) { + if (project.keystore != null) { args.push ("-keystore"); - args.push (PathHelper.tryFullPath (project.certificate.path)); + args.push (PathHelper.tryFullPath (project.keystore.path)); if (password != null) { @@ -75,9 +75,9 @@ class BlackBerryHelper { ProcessHelper.runCommand (workingDirectory, exe, args); - if (project.certificate != null) { + if (project.keystore != null) { - args = [ "-keystore", PathHelper.tryFullPath (project.certificate.path) ]; + args = [ "-keystore", PathHelper.tryFullPath (project.keystore.path) ]; if (password != null) { @@ -113,9 +113,9 @@ class BlackBerryHelper { var args = [ zipPath ]; var params = ""; - if (project.certificate != null) { + if (project.keystore != null) { - var password = project.certificate.password; + var password = project.keystore.password; if (password == null) { @@ -126,11 +126,11 @@ class BlackBerryHelper { args = args.concat ([ "--password", password, "--buildId", project.meta.buildNumber ]); - //params = "{\n\t\"blackberry-nativepackager\": {\n\t\t\"-keystore\": \"" + PathHelper.tryFullPath (project.certificate.path) + "\"\n\t}\n}"; + //params = "{\n\t\"blackberry-nativepackager\": {\n\t\t\"-keystore\": \"" + PathHelper.tryFullPath (project.keystore.path) + "\"\n\t}\n}"; try { - FileHelper.copyFile (PathHelper.tryFullPath (project.certificate.path), PathHelper.combine (project.environment.get ("BLACKBERRY_WEBWORKS_SDK"), "author.p12")); + FileHelper.copyFile (PathHelper.tryFullPath (project.keystore.path), PathHelper.combine (project.environment.get ("BLACKBERRY_WEBWORKS_SDK"), "author.p12")); } catch (e:Dynamic) {} diff --git a/lime/tools/helpers/CPPHelper.hx b/lime/tools/helpers/CPPHelper.hx index 4767614fe..250044f70 100644 --- a/lime/tools/helpers/CPPHelper.hx +++ b/lime/tools/helpers/CPPHelper.hx @@ -13,8 +13,8 @@ import sys.FileSystem; class CPPHelper { - private static var rebuiltLibraries = new Map (); - private static var rebuiltPaths = new Map (); + private static var rebuiltLibraries = new Map (); + private static var rebuiltPaths = new Map (); public static function compile (project:HXProject, path:String, flags:Array = null, buildFile:String = "Build.xml"):Void { diff --git a/lime/tools/helpers/CommandHelper.hx b/lime/tools/helpers/CommandHelper.hx index d4d7cd8d4..84bcdcc1c 100644 --- a/lime/tools/helpers/CommandHelper.hx +++ b/lime/tools/helpers/CommandHelper.hx @@ -8,7 +8,7 @@ import lime.project.Platform; class CommandHelper { - public static function executeCommands (commands:Array ):Void { + public static function executeCommands (commands:Array):Void { for (c in commands) { diff --git a/lime/tools/helpers/CordovaHelper.hx b/lime/tools/helpers/CordovaHelper.hx index 1c5081e70..4d4af3f87 100644 --- a/lime/tools/helpers/CordovaHelper.hx +++ b/lime/tools/helpers/CordovaHelper.hx @@ -14,10 +14,10 @@ class CordovaHelper { /*public static var contentPath = "www/"; - private static var defines:Map ; + private static var defines:Map; private static var NME:String; private static var target:String; - private static var targetFlags:Map ; + private static var targetFlags:Map; public static function build (workingDirectory:String, debug:Bool):Void { @@ -182,7 +182,7 @@ class CordovaHelper { } - public static function initialize (defines:Map , targetFlags:Map , target:String, NME:String):Void { + public static function initialize (defines:Map, targetFlags:Map, target:String, NME:String):Void { CordovaHelper.defines = defines; CordovaHelper.NME = NME; @@ -292,7 +292,7 @@ class CordovaHelper { } - public static function updateIcon (buildDirectory:String, icons:Array, assets:Array , context:Dynamic):Void { + public static function updateIcon (buildDirectory:String, icons:Array, assets:Array, context:Dynamic):Void { var iconCount = 0; var sizes = []; diff --git a/lime/tools/helpers/DeploymentHelper.hx b/lime/tools/helpers/DeploymentHelper.hx index 1598dd352..e68095c24 100644 --- a/lime/tools/helpers/DeploymentHelper.hx +++ b/lime/tools/helpers/DeploymentHelper.hx @@ -7,7 +7,7 @@ import lime.project.HXProject; class DeploymentHelper { - public static function deploy (project:HXProject, targetFlags:Map , targetDirectory:String, targetName:String) { + public static function deploy (project:HXProject, targetFlags:Map, targetDirectory:String, targetName:String) { var name = project.meta.title + " (" + project.meta.version + " build " + project.meta.buildNumber + ") (" + targetName + ").zip"; var targetPath = PathHelper.combine (targetDirectory, name); diff --git a/lime/tools/helpers/FileHelper.hx b/lime/tools/helpers/FileHelper.hx index 475717ba4..706f2aa40 100644 --- a/lime/tools/helpers/FileHelper.hx +++ b/lime/tools/helpers/FileHelper.hx @@ -176,7 +176,7 @@ class FileHelper { } - public static function copyFileTemplate (templatePaths:Array , source:String, destination:String, context:Dynamic = null, process:Bool = true) { + public static function copyFileTemplate (templatePaths:Array, source:String, destination:String, context:Dynamic = null, process:Bool = true) { var path = PathHelper.findTemplate (templatePaths, source); @@ -338,7 +338,7 @@ class FileHelper { PathHelper.mkdir (destination); - var files:Array = null; + var files:Array = null; try { @@ -374,7 +374,7 @@ class FileHelper { } - public static function recursiveCopyTemplate (templatePaths:Array , source:String, destination:String, context:Dynamic = null, process:Bool = true, warnIfNotFound:Bool = true) { + public static function recursiveCopyTemplate (templatePaths:Array, source:String, destination:String, context:Dynamic = null, process:Bool = true, warnIfNotFound:Bool = true) { var paths = PathHelper.findTemplates (templatePaths, source, warnIfNotFound); diff --git a/lime/tools/helpers/FlashHelper.hx b/lime/tools/helpers/FlashHelper.hx index 4f7d91a5a..a52c21468 100644 --- a/lime/tools/helpers/FlashHelper.hx +++ b/lime/tools/helpers/FlashHelper.hx @@ -320,8 +320,8 @@ class FlashHelper { if ( font_name == null || font_name.length == 0 ) font_name = Path.withoutExtension(name).split("/").pop().split("\\").pop(); - var glyphs = new Array (); - var glyph_layout = new Array (); + var glyphs = new Array (); + var glyph_layout = new Array (); for (native_glyph in font.glyphs) { @@ -332,7 +332,7 @@ class FlashHelper { } - var shapeRecords = new Array (); + var shapeRecords = new Array (); var i:Int = 0; var styleChanged:Bool = false; var dx = 0; @@ -431,7 +431,7 @@ class FlashHelper { } - var kerning = new Array (); + var kerning = new Array (); if (font.kerning != null) { @@ -511,7 +511,7 @@ class FlashHelper { #end - /*public static function embedAssets (targetPath:String, assets:Array , packageName:String = ""):Void { + /*public static function embedAssets (targetPath:String, assets:Array, packageName:String = ""):Void { try { @@ -523,7 +523,7 @@ class FlashHelper { var swf = reader.read (); input.close(); - var new_tags = new Array (); + var new_tags = new Array (); var inserted = false; for (tag in swf.tags) { diff --git a/lime/tools/helpers/IOSHelper.hx b/lime/tools/helpers/IOSHelper.hx index 01b6f460e..1b97c42c5 100644 --- a/lime/tools/helpers/IOSHelper.hx +++ b/lime/tools/helpers/IOSHelper.hx @@ -16,7 +16,7 @@ class IOSHelper { private static var initialized = false; - public static function build (project:HXProject, workingDirectory:String, additionalArguments:Array = null):Void { + public static function build (project:HXProject, workingDirectory:String, additionalArguments:Array = null):Void { initialize (project); @@ -338,15 +338,9 @@ class IOSHelper { } - var identity = "iPhone Developer"; + var identity = project.config.getString ("ios.identity", "iPhone Developer"); - if (project.certificate != null && project.certificate.identity != null) { - - identity = project.certificate.identity; - - } - - var commands = [ "-s", identity ]; + var commands = [ "-s", identity, "CODE_SIGN_IDENTITY=" + identity ]; if (entitlementsPath != null) { @@ -355,6 +349,12 @@ class IOSHelper { } + if (project.config.exists ("ios.provisioning-profile")) { + + commands.push ("PROVISIONING_PROFILE=" + project.config.getString ("ios.provisioning-profile")); + + } + var applicationPath = "build/" + configuration + "-iphoneos/" + project.app.file + ".app"; commands.push (applicationPath); diff --git a/lime/tools/helpers/IconHelper.hx b/lime/tools/helpers/IconHelper.hx index d28ceee53..3103ea4d7 100644 --- a/lime/tools/helpers/IconHelper.hx +++ b/lime/tools/helpers/IconHelper.hx @@ -189,7 +189,7 @@ class IconHelper { } - public static function createWindowsIcon (icons:Array , targetPath:String):Bool { + public static function createWindowsIcon (icons:Array, targetPath:String):Bool { if (canUseCache (targetPath, icons)) { @@ -298,7 +298,7 @@ class IconHelper { } - public static function findMatch (icons:Array , width:Int, height:Int):Icon { + public static function findMatch (icons:Array, width:Int, height:Int):Icon { var match = null; @@ -317,7 +317,7 @@ class IconHelper { } - public static function findNearestMatch (icons:Array , width:Int, height:Int):Icon { + public static function findNearestMatch (icons:Array, width:Int, height:Int):Icon { var match = null; @@ -360,7 +360,7 @@ class IconHelper { } - private static function getIconImage (icons:Array , width:Int, height:Int, backgroundColor:Int = null):Image { + private static function getIconImage (icons:Array, width:Int, height:Int, backgroundColor:Int = null):Image { var icon = findMatch (icons, width, height); diff --git a/lime/tools/helpers/JavaHelper.hx b/lime/tools/helpers/JavaHelper.hx index 0ffa6a2e7..a1e15a70a 100644 --- a/lime/tools/helpers/JavaHelper.hx +++ b/lime/tools/helpers/JavaHelper.hx @@ -7,7 +7,7 @@ import sys.io.File; class JavaHelper { - public static function copyLibraries (templatePaths:Array , platformName:String, targetPath:String) { + public static function copyLibraries (templatePaths:Array, platformName:String, targetPath:String) { FileHelper.recursiveCopyTemplate (templatePaths, "java/ndll/" + platformName, targetPath); diff --git a/lime/tools/helpers/LogHelper.hx b/lime/tools/helpers/LogHelper.hx index 27b7e7213..dac84ff9e 100644 --- a/lime/tools/helpers/LogHelper.hx +++ b/lime/tools/helpers/LogHelper.hx @@ -26,7 +26,7 @@ class LogHelper { private static var colorCodes:EReg = ~/\x1b\[[^m]+m/g; private static var colorSupported:Null; - private static var sentWarnings:Map = new Map (); + private static var sentWarnings:Map = new Map (); public static function error (message:String, verboseMessage:String = "", e:Dynamic = null):Void { diff --git a/lime/tools/helpers/NekoHelper.hx b/lime/tools/helpers/NekoHelper.hx index 84fbbcbab..eeb83ed3b 100644 --- a/lime/tools/helpers/NekoHelper.hx +++ b/lime/tools/helpers/NekoHelper.hx @@ -12,14 +12,14 @@ import sys.io.File; class NekoHelper { - public static function copyLibraries (templatePaths:Array , platformName:String, targetPath:String) { + public static function copyLibraries (templatePaths:Array, platformName:String, targetPath:String) { //FileHelper.recursiveCopyTemplate (templatePaths, "neko/ndll/" + platformName, targetPath); } - public static function createExecutable (templatePaths:Array , platformName:String, source:String, target:String, iconPath:String = null):Void { + public static function createExecutable (templatePaths:Array, platformName:String, source:String, target:String, iconPath:String = null):Void { /*var executablePath = PathHelper.findTemplate (templatePaths, "neko/bin/neko-" + platformName); var executable = File.getBytes (executablePath); @@ -47,7 +47,7 @@ class NekoHelper { } - public static function createWindowsExecutable (templatePaths:Array , source:String, target:String, iconPath:String):Void { + public static function createWindowsExecutable (templatePaths:Array, source:String, target:String, iconPath:String):Void { /*var executablePath = PathHelper.findTemplate (templatePaths, "neko/bin/neko-windows"); var executable = File.getBytes (executablePath); diff --git a/lime/tools/helpers/PathHelper.hx b/lime/tools/helpers/PathHelper.hx index 62be8b8ab..54785ae5f 100644 --- a/lime/tools/helpers/PathHelper.hx +++ b/lime/tools/helpers/PathHelper.hx @@ -116,7 +116,7 @@ class PathHelper { } - public static function findTemplate (templatePaths:Array , path:String, warnIfNotFound:Bool = true):String { + public static function findTemplate (templatePaths:Array, path:String, warnIfNotFound:Bool = true):String { var matches = findTemplates (templatePaths, path, warnIfNotFound); @@ -131,7 +131,7 @@ class PathHelper { } - public static function findTemplates (templatePaths:Array , path:String, warnIfNotFound:Bool = true):Array { + public static function findTemplates (templatePaths:Array, path:String, warnIfNotFound:Bool = true):Array { var matches = []; @@ -564,7 +564,7 @@ class PathHelper { } - public static function relocatePaths (paths:Array , targetDirectory:String):Array { + public static function relocatePaths (paths:Array, targetDirectory:String):Array { var relocatedPaths = paths.copy (); diff --git a/lime/tools/helpers/ProcessHelper.hx b/lime/tools/helpers/ProcessHelper.hx index a4b910c49..645685711 100644 --- a/lime/tools/helpers/ProcessHelper.hx +++ b/lime/tools/helpers/ProcessHelper.hx @@ -107,7 +107,7 @@ class ProcessHelper { } - public static function runCommand (path:String, command:String, args:Array , safeExecute:Bool = true, ignoreErrors:Bool = false, print:Bool = false):Int { + public static function runCommand (path:String, command:String, args:Array, safeExecute:Bool = true, ignoreErrors:Bool = false, print:Bool = false):Int { if (print) { @@ -248,7 +248,7 @@ class ProcessHelper { } - public static function runProcess (path:String, command:String, args:Array , waitForOutput:Bool = true, safeExecute:Bool = true, ignoreErrors:Bool = false, print:Bool = false, returnErrorValue:Bool = false):String { + public static function runProcess (path:String, command:String, args:Array, waitForOutput:Bool = true, safeExecute:Bool = true, ignoreErrors:Bool = false, print:Bool = false, returnErrorValue:Bool = false):String { if (print) { diff --git a/lime/tools/helpers/StringHelper.hx b/lime/tools/helpers/StringHelper.hx index a837b6ef6..78307279c 100644 --- a/lime/tools/helpers/StringHelper.hx +++ b/lime/tools/helpers/StringHelper.hx @@ -11,7 +11,7 @@ class StringHelper { private static var seedNumber = 0; private static var base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; private static var base64Encoder:BaseCode; - private static var usedFlatNames = new Map (); + private static var usedFlatNames = new Map (); private static var uuidChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -53,7 +53,7 @@ class StringHelper { } - public static function formatArray (array:Array ):String { + public static function formatArray (array:Array):String { var output = "[ "; diff --git a/lime/tools/helpers/StringMapHelper.hx b/lime/tools/helpers/StringMapHelper.hx index 44e3295a4..5f7f9cc2a 100644 --- a/lime/tools/helpers/StringMapHelper.hx +++ b/lime/tools/helpers/StringMapHelper.hx @@ -7,9 +7,9 @@ import haxe.ds.StringMap; class StringMapHelper { - public static function copy (source:StringMap ):StringMap { + public static function copy (source:StringMap):StringMap { - var target = new StringMap (); + var target = new StringMap (); for (key in source.keys ()) { @@ -22,7 +22,7 @@ class StringMapHelper { } - public static function copyKeys (source:StringMap , target:StringMap ):Void { + public static function copyKeys (source:StringMap, target:StringMap):Void { for (key in source.keys ()) { @@ -33,7 +33,7 @@ class StringMapHelper { } - public static function copyUniqueKeys (source:StringMap , target:StringMap ):Void { + public static function copyUniqueKeys (source:StringMap, target:StringMap):Void { for (key in source.keys ()) { diff --git a/lime/tools/helpers/TVOSHelper.hx b/lime/tools/helpers/TVOSHelper.hx index 3ddd52b9e..3e5b63144 100644 --- a/lime/tools/helpers/TVOSHelper.hx +++ b/lime/tools/helpers/TVOSHelper.hx @@ -16,7 +16,7 @@ class TVOSHelper { private static var initialized = false; - public static function build (project:HXProject, workingDirectory:String, additionalArguments:Array = null):Void { + public static function build (project:HXProject, workingDirectory:String, additionalArguments:Array = null):Void { initialize (project); @@ -338,15 +338,9 @@ class TVOSHelper { } - var identity = "iPhone Developer"; + var identity = project.config.getString ("tvos.identity", "tvOS Developer"); - if (project.certificate != null && project.certificate.identity != null) { - - identity = project.certificate.identity; - - } - - var commands = [ "-s", identity ]; + var commands = [ "-s", identity, "CODE_SIGN_IDENTITY=" + identity ]; if (entitlementsPath != null) { @@ -355,6 +349,12 @@ class TVOSHelper { } + if (project.config.exists ("tvos.provisioning-profile")) { + + commands.push ("PROVISIONING_PROFILE=" + project.config.getString ("ios.provisioning-profile")); + + } + var applicationPath = "build/" + configuration + "-appletvos/" + project.app.file + ".app"; commands.push (applicationPath); diff --git a/lime/tools/helpers/TizenHelper.hx b/lime/tools/helpers/TizenHelper.hx index d0f88ab06..2d0d5439e 100644 --- a/lime/tools/helpers/TizenHelper.hx +++ b/lime/tools/helpers/TizenHelper.hx @@ -25,10 +25,10 @@ class TizenHelper { var keystore = null; var password = null; - if (project.certificate != null) { + if (project.keystore != null) { - keystore = PathHelper.tryFullPath (project.certificate.path); - password = project.certificate.password; + keystore = PathHelper.tryFullPath (project.keystore.path); + password = project.keystore.password; if (password == null) { diff --git a/lime/tools/platforms/AndroidPlatform.hx b/lime/tools/platforms/AndroidPlatform.hx index 0562eb8be..40724322b 100644 --- a/lime/tools/platforms/AndroidPlatform.hx +++ b/lime/tools/platforms/AndroidPlatform.hx @@ -29,7 +29,7 @@ class AndroidPlatform extends PlatformTarget { private var deviceID:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map) { super (command, _project, targetFlags); @@ -181,7 +181,7 @@ class AndroidPlatform extends PlatformTarget { var build = "-debug"; - if (project.certificate != null) { + if (project.keystore != null) { build = "-release"; diff --git a/lime/tools/platforms/BlackBerryPlatform.hx b/lime/tools/platforms/BlackBerryPlatform.hx index f145df0dd..afaa21151 100644 --- a/lime/tools/platforms/BlackBerryPlatform.hx +++ b/lime/tools/platforms/BlackBerryPlatform.hx @@ -29,7 +29,7 @@ class BlackBerryPlatform extends PlatformTarget { private var outputFile:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/EmscriptenPlatform.hx b/lime/tools/platforms/EmscriptenPlatform.hx index e48e28da3..c920a476b 100644 --- a/lime/tools/platforms/EmscriptenPlatform.hx +++ b/lime/tools/platforms/EmscriptenPlatform.hx @@ -26,7 +26,7 @@ class EmscriptenPlatform extends PlatformTarget { private var outputFile:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/FirefoxPlatform.hx b/lime/tools/platforms/FirefoxPlatform.hx index 2053b9101..a6daeca05 100644 --- a/lime/tools/platforms/FirefoxPlatform.hx +++ b/lime/tools/platforms/FirefoxPlatform.hx @@ -15,7 +15,7 @@ import sys.FileSystem; class FirefoxPlatform extends HTML5Platform { - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/FlashPlatform.hx b/lime/tools/platforms/FlashPlatform.hx index 66fb03829..34b6db24f 100644 --- a/lime/tools/platforms/FlashPlatform.hx +++ b/lime/tools/platforms/FlashPlatform.hx @@ -33,7 +33,7 @@ class FlashPlatform extends PlatformTarget { private var logLength:Int; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map) { super (command, _project, targetFlags); @@ -161,7 +161,7 @@ class FlashPlatform extends PlatformTarget { var context = project.templateContext; context.WIN_FLASHBACKGROUND = project.window.background != null ? StringTools.hex (project.window.background, 6) : "0xFFFFFF"; - var assets:Array = cast context.assets; + var assets:Array = cast context.assets; for (asset in assets) { diff --git a/lime/tools/platforms/HTML5Platform.hx b/lime/tools/platforms/HTML5Platform.hx index 94229fd0f..a2c35bf8e 100644 --- a/lime/tools/platforms/HTML5Platform.hx +++ b/lime/tools/platforms/HTML5Platform.hx @@ -26,7 +26,7 @@ class HTML5Platform extends PlatformTarget { private var outputFile:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/IOSPlatform.hx b/lime/tools/platforms/IOSPlatform.hx index 866f9cc51..e6a8cb444 100644 --- a/lime/tools/platforms/IOSPlatform.hx +++ b/lime/tools/platforms/IOSPlatform.hx @@ -35,7 +35,7 @@ import sys.FileSystem; class IOSPlatform extends PlatformTarget { - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); @@ -106,12 +106,6 @@ class IOSPlatform extends PlatformTarget { project.sources = PathHelper.relocatePaths (project.sources, PathHelper.combine (targetDirectory, project.app.file + "/haxe")); //project.dependencies.push ("stdc++"); - if (project.certificate != null && project.certificate.identity == null) { - - project.certificate.identity = "iPhone Developer"; - - } - if (project.targetFlags.exists ("xml")) { project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); @@ -133,9 +127,9 @@ class IOSPlatform extends PlatformTarget { context.HAS_LAUNCH_IMAGE = false; context.OBJC_ARC = false; - if (project.certificate != null) { + if (project.config.exists ("ios.team-id")) { - context.DEVELOPMENT_TEAM_ID = project.certificate.teamID; + context.DEVELOPMENT_TEAM_ID = project.config.getString ("ios.team-id"); } @@ -170,7 +164,7 @@ class IOSPlatform extends PlatformTarget { } - var valid_archs = new Array (); + var valid_archs = new Array (); var armv6 = false; var armv7 = false; var armv7s = false; diff --git a/lime/tools/platforms/LinuxPlatform.hx b/lime/tools/platforms/LinuxPlatform.hx index 9af50b9f2..194a26932 100644 --- a/lime/tools/platforms/LinuxPlatform.hx +++ b/lime/tools/platforms/LinuxPlatform.hx @@ -33,7 +33,7 @@ class LinuxPlatform extends PlatformTarget { private var targetType:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/MacPlatform.hx b/lime/tools/platforms/MacPlatform.hx index bb73b5f8b..6bded01c9 100644 --- a/lime/tools/platforms/MacPlatform.hx +++ b/lime/tools/platforms/MacPlatform.hx @@ -37,7 +37,7 @@ class MacPlatform extends PlatformTarget { private var targetType:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/TVOSPlatform.hx b/lime/tools/platforms/TVOSPlatform.hx index 92ab099bd..25b070860 100644 --- a/lime/tools/platforms/TVOSPlatform.hx +++ b/lime/tools/platforms/TVOSPlatform.hx @@ -35,7 +35,7 @@ import sys.FileSystem; class TVOSPlatform extends PlatformTarget { - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); @@ -106,13 +106,6 @@ class TVOSPlatform extends PlatformTarget { project.sources = PathHelper.relocatePaths (project.sources, PathHelper.combine (targetDirectory, project.app.file + "/haxe")); //project.dependencies.push ("stdc++"); - if (project.certificate == null || project.certificate.identity == null) { - - project.certificate = new Keystore (); - project.certificate.identity = "tvOS Developer"; - - } - if (project.targetFlags.exists ("xml")) { project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); @@ -161,7 +154,7 @@ class TVOSPlatform extends PlatformTarget { } - var valid_archs = new Array (); + var valid_archs = new Array (); var arm64 = false; var architectures = project.architectures; diff --git a/lime/tools/platforms/TizenPlatform.hx b/lime/tools/platforms/TizenPlatform.hx index 215247a7d..0fd23b431 100644 --- a/lime/tools/platforms/TizenPlatform.hx +++ b/lime/tools/platforms/TizenPlatform.hx @@ -25,7 +25,7 @@ class TizenPlatform extends PlatformTarget { private static var uuid:String = null; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/WebOSPlatform.hx b/lime/tools/platforms/WebOSPlatform.hx index 1a048761a..0f60d3019 100644 --- a/lime/tools/platforms/WebOSPlatform.hx +++ b/lime/tools/platforms/WebOSPlatform.hx @@ -22,7 +22,7 @@ import sys.FileSystem; class WebOSPlatform extends PlatformTarget { - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); diff --git a/lime/tools/platforms/WindowsPlatform.hx b/lime/tools/platforms/WindowsPlatform.hx index 41acafea3..e861e2a31 100644 --- a/lime/tools/platforms/WindowsPlatform.hx +++ b/lime/tools/platforms/WindowsPlatform.hx @@ -35,7 +35,7 @@ class WindowsPlatform extends PlatformTarget { private var targetType:String; - public function new (command:String, _project:HXProject, targetFlags:Map ) { + public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); diff --git a/templates/haxe/DefaultAssetLibrary.hx b/templates/haxe/DefaultAssetLibrary.hx index 6b74d8985..0982d01d9 100644 --- a/templates/haxe/DefaultAssetLibrary.hx +++ b/templates/haxe/DefaultAssetLibrary.hx @@ -39,9 +39,9 @@ import flash.net.URLRequest; class DefaultAssetLibrary extends AssetLibrary { - public var className (default, null) = new Map (); - public var path (default, null) = new Map (); - public var type (default, null) = new Map (); + public var className (default, null) = new Map (); + public var path (default, null) = new Map (); + public var type (default, null) = new Map (); private var lastModified:Float; private var timer:Timer; diff --git a/tools/CommandLineTools.hx b/tools/CommandLineTools.hx index 235738cef..bbcc976bc 100644 --- a/tools/CommandLineTools.hx +++ b/tools/CommandLineTools.hx @@ -28,33 +28,33 @@ class CommandLineTools { public static var defaultLibrary = "lime"; public static var defaultLibraryName = "Lime"; - private var additionalArguments:Array ; + private var additionalArguments:Array; private var command:String; private var debug:Bool; private var environment:Map; - private var includePaths:Array ; + private var includePaths:Array; private var overrides:HXProject; private var project:HXProject; - private var projectDefines:Map ; - private var targetFlags:Map ; + private var projectDefines:Map; + private var targetFlags:Map; private var traceEnabled:Bool; - private var userDefines:Map ; + private var userDefines:Map; private var version:String; - private var words:Array ; + private var words:Array; public function new () { - additionalArguments = new Array (); + additionalArguments = new Array (); command = ""; debug = false; environment = Sys.environment (); - includePaths = new Array (); - projectDefines = new Map (); - targetFlags = new Map (); + includePaths = new Array (); + projectDefines = new Map (); + targetFlags = new Map (); traceEnabled = true; - userDefines = new Map (); - words = new Array (); + userDefines = new Map (); + words = new Array (); overrides = new HXProject (); overrides.architectures = []; @@ -441,7 +441,7 @@ class CommandLineTools { var process = new Process ("haxelib", [ "path", "lime" ]); var path = ""; - var lines = new Array (); + var lines = new Array (); try { @@ -750,7 +750,7 @@ class CommandLineTools { if (sampleName == null) { var sampleExists = false; - var defines = new Map (); + var defines = new Map (); defines.set ("create", 1); var project = HXProject.fromHaxelib (new Haxelib (defaultLibrary), defines); @@ -979,7 +979,7 @@ class CommandLineTools { } else { var files = FileSystem.readDirectory (path); - var matches = new Map > (); + var matches = new Map> (); matches.set ("hxp", []); matches.set ("lime", []); matches.set ("nmml", []); @@ -1836,9 +1836,9 @@ class CommandLineTools { } else if (StringTools.startsWith (field, "certificate-")) { - if (overrides.certificate == null) { + if (overrides.keystore == null) { - overrides.certificate = new Keystore (); + overrides.keystore = new Keystore (); } @@ -1846,9 +1846,21 @@ class CommandLineTools { if (field == "alias-password") field = "aliasPassword"; - if (Reflect.hasField (overrides.certificate, field)) { + if (Reflect.hasField (overrides.keystore, field)) { - Reflect.setField (overrides.certificate, field, argValue); + Reflect.setField (overrides.keystore, field, argValue); + + } + + if (field == "identity") { + + overrides.config.set ("ios.identity", argValue); + overrides.config.set ("tvos.identity", argValue); + + } else if (field == "team-id") { + + overrides.config.set ("ios.team-id", argValue); + overrides.config.set ("tvos.team-id", argValue); } diff --git a/tools/SVGExport.hx b/tools/SVGExport.hx index 384d13df7..aac333782 100644 --- a/tools/SVGExport.hx +++ b/tools/SVGExport.hx @@ -31,7 +31,7 @@ class SVGExport { try { - var lines = new Array (); + var lines = new Array (); while (true) { diff --git a/tools/utils/CreateTemplate.hx b/tools/utils/CreateTemplate.hx index 5a60d040c..2bc5299eb 100644 --- a/tools/utils/CreateTemplate.hx +++ b/tools/utils/CreateTemplate.hx @@ -14,7 +14,7 @@ import sys.FileSystem; class CreateTemplate { - public static function createExtension (words:Array , userDefines:Map):Void { + public static function createExtension (words:Array, userDefines:Map):Void { var title = "SampleExtension"; @@ -80,7 +80,7 @@ class CreateTemplate { } - public static function createProject (words:Array , userDefines:Map, overrides:HXProject):Void { + public static function createProject (words:Array, userDefines:Map, overrides:HXProject):Void { var colonIndex = words[0].indexOf (":"); @@ -137,7 +137,7 @@ class CreateTemplate { if (projectName != null && projectName != "") { - var defines = new Map (); + var defines = new Map (); defines.set ("create", 1); var project = HXProject.fromHaxelib (new Haxelib (projectName), defines); @@ -306,7 +306,7 @@ class CreateTemplate { } - public static function createSample (words:Array , userDefines:Map) { + public static function createSample (words:Array, userDefines:Map) { var colonIndex = words[0].indexOf (":"); @@ -351,7 +351,7 @@ class CreateTemplate { } - var defines = new Map (); + var defines = new Map (); defines.set ("create", 1); var project = HXProject.fromHaxelib (new Haxelib (projectName), defines); @@ -402,7 +402,7 @@ class CreateTemplate { if (projectName != null && projectName != "") { - var defines = new Map (); + var defines = new Map (); defines.set ("create", 1); var project = HXProject.fromHaxelib (new Haxelib (projectName), defines); diff --git a/tools/utils/JavaExternGenerator.hx b/tools/utils/JavaExternGenerator.hx index 484090ab6..bcbe4d565 100644 --- a/tools/utils/JavaExternGenerator.hx +++ b/tools/utils/JavaExternGenerator.hx @@ -58,7 +58,7 @@ class JavaExternGenerator mExactTypes = new Map(); mProcessed.set("java/lang/Object",true); - var paths = new Array (); + var paths = new Array (); if (FileSystem.isDirectory (javaPath)) { @@ -249,7 +249,7 @@ class JavaExternGenerator } - private function getPaths(basePath:String, source:String, paths:Array ) + private function getPaths(basePath:String, source:String, paths:Array) { var files = FileSystem.readDirectory(basePath + "/" + source); diff --git a/tools/utils/PlatformSetup.hx b/tools/utils/PlatformSetup.hx index 9b9e03fb0..83d74bfb6 100644 --- a/tools/utils/PlatformSetup.hx +++ b/tools/utils/PlatformSetup.hx @@ -253,7 +253,7 @@ class PlatformSetup { } - public static function getDefines (names:Array = null, descriptions:Array = null, ignored:Array = null):Map { + public static function getDefines (names:Array = null, descriptions:Array = null, ignored:Array = null):Map { var config = CommandLineTools.getLimeConfig (); @@ -277,7 +277,7 @@ class PlatformSetup { } else { - defines = new Map (); + defines = new Map (); } @@ -311,7 +311,7 @@ class PlatformSetup { } - var values = new Array (); + var values = new Array (); for (i in 0...names.length) { @@ -576,7 +576,7 @@ class PlatformSetup { var packages = []; var executables = []; - var files:Array = FileSystem.readDirectory (volumePath); + var files:Array = FileSystem.readDirectory (volumePath); for (file in files) { @@ -692,8 +692,8 @@ class PlatformSetup { } - var requiredVariables = new Array (); - var requiredVariableDescriptions = new Array (); + var requiredVariables = new Array (); + var requiredVariableDescriptions = new Array (); if (!setAIRSDK) { @@ -871,9 +871,9 @@ class PlatformSetup { } - var requiredVariables = new Array (); - var requiredVariableDescriptions = new Array (); - var ignoreValues = new Array (); + var requiredVariables = new Array (); + var requiredVariableDescriptions = new Array (); + var ignoreValues = new Array (); if (!setAndroidSDK) { @@ -1436,7 +1436,7 @@ class PlatformSetup { setupHaxelibs.set (haxelib.name, true); - var defines = new Map (); + var defines = new Map (); defines.set ("setup", 1); var basePath = ProcessHelper.runProcess ("", "haxelib", [ "config" ]); @@ -2119,7 +2119,7 @@ class PlatformSetup { } - public static function writeConfig (path:String, defines:Map ):Void { + public static function writeConfig (path:String, defines:Map):Void { var newContent = ""; var definesText = ""; diff --git a/tools/utils/publish/FirefoxMarketplace.hx b/tools/utils/publish/FirefoxMarketplace.hx index 6d42490e4..ef46d0f8c 100644 --- a/tools/utils/publish/FirefoxMarketplace.hx +++ b/tools/utils/publish/FirefoxMarketplace.hx @@ -324,7 +324,7 @@ class FirefoxMarketplace { } - public static function setup (askServer:Bool = true, devServer:Bool = false, defines:Map = null):Void { + public static function setup (askServer:Bool = true, devServer:Bool = false, defines:Map = null):Void { if (defines == null) {