Run formatter

This commit is contained in:
Joshua Granick
2019-12-24 10:19:56 -08:00
parent c8b994e1ce
commit ea57f2211c
19 changed files with 131 additions and 116 deletions

View File

@@ -479,7 +479,7 @@ class CommandLineTools
{
neko.Lib.load("lime", "lime_application_create", 0);
}
catch(e:Dynamic)
catch (e:Dynamic)
{
untyped $loader.path = $array(path + "Windows64/", $loader.path);
}

View File

@@ -56,15 +56,15 @@ class SVGExport
untyped $loader.path = $array(path + "Windows/", $loader.path);
// if (CFFI.enabled)
// {
try
{
neko.Lib.load("lime", "lime_application_create", 0);
}
catch(e:Dynamic)
{
untyped $loader.path = $array(path + "Windows64/", $loader.path);
}
// }
try
{
neko.Lib.load("lime", "lime_application_create", 0);
}
catch (e:Dynamic)
{
untyped $loader.path = $array(path + "Windows64/", $loader.path);
}
// }
case MAC:
untyped $loader.path = $array(path + "Mac/", $loader.path);

View File

@@ -242,14 +242,17 @@ class AndroidPlatform extends PlatformTarget
{
build = "release";
}
if (project.environment.exists("ANDROID_GRADLE_TASK"))
{
var task = project.environment.get("ANDROID_GRADLE_TASK");
if ( task == "assembleDebug" ) {
build = "debug";
} else {
build = "release";
if (task == "assembleDebug")
{
build = "debug";
}
else
{
build = "release";
}
}
@@ -257,11 +260,11 @@ class AndroidPlatform extends PlatformTarget
if (project.config.exists("android.gradle-build-directory"))
{
outputDirectory = Path.combine(project.config.getString("android.gradle-build-directory"), project.app.file + "/app/outputs/apk/"+build);
outputDirectory = Path.combine(project.config.getString("android.gradle-build-directory"), project.app.file + "/app/outputs/apk/" + build);
}
else
{
outputDirectory = Path.combine(FileSystem.fullPath(targetDirectory), "bin/app/build/outputs/apk/"+build);
outputDirectory = Path.combine(FileSystem.fullPath(targetDirectory), "bin/app/build/outputs/apk/" + build);
}
var apkPath = Path.combine(outputDirectory, project.app.file + "-" + build + ".apk");

View File

@@ -506,10 +506,10 @@ class IOSPlatform extends PlatformTarget
if (project.launchStoryboard != null)
{
var sb = project.launchStoryboard;
var assetsPath = sb.assetsPath;
var imagesets = [];
for (asset in sb.assets)
{
switch (asset.type)
@@ -517,22 +517,22 @@ class IOSPlatform extends PlatformTarget
case "imageset":
var imageset = cast(asset, ImageSet);
imagesets.push(imageset);
var imagesetPath = Path.combine(projectDirectory, "Images.xcassets/" + imageset.name + ".imageset");
System.mkdir(imagesetPath);
var baseImageName = Path.withoutExtension(imageset.name);
var imageScales = ["1x", "2x", "3x"];
var images = [];
for (scale in imageScales)
{
var filename = baseImageName + (scale == "1x" ? "" : "@"+scale) + ".png";
var filename = baseImageName + (scale == "1x" ? "" : "@" + scale) + ".png";
if (FileSystem.exists(Path.combine(assetsPath, filename)))
{
images.push({idiom: "universal", filename: filename, scale: scale});
System.copyFile(Path.combine(assetsPath, filename), Path.combine(imagesetPath, filename));
if (imageset.width == 0 || imageset.height == 0)
{
var dim = ImageHelper.readPNGImageSize(Path.combine(assetsPath, filename));
@@ -542,49 +542,53 @@ class IOSPlatform extends PlatformTarget
}
}
}
var contents = {
images: images,
info: {
version: "1",
author: "xcode"
}
};
var contents =
{
images: images,
info:
{
version: "1",
author: "xcode"
}
};
File.saveContent(Path.combine(imagesetPath, "Contents.json"), Json.stringify(contents));
default:
}
}
if (sb.template != null)
{
sb.templateContext.imagesets = [];
for (imageset in imagesets)
{
sb.templateContext.imagesets.push({
name: imageset.name,
width: imageset.width,
height: imageset.height,
});
sb.templateContext.imagesets.push(
{
name: imageset.name,
width: imageset.width,
height: imageset.height,
});
}
var deployment:String = context.DEPLOYMENT;
var parts = deployment.split(".");
var major = Std.parseInt(parts[0]);
var minor = parts.length >= 2 ? Std.parseInt(parts[1]) : 0;
var patch = parts.length >= 3 ? Std.parseInt(parts[2]) : 0;
Reflect.setField(sb.templateContext, "deploymentVersion", {
major: major,
minor: minor,
patch: patch,
code: Std.parseInt("0x" + major + minor + patch)
});
System.copyFileTemplate(project.templatePaths, "ios/storyboards/" + sb.template, projectDirectory + sb.template, sb.templateContext, true, true);
Reflect.setField(sb.templateContext, "deploymentVersion",
{
major: major,
minor: minor,
patch: patch,
code: Std.parseInt("0x" + major + minor + patch)
});
System.copyFileTemplate(project.templatePaths, "ios/storyboards/" + sb.template, projectDirectory + sb.template, sb.templateContext, true,
true);
context.IOS_LAUNCH_STORYBOARD = Path.withoutExtension(sb.template);
}
else
@@ -643,7 +647,7 @@ class IOSPlatform extends PlatformTarget
context.HAS_LAUNCH_IMAGE = true;
}
System.mkdir(projectDirectory + "/resources");
System.mkdir(projectDirectory + "/haxe/build");

View File

@@ -87,7 +87,8 @@ class WindowsPlatform extends PlatformTarget
if ((targetType == "cpp" || targetType == "winrt"))
{
is64 = true;
} else if (targetType == "neko")
}
else if (targetType == "neko")
{
try
{