Update Haxe formatter, run again
This commit is contained in:
@@ -1110,10 +1110,10 @@ class CommandLineTools
|
||||
{
|
||||
var extension = Path.extension(file);
|
||||
|
||||
if ((extension == "lime" && file != "include.lime") ||
|
||||
(extension == "nmml" && file != "include.nmml") ||
|
||||
(extension == "xml" && file != "include.xml") ||
|
||||
extension == "hxp")
|
||||
if ((extension == "lime" && file != "include.lime")
|
||||
|| (extension == "nmml" && file != "include.nmml")
|
||||
|| (extension == "xml" && file != "include.xml")
|
||||
|| extension == "hxp")
|
||||
{
|
||||
matches.get(extension).push(path);
|
||||
}
|
||||
@@ -1629,7 +1629,9 @@ class CommandLineTools
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
|
||||
if (Path.extension(projectFile) == "lime" || Path.extension(projectFile) == "nmml" || Path.extension(projectFile) == "xml")
|
||||
if (Path.extension(projectFile) == "lime"
|
||||
|| Path.extension(projectFile) == "nmml"
|
||||
|| Path.extension(projectFile) == "xml")
|
||||
{
|
||||
project = new ProjectXMLParser(Path.withoutDirectory(projectFile), userDefines, includePaths);
|
||||
}
|
||||
@@ -1675,7 +1677,9 @@ class CommandLineTools
|
||||
return null;
|
||||
}
|
||||
|
||||
if (project == null || (command != "rebuild" && project.sources.length == 0 && !FileSystem.exists(project.app.main + ".hx")))
|
||||
if (project == null || (command != "rebuild"
|
||||
&& project.sources.length == 0
|
||||
&& !FileSystem.exists(project.app.main + ".hx")))
|
||||
{
|
||||
Log.error("You must have a \"project.xml\" file or specify another valid project file when using the '" + command + "' command");
|
||||
return null;
|
||||
@@ -1704,10 +1708,7 @@ class CommandLineTools
|
||||
|
||||
for (haxelib in project.haxelibs)
|
||||
{
|
||||
if (haxelib.name == "lime" && haxelib.version != null &&
|
||||
haxelib.version != "" &&
|
||||
haxelib.version != "dev" &&
|
||||
!haxelib.versionMatches(version))
|
||||
if (haxelib.name == "lime" && haxelib.version != null && haxelib.version != "" && haxelib.version != "dev" && !haxelib.versionMatches(version))
|
||||
{
|
||||
if (!project.targetFlags.exists("notoolscheck"))
|
||||
{
|
||||
@@ -1870,8 +1871,9 @@ class CommandLineTools
|
||||
|
||||
if (System.hostPlatform == WINDOWS)
|
||||
{
|
||||
isRootDirectory = (lastArgument.length == 3 && lastArgument.charAt(1) == ":" && (lastArgument.charAt(2) == "/" || lastArgument
|
||||
.charAt(2) == "\\"));
|
||||
isRootDirectory = (lastArgument.length == 3
|
||||
&& lastArgument.charAt(1) == ":"
|
||||
&& (lastArgument.charAt(2) == "/" || lastArgument.charAt(2) == "\\"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2029,7 +2031,9 @@ class CommandLineTools
|
||||
overrides.config.set("tvos.team-id", argValue);
|
||||
}
|
||||
}
|
||||
else if (StringTools.startsWith(field, "app-") || StringTools.startsWith(field, "meta-") || StringTools.startsWith(field, "window-"))
|
||||
else if (StringTools.startsWith(field, "app-")
|
||||
|| StringTools.startsWith(field, "meta-")
|
||||
|| StringTools.startsWith(field, "window-"))
|
||||
{
|
||||
var split = field.split("-");
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package haxe.zip;
|
||||
|
||||
import haxe.zip.Entry;
|
||||
|
||||
@@ -285,8 +285,7 @@ class AIRPlatform extends FlashPlatform
|
||||
{
|
||||
if (StringTools.endsWith(dependency.path, ".ane"))
|
||||
{
|
||||
var extension:Dynamic =
|
||||
{name: dependency.name};
|
||||
var extension:Dynamic = {name: dependency.name};
|
||||
context.extensions.push(extension);
|
||||
context.HAXE_FLAGS += "\n-swf-lib " + dependency.path;
|
||||
}
|
||||
|
||||
@@ -214,8 +214,9 @@ class AndroidPlatform extends PlatformTarget
|
||||
|
||||
public override function rebuild():Void
|
||||
{
|
||||
var armv5 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.ARMV5) || ArrayTools.containsValue(project
|
||||
.architectures, Architecture.ARMV6));
|
||||
var armv5 = (command == "rebuild"
|
||||
|| ArrayTools.containsValue(project.architectures, Architecture.ARMV5)
|
||||
|| ArrayTools.containsValue(project.architectures, Architecture.ARMV6));
|
||||
var armv7 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.ARMV7));
|
||||
var arm64 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.ARM64));
|
||||
var x86 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.X86));
|
||||
@@ -363,10 +364,10 @@ class AndroidPlatform extends PlatformTarget
|
||||
|
||||
for (dependency in project.dependencies)
|
||||
{
|
||||
if (dependency.path != "" &&
|
||||
FileSystem.exists(dependency.path) &&
|
||||
FileSystem.isDirectory(dependency.path) &&
|
||||
(FileSystem.exists(Path.combine(dependency.path, "project.properties")) || FileSystem.exists(Path.combine(dependency.path, "build.gradle"))))
|
||||
if (dependency.path != ""
|
||||
&& FileSystem.exists(dependency.path)
|
||||
&& FileSystem.isDirectory(dependency.path)
|
||||
&& (FileSystem.exists(Path.combine(dependency.path, "project.properties")) || FileSystem.exists(Path.combine(dependency.path, "build.gradle"))))
|
||||
{
|
||||
var name = dependency.name;
|
||||
if (name == "") name = "project" + index;
|
||||
|
||||
@@ -78,7 +78,9 @@ class HTML5Platform extends PlatformTarget
|
||||
|
||||
for (dependency in project.dependencies)
|
||||
{
|
||||
if (dependency.embed && StringTools.endsWith(dependency.path, ".js") && FileSystem.exists(dependency.path))
|
||||
if (dependency.embed
|
||||
&& StringTools.endsWith(dependency.path, ".js")
|
||||
&& FileSystem.exists(dependency.path))
|
||||
{
|
||||
var script = File.getContent(dependency.path);
|
||||
context.embeddedLibraries.push(script);
|
||||
|
||||
@@ -135,8 +135,9 @@ class IOSPlatform extends PlatformTarget
|
||||
|
||||
for (dependency in project.dependencies)
|
||||
{
|
||||
if (!StringTools.endsWith(dependency.name, ".framework") && !StringTools.endsWith(dependency.name, ".tbd") && !StringTools.endsWith(dependency
|
||||
.path, ".framework"))
|
||||
if (!StringTools.endsWith(dependency.name, ".framework")
|
||||
&& !StringTools.endsWith(dependency.name, ".tbd")
|
||||
&& !StringTools.endsWith(dependency.path, ".framework"))
|
||||
{
|
||||
if (dependency.path != "")
|
||||
{
|
||||
@@ -144,8 +145,8 @@ class IOSPlatform extends PlatformTarget
|
||||
|
||||
if (dependency.forceLoad)
|
||||
{
|
||||
project.config.push("ios.linker-flags", "-force_load $SRCROOT/$PRODUCT_NAME/lib/$CURRENT_ARCH/" + Path.withoutDirectory(dependency
|
||||
.path));
|
||||
project.config.push("ios.linker-flags",
|
||||
"-force_load $SRCROOT/$PRODUCT_NAME/lib/$CURRENT_ARCH/" + Path.withoutDirectory(dependency.path));
|
||||
}
|
||||
|
||||
if (StringTools.startsWith(name, "lib"))
|
||||
@@ -466,16 +467,11 @@ class IOSPlatform extends PlatformTarget
|
||||
|
||||
var iconSizes:Array<IconSize> = [
|
||||
{name: "Icon-20.png", size: 20}, {name: "Icon-Small.png", size: 29}, {name: "Icon-Small-40.png", size: 40}, {name: "Icon-20@2x.png", size: 40},
|
||||
{name: "Icon-Small-50.png", size: 50},
|
||||
{name: "Icon.png", size: 57}, {name: "Icon-Small@2x.png", size: 58}, {name: "Icon-20@3x.png", size: 60},
|
||||
{name: "Icon-72.png", size: 72},
|
||||
{name: "Icon-76.png", size: 76}, {name: "Icon-Small-40@2x.png", size: 80}, {name: "Icon-Small@3x.png", size: 87},
|
||||
{name: "Icon-Small-50@2x.png", size: 100},
|
||||
{name: "Icon@2x.png", size: 114}, {name: "Icon-60@2x.png", size: 120},
|
||||
{name: "Icon-Small-40@3x.png", size: 120},
|
||||
{name: "Icon-72@2x.png", size: 144}, {name: "Icon-76@2x.png", size: 152},
|
||||
{name: "Icon-83.5@2x.png", size: 167},
|
||||
{name: "Icon-60@3x.png", size: 180}, {name: "Icon-Marketing.png", size: 1024}
|
||||
{name: "Icon-Small-50.png", size: 50}, {name: "Icon.png", size: 57}, {name: "Icon-Small@2x.png", size: 58}, {name: "Icon-20@3x.png", size: 60},
|
||||
{name: "Icon-72.png", size: 72}, {name: "Icon-76.png", size: 76}, {name: "Icon-Small-40@2x.png", size: 80}, {name: "Icon-Small@3x.png", size: 87},
|
||||
{name: "Icon-Small-50@2x.png", size: 100}, {name: "Icon@2x.png", size: 114}, {name: "Icon-60@2x.png", size: 120},
|
||||
{name: "Icon-Small-40@3x.png", size: 120}, {name: "Icon-72@2x.png", size: 144}, {name: "Icon-76@2x.png", size: 152},
|
||||
{name: "Icon-83.5@2x.png", size: 167}, {name: "Icon-60@3x.png", size: 180}, {name: "Icon-Marketing.png", size: 1024}
|
||||
];
|
||||
|
||||
context.HAS_ICON = true;
|
||||
@@ -519,7 +515,9 @@ class IOSPlatform extends PlatformTarget
|
||||
|
||||
for (splashScreen in project.splashScreens)
|
||||
{
|
||||
if (splashScreen.width == size.w && splashScreen.height == size.h && Path.extension(splashScreen.path) == "png")
|
||||
if (splashScreen.width == size.w
|
||||
&& splashScreen.height == size.h
|
||||
&& Path.extension(splashScreen.path) == "png")
|
||||
{
|
||||
System.copyFile(splashScreen.path, Path.combine(splashScreenPath, size.name));
|
||||
match = true;
|
||||
@@ -563,10 +561,10 @@ class IOSPlatform extends PlatformTarget
|
||||
ProjectHelper.recursiveSmartCopyTemplate(project, "haxe", projectDirectory + "/haxe", context, true, false);
|
||||
ProjectHelper.recursiveSmartCopyTemplate(project, "iphone/PROJ/Classes", projectDirectory + "/Classes", context, true, false);
|
||||
ProjectHelper.recursiveSmartCopyTemplate(project, "iphone/PROJ/Images.xcassets", projectDirectory + "/Images.xcassets", context, true, false);
|
||||
System.copyFileTemplate(project.templatePaths, "iphone/PROJ/PROJ-Info.plist", projectDirectory + "/" + project.app.file + "-Info.plist", context, true,
|
||||
false);
|
||||
System.copyFileTemplate(project.templatePaths, "iphone/PROJ/PROJ-Prefix.pch", projectDirectory + "/" + project.app.file + "-Prefix.pch", context, true,
|
||||
false);
|
||||
System.copyFileTemplate(project.templatePaths, "iphone/PROJ/PROJ-Info.plist", projectDirectory + "/" + project.app.file + "-Info.plist", context,
|
||||
true, false);
|
||||
System.copyFileTemplate(project.templatePaths, "iphone/PROJ/PROJ-Prefix.pch", projectDirectory + "/" + project.app.file + "-Prefix.pch", context,
|
||||
true, false);
|
||||
ProjectHelper.recursiveSmartCopyTemplate(project, "iphone/PROJ.xcodeproj", targetDirectory + "/" + project.app
|
||||
.file + ".xcodeproj", context, true, false);
|
||||
|
||||
|
||||
@@ -114,8 +114,9 @@ class TVOSPlatform extends PlatformTarget
|
||||
|
||||
for (dependency in project.dependencies)
|
||||
{
|
||||
if (!StringTools.endsWith(dependency.name, ".framework") && !StringTools.endsWith(dependency.name, ".tbd") && !StringTools.endsWith(dependency
|
||||
.path, ".framework"))
|
||||
if (!StringTools.endsWith(dependency.name, ".framework")
|
||||
&& !StringTools.endsWith(dependency.name, ".tbd")
|
||||
&& !StringTools.endsWith(dependency.path, ".framework"))
|
||||
{
|
||||
if (dependency.path != "")
|
||||
{
|
||||
@@ -389,12 +390,9 @@ class TVOSPlatform extends PlatformTarget
|
||||
|
||||
var iconSizes:Array<IconSize> = [
|
||||
{name: "Icon-Small.png", size: 29}, {name: "Icon-Small-40.png", size: 40}, {name: "Icon-Small-50.png", size: 50}, {name: "Icon.png", size: 57},
|
||||
{name: "Icon-Small@2x.png", size: 58},
|
||||
{name: "Icon-72.png", size: 72}, {name: "Icon-76.png", size: 76}, {name: "Icon-Small-40@2x.png", size: 80},
|
||||
{name: "Icon-Small-50@2x.png", size: 100},
|
||||
{name: "Icon@2x.png", size: 114}, {name: "Icon-60@2x.png", size: 120}, {name: "Icon-72@2x.png", size: 144},
|
||||
{name: "Icon-76@2x.png", size: 152},
|
||||
{name: "Icon-60@3x.png", size: 180},
|
||||
{name: "Icon-Small@2x.png", size: 58}, {name: "Icon-72.png", size: 72}, {name: "Icon-76.png", size: 76}, {name: "Icon-Small-40@2x.png", size: 80},
|
||||
{name: "Icon-Small-50@2x.png", size: 100}, {name: "Icon@2x.png", size: 114}, {name: "Icon-60@2x.png", size: 120},
|
||||
{name: "Icon-72@2x.png", size: 144}, {name: "Icon-76@2x.png", size: 152}, {name: "Icon-60@3x.png", size: 180},
|
||||
];
|
||||
|
||||
context.HAS_ICON = true;
|
||||
@@ -435,7 +433,9 @@ class TVOSPlatform extends PlatformTarget
|
||||
|
||||
for (splashScreen in project.splashScreens)
|
||||
{
|
||||
if (splashScreen.width == size.w && splashScreen.height == size.h && Path.extension(splashScreen.path) == "png")
|
||||
if (splashScreen.width == size.w
|
||||
&& splashScreen.height == size.h
|
||||
&& Path.extension(splashScreen.path) == "png")
|
||||
{
|
||||
System.copyFile(splashScreen.path, Path.combine(splashScreenPath, size.name));
|
||||
match = true;
|
||||
|
||||
@@ -442,7 +442,9 @@ class WindowsPlatform extends PlatformTarget
|
||||
|
||||
var commands = [];
|
||||
|
||||
if (!targetFlags.exists("64") && (command == "rebuild" || System.hostArchitecture == X86 || (targetType != "cpp" && targetType != "winrt")))
|
||||
if (!targetFlags.exists("64") && (command == "rebuild"
|
||||
|| System.hostArchitecture == X86
|
||||
|| (targetType != "cpp" && targetType != "winrt")))
|
||||
{
|
||||
if (targetFlags.exists("winrt"))
|
||||
{
|
||||
@@ -458,7 +460,9 @@ class WindowsPlatform extends PlatformTarget
|
||||
// as previous Windows builds. For now, force -64 to be done last
|
||||
// so that it can be debugged in a default "rebuild"
|
||||
|
||||
if (!targetFlags.exists("32") && System.hostArchitecture == X64 && (command != "rebuild" || targetType == "cpp" || targetType == "winrt"))
|
||||
if (!targetFlags.exists("32")
|
||||
&& System.hostArchitecture == X64
|
||||
&& (command != "rebuild" || targetType == "cpp" || targetType == "winrt"))
|
||||
{
|
||||
if (targetFlags.exists("winrt"))
|
||||
{
|
||||
|
||||
@@ -382,8 +382,7 @@ class JavaExternGenerator
|
||||
var hi = src.readInt32();
|
||||
var lo = src.readInt32();
|
||||
// debug("Long - ignore");
|
||||
mConstants[cid] =
|
||||
{lo: lo, hi: hi};
|
||||
mConstants[cid] = {lo: lo, hi: hi};
|
||||
cid++;
|
||||
|
||||
case 6:
|
||||
@@ -406,8 +405,7 @@ class JavaExternGenerator
|
||||
var cref = src.readUInt16();
|
||||
var type = src.readUInt16();
|
||||
// debug("Member ref:" + cref + "," + type);
|
||||
mConstants[cid] =
|
||||
{cref: cref, type: type};
|
||||
mConstants[cid] = {cref: cref, type: type};
|
||||
|
||||
default:
|
||||
throw("Unknown constant tag:" + tag);
|
||||
@@ -603,8 +601,7 @@ class JavaExternGenerator
|
||||
|
||||
var ret_full_class = constructor || ((mExactTypes.exists(retType.name) || isPOD(retType.name)) && retType.arrayCount == 0);
|
||||
|
||||
if (constructor) retType =
|
||||
{name: mCurrentType, java: mCurrentType, arrayCount: 0};
|
||||
if (constructor) retType = {name: mCurrentType, java: mCurrentType, arrayCount: 0};
|
||||
|
||||
var ret_void = (retType.name == "Void" && retType.arrayCount == 0);
|
||||
|
||||
|
||||
@@ -452,8 +452,7 @@ class FirefoxHelper
|
||||
public static inline var DEVELOPMENT_SERVER_URL = "https://marketplace-dev.allizom.org";
|
||||
private static inline var TITLE_MAX_CHARS = 127;
|
||||
private static inline var MAX_CATEGORIES = 2;
|
||||
private static var MIN_WH_SCREENSHOT =
|
||||
{width: 320, height: 480};
|
||||
private static var MIN_WH_SCREENSHOT = {width: 320, height: 480};
|
||||
|
||||
private static function isScreenshotValid(path:String):Bool
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user