Fix 'bin' template paths when Lime is not included

This commit is contained in:
Joshua Granick
2014-10-16 09:53:57 -07:00
parent 2897e62da5
commit 78cfc4f23a
3 changed files with 20 additions and 9 deletions

View File

@@ -10,6 +10,7 @@ import helpers.ProcessHelper;
import neko.vm.Thread;
import project.Architecture;
import project.Asset;
import project.Haxelib;
import project.HXProject;
import project.Platform;
import sys.FileSystem;
@@ -24,7 +25,8 @@ class HTML5Helper {
if (!FileSystem.exists (FileSystem.fullPath (sourcePath) + ".hash")) {
ProcessHelper.runCommand (Path.directory (sourcePath), "neko", [ PathHelper.findTemplate (project.templatePaths, "bin/hxswfml.n"), "ttf2hash2", Path.withoutDirectory (sourcePath), FileSystem.fullPath (sourcePath) + ".hash", "-glyphs", font.glyphs ]);
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
ProcessHelper.runCommand (Path.directory (sourcePath), "neko", [ PathHelper.findTemplate (templatePaths, "bin/hxswfml.n"), "ttf2hash2", Path.withoutDirectory (sourcePath), FileSystem.fullPath (sourcePath) + ".hash", "-glyphs", font.glyphs ]);
}
@@ -58,7 +60,8 @@ class HTML5Helper {
}
var webify = PathHelper.findTemplate (project.templatePaths, "bin/webify" + suffix);
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
var webify = PathHelper.findTemplate (templatePaths, "bin/webify" + suffix);
if (PlatformHelper.hostPlatform != Platform.WINDOWS) {
Sys.command ("chmod", [ "+x", webify ]);
@@ -109,8 +112,9 @@ class HTML5Helper {
}
var node = PathHelper.findTemplate (project.templatePaths, "bin/node/node" + suffix);
var server = PathHelper.findTemplate (project.templatePaths, "bin/node/http-server/http-server");
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
var node = PathHelper.findTemplate (templatePaths, "bin/node/node" + suffix);
var server = PathHelper.findTemplate (templatePaths, "bin/node/http-server/http-server");
if (PlatformHelper.hostPlatform != Platform.WINDOWS) {
@@ -150,11 +154,13 @@ class HTML5Helper {
if (project.targetFlags.exists ("yui")) {
ProcessHelper.runCommand ("", "java", [ "-Dapple.awt.UIElement=true", "-jar", PathHelper.findTemplate (project.templatePaths, "bin/yuicompressor-2.4.7.jar"), "-o", tempFile, sourceFile ]);
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
ProcessHelper.runCommand ("", "java", [ "-Dapple.awt.UIElement=true", "-jar", PathHelper.findTemplate (templatePaths, "bin/yuicompressor-2.4.7.jar"), "-o", tempFile, sourceFile ]);
} else {
var args = [ "-Dapple.awt.UIElement=true", "-jar", PathHelper.findTemplate (project.templatePaths, "bin/compiler.jar"), "--js", sourceFile, "--js_output_file", tempFile ];
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
var args = [ "-Dapple.awt.UIElement=true", "-jar", PathHelper.findTemplate (templatePaths, "bin/compiler.jar"), "--js", sourceFile, "--js_output_file", tempFile ];
if (!LogHelper.verbose) {

View File

@@ -4,6 +4,7 @@ package helpers;
import haxe.io.Path;
import helpers.PathHelper;
import helpers.ProcessHelper;
import project.Haxelib;
import project.HXProject;
import sys.io.Process;
import sys.FileSystem;
@@ -204,7 +205,8 @@ class IOSHelper {
}
var launcher = PathHelper.findTemplate (project.templatePaths, "bin/ios-sim");
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
var launcher = PathHelper.findTemplate (templatePaths, "bin/ios-sim");
Sys.command ("chmod", [ "+x", launcher ]);
ProcessHelper.runCommand ("", launcher, [ "launch", FileSystem.fullPath (applicationPath), /*"--sdk", project.environment.get ("IPHONE_VER"), "--family", family,*/ "--timeout", "60" ] );
@@ -223,7 +225,8 @@ class IOSHelper {
}
var launcher = PathHelper.findTemplate (project.templatePaths, "bin/ios-deploy");
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
var launcher = PathHelper.findTemplate (templatePaths, "bin/ios-deploy");
Sys.command ("chmod", [ "+x", launcher ]);
var xcodeVersion = getXcodeVersion ();

View File

@@ -7,6 +7,7 @@ import haxe.io.Eof;
import helpers.PathHelper;
import helpers.PlatformHelper;
import helpers.ProcessHelper;
import project.Haxelib;
import project.HXProject;
import project.Platform;
import sys.FileSystem;
@@ -40,7 +41,8 @@ class TizenHelper {
if (keystore == null) {
keystore = PathHelper.findTemplate (project.templatePaths, "bin/debug.p12");
var templatePaths = [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates") ].concat (project.templatePaths);
keystore = PathHelper.findTemplate (templatePaths, "bin/debug.p12");
password = "1234";
}