From 534c6cd7ce41a39f06fff1a6e8bc2462d630e0e2 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 25 Jul 2018 20:27:05 -0700 Subject: [PATCH] Eval, HXP, asset library fixes --- src/haxe/io/Bytes.hx | 43 ++- src/lime/_internal/format/JPEG.hx | 2 +- src/lime/_internal/format/PNG.hx | 2 +- src/lime/_internal/macros/DefineMacro.hx | 14 +- src/lime/system/System.hx | 2 +- tools/platforms/AIRPlatform.hx | 363 +++++++++---------- tools/platforms/AndroidPlatform.hx | 425 ++++++++++++----------- tools/platforms/EmscriptenPlatform.hx | 3 + tools/platforms/FlashPlatform.hx | 255 +++++++------- tools/platforms/HTML5Platform.hx | 3 + tools/platforms/IOSPlatform.hx | 3 + tools/platforms/LinuxPlatform.hx | 399 ++++++++++----------- tools/platforms/MacPlatform.hx | 361 +++++++++---------- tools/platforms/TVOSPlatform.hx | 3 + tools/platforms/TizenPlatform.hx | 207 +++++------ tools/platforms/WindowsPlatform.hx | 3 + tools/platforms/extraParams.hxml | 1 + 17 files changed, 1083 insertions(+), 1006 deletions(-) create mode 100644 tools/platforms/extraParams.hxml diff --git a/src/haxe/io/Bytes.hx b/src/haxe/io/Bytes.hx index 5c71cda33..8229e74f0 100644 --- a/src/haxe/io/Bytes.hx +++ b/src/haxe/io/Bytes.hx @@ -19,7 +19,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -package haxe.io; #if (!hl && !js) +package haxe.io; #if (!hl && !js && !eval) #if cpp @@ -793,12 +793,12 @@ class Bytes { // this requires that we have wrapped it with haxe.io.Bytes beforehand return untyped b.bytes[pos]; } - + #if lime_bytes_length_getter private function get_length() : Int { return l; } - + private function set_length( v : Int ) : Int { return l = v; } @@ -968,4 +968,41 @@ class Bytes { } +#elseif eval + + +extern class Bytes { + function new(length:Int,b:BytesData):Void; + public var length(default,null):Int; + public function get( pos : Int ) : Int; + public function set( pos : Int, v : Int ) : Void; + public function blit( pos : Int, src : Bytes, srcpos : Int, len : Int ) : Void; + public function fill( pos : Int, len : Int, value : Int ):Void; + public function sub( pos : Int, len : Int ) : Bytes; + public function compare( other : Bytes ) : Int; + public function getDouble( pos : Int ) : Float; + public function getFloat( pos : Int ) : Float; + public function setDouble( pos : Int, v : Float ) : Void; + public function setFloat( pos : Int, v : Float ) : Void; + public function getUInt16( pos : Int ) : Int; + public function setUInt16( pos : Int, v : Int ) : Void; + public function getInt32( pos : Int ) : Int; + public function getInt64( pos : Int ) : haxe.Int64; + public function setInt32( pos : Int, v : Int ) : Void; + public function setInt64( pos : Int, v : haxe.Int64 ) : Void; + public function getString( pos : Int, len : Int ) : String; + public function toString() : String; + public function toHex() : String; + public function getData() : BytesData; + public static function alloc( length : Int ) : Bytes; + @:pure + public static function ofString( s : String ) : Bytes; + public static function ofData( b : BytesData ) : Bytes; + public static function fastGet( b : BytesData, pos : Int ) : Int; + static function __init__():Void { + haxe.io.Error; + } +} + + #end \ No newline at end of file diff --git a/src/lime/_internal/format/JPEG.hx b/src/lime/_internal/format/JPEG.hx index 6a8a1af71..cda8d1d45 100644 --- a/src/lime/_internal/format/JPEG.hx +++ b/src/lime/_internal/format/JPEG.hx @@ -109,7 +109,7 @@ class JPEG { #if java - #elseif (sys && (!disable_cffi || !format) && !macro) + #elseif (sys && lime_cffi && (!disable_cffi || !format) && !macro) if (CFFI.enabled) { diff --git a/src/lime/_internal/format/PNG.hx b/src/lime/_internal/format/PNG.hx index 086398c06..63705ffea 100644 --- a/src/lime/_internal/format/PNG.hx +++ b/src/lime/_internal/format/PNG.hx @@ -109,7 +109,7 @@ class PNG { #if java - #elseif (sys && (!disable_cffi || !format) && !macro) + #elseif (sys && lime_cffi && (!disable_cffi || !format) && !macro) if (CFFI.enabled) { diff --git a/src/lime/_internal/macros/DefineMacro.hx b/src/lime/_internal/macros/DefineMacro.hx index 664bb3d41..0ad0fcf14 100644 --- a/src/lime/_internal/macros/DefineMacro.hx +++ b/src/lime/_internal/macros/DefineMacro.hx @@ -46,24 +46,26 @@ class DefineMacro { Compiler.define ("native"); + var cffi = (!Context.defined ("nocffi") && !Context.defined ("eval")); + if (Context.defined ("ios") || Context.defined ("android") || Context.defined ("tizen")) { Compiler.define ("mobile"); - if (!Context.defined ("nocffi")) Compiler.define ("lime-opengles"); + if (cffi) Compiler.define ("lime-opengles"); } else if (Context.defined ("emscripten")) { Compiler.define ("web"); - if (!Context.defined ("nocffi")) Compiler.define ("lime-opengles"); + if (cffi) Compiler.define ("lime-opengles"); } else { Compiler.define ("desktop"); - if (!Context.defined ("nocffi")) Compiler.define ("lime-opengl"); + if (cffi) Compiler.define ("lime-opengl"); } - if (!Context.defined ("nocffi")) { + if (cffi) { Compiler.define ("lime-cffi"); @@ -73,6 +75,10 @@ class DefineMacro { Compiler.define ("lime-harfbuzz"); Compiler.define ("lime-vorbis"); + } else { + + Compiler.define ("disable-cffi"); + } } diff --git a/src/lime/system/System.hx b/src/lime/system/System.hx index 50545cf3b..6aa7adfea 100644 --- a/src/lime/system/System.hx +++ b/src/lime/system/System.hx @@ -284,7 +284,7 @@ class System { return flash.Lib.getTimer (); #elseif ((js && !nodejs) || electron) return Std.int (Browser.window.performance.now ()); - #elseif (!disable_cffi && !macro) + #elseif (lime_cffi && !macro) return cast NativeCFFI.lime_system_get_timer (); #elseif cpp return Std.int (untyped __global__.__time_stamp () * 1000); diff --git a/tools/platforms/AIRPlatform.hx b/tools/platforms/AIRPlatform.hx index a1490a608..021c50a87 100644 --- a/tools/platforms/AIRPlatform.hx +++ b/tools/platforms/AIRPlatform.hx @@ -9,6 +9,7 @@ import hxp.project.Icon; import hxp.project.Platform; import hxp.project.PlatformType; import hxp.helpers.AIRHelper; +import hxp.helpers.AssetHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; import hxp.helpers.FlashHelper; @@ -22,387 +23,389 @@ import sys.FileSystem; class AIRPlatform extends FlashPlatform { - - + + private var iconData:Array; private var splashScreenData:Array; private var targetPlatform:Platform; private var targetPlatformType:PlatformType; - - + + public function new (command:String, _project:HXProject, targetFlags:Map) { - + super (command, _project, targetFlags); - + targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("air.output-directory", "air")); - + if (targetFlags.exists ("android")) { - + targetPlatform = Platform.ANDROID; targetPlatformType = MOBILE; - + } else if (targetFlags.exists ("ios")) { - + targetPlatform = Platform.IOS; targetPlatformType = MOBILE; - + } else if (targetFlags.exists ("windows")) { - + targetPlatform = Platform.WINDOWS; targetPlatformType = DESKTOP; - + } else if (targetFlags.exists ("mac")) { - + targetPlatform = Platform.MAC; targetPlatformType = DESKTOP; - + } else { - + targetPlatform = PlatformHelper.hostPlatform; targetPlatformType = DESKTOP; - + } - + } - - + + public override function build ():Void { - + super.build (); - + if (!project.defines.exists ("AIR_SDK")) { - + LogHelper.error ("You must define AIR_SDK with the path to your AIR SDK"); - + } - + // TODO: Should we package on desktop in "deploy" command instead? - + if (targetPlatformType != DESKTOP) { - + var files = [ project.app.file + ".swf" ]; for (asset in project.assets) { - + if (asset.embed == false && asset.type != TEMPLATE) { - + files.push (asset.targetPath); - + } - + } - + for (icon in iconData) { - + files.push (icon.path); - + } - + for (splashScreen in splashScreenData) { - + files.push (splashScreen.path); - + } - + var targetPath = switch (targetPlatform) { - + case ANDROID: "bin/" + project.app.file + ".apk"; case IOS: "bin/" + project.app.file + ".ipa"; default: "bin/" + project.app.file + ".air"; - + } - + AIRHelper.build (project, targetDirectory, targetPlatform, targetPath, "application.xml", files, "bin"); - + } - + } - - + + public override function clean ():Void { - + if (FileSystem.exists (targetDirectory)) { - + PathHelper.removeDirectory (targetDirectory); - + } - + } - - + + public override function deploy ():Void { - + if (targetFlags.exists ("gdrive") || targetFlags.exists ("zip")) { - + DeploymentHelper.deploy (project, targetFlags, targetDirectory, "AIR"); - + } else { - + var rootDirectory = targetDirectory + "/bin"; var paths = PathHelper.readDirectory (rootDirectory, [ project.app.file + ".apk", project.app.file + ".ipa", project.app.file + ".air" ]); var files = []; - + for (path in paths) { - + files.push (path.substr (rootDirectory.length + 1)); - + } - + var name = project.meta.title + " (" + project.meta.version + " build " + project.meta.buildNumber + ")"; - + switch (targetPlatform) { - + case WINDOWS: - + name += " (Windows)"; - + case MAC: - + name += " (macOS)"; - + case IOS: - + name += " (iOS).ipa"; - + case ANDROID: - + name += " (Android).apk"; - + default: - + } - + var outputPath = "dist/" + name; - + PathHelper.mkdir (targetDirectory + "/dist"); - + outputPath = AIRHelper.build (project, targetDirectory, targetPlatform, outputPath, "application.xml", files, "bin"); - + if (targetPlatformType == DESKTOP) { - + ZipHelper.compress (PathHelper.combine (targetDirectory, outputPath), PathHelper.combine (targetDirectory, "dist/" + name + ".zip")); - + } - + } - + } - - + + private override function getDisplayHXML ():String { - + var hxml = PathHelper.findTemplate (project.templatePaths, "flash/hxml/" + buildType + ".hxml"); - + var context = project.templateContext; context.WIN_FLASHBACKGROUND = StringTools.hex (project.window.background, 6); context.OUTPUT_DIR = targetDirectory; - + for (dependency in project.dependencies) { - + if (StringTools.endsWith (dependency.path, ".ane")) { - + context.HAXE_FLAGS += "\n-swf-lib " + dependency.path; - + } - + } - + var template = new Template (File.getContent (hxml)); - + return template.execute (context) + "\n-D display"; - + } - - + + public override function install ():Void { - + // TODO: Make separate install step - + } - - + + public override function run ():Void { - + AIRHelper.run (project, targetDirectory, targetPlatform, "application.xml", "bin"); - + } - - + + 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 { - + + AssetHelper.processLibraries (project, targetDirectory); + var destination = targetDirectory + "/bin/"; PathHelper.mkdir (destination); - + // project = project.clone (); - + embedded = FlashHelper.embedAssets (project, targetDirectory); - + var context = generateContext (); context.OUTPUT_DIR = targetDirectory; context.AIR_SDK_VERSION = project.config.getString ("air.sdk-version", "28.0"); - + var buildNumber = Std.string (context.APP_BUILD_NUMBER); - + if (buildNumber.length <= 3) { - + context.APP_BUILD_NUMBER_SPLIT = buildNumber; - + } else { - + var major = null; - + var patch = buildNumber.substr (-3); buildNumber = buildNumber.substr (0, -3); - + var minor = buildNumber.substr (-Std.int (Math.min (buildNumber.length, 3))); buildNumber = buildNumber.substr (0, -minor.length); - + if (buildNumber.length > 0) { - + major = buildNumber.substr (-Std.int (Math.min (buildNumber.length, 3))); buildNumber = buildNumber.substr (0, -major.length); - + } - + var buildNumberSplit = minor + "." + patch; if (major != null) buildNumberSplit = major + "." + buildNumberSplit; - + context.APP_BUILD_NUMBER_SPLIT = buildNumberSplit; - + if (buildNumber.length > 0) { - + LogHelper.warn ("Application build number " + buildNumber + buildNumberSplit + " exceeds 9 digits"); - + } - + } - + var targetDevice = project.config.getString ("ios.device", "universal"); var targetDevices = []; - + if (targetDevice != "ipad") targetDevices.push (1); // iphone if (targetDevice != "iphone") targetDevices.push (2); // ipad - + context.IOS_TARGET_DEVICES = targetDevices; - + var iconSizes = [ 16, 29, 32, 36, 40, 48, 50, 57, 58, 60, 72, 75, 76, 80, 87, 96, 100, 114, 120, 128, 144, 152, 167, 180, 192, 512, 1024 ]; var icons = project.icons; iconData = []; - + if (icons.length == 0) { - + icons = [ new Icon (PathHelper.findTemplate (project.templatePaths, "default/icon.svg")) ]; - + } - + for (size in iconSizes) { - + if (IconHelper.createIcon (icons, size, size, targetDirectory + "/bin/_res/icon-" + size + ".png")) { - + iconData.push ({ size: size, path: "_res/icon-" + size + ".png" }); - + } - + } - + if (iconData.length > 0) context.icons = iconData; - + context.extensions = new Array(); - + for (dependency in project.dependencies) { - + if (StringTools.endsWith (dependency.path, ".ane")) { - + var extension:Dynamic = { name: dependency.name }; context.extensions.push (extension); context.HAXE_FLAGS += "\n-swf-lib " + dependency.path; - + } - + } - + FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, "air/hxml", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, "air/template", targetDirectory, context); - + if (embedded) { - + var files = [ "debug.hxml", "release.hxml", "final.hxml" ]; var path, hxml, lines, output; - + for (file in files) { - + path = targetDirectory + "/haxe/" + file; hxml = File.getContent (path); - + if (hxml.indexOf ("-swf-header") > -1) { - + lines = ~/[\r\n]+/g.split (hxml); output = []; - + for (line in lines) { - + if (line.indexOf ("-swf-header") > -1) continue; output.push (line); - + } - + if (output.length < lines.length) { - + File.saveContent (path, output.join ("\n")); - + } - + } - + } - + } - + for (asset in project.assets) { - + if (asset.type == AssetType.TEMPLATE || asset.embed == false /*|| !usesLime*/) { - + var path = PathHelper.combine (destination, asset.targetPath); - + PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path, context); - + } - + } - + splashScreenData = []; - + if (project.splashScreens != null) { - + for (splashScreen in project.splashScreens) { - + var path = Path.withoutDirectory (splashScreen.path); FileHelper.copyFile (splashScreen.path, PathHelper.combine (destination, path), context); splashScreenData.push ({ path: path }); - + } - + } - + } - - + + @ignore public override function rebuild ():Void {} - - + + } diff --git a/tools/platforms/AndroidPlatform.hx b/tools/platforms/AndroidPlatform.hx index dca3d7cf4..6c05dd1f1 100644 --- a/tools/platforms/AndroidPlatform.hx +++ b/tools/platforms/AndroidPlatform.hx @@ -5,6 +5,7 @@ import haxe.io.Path; import haxe.Template; import hxp.helpers.AndroidHelper; import hxp.helpers.ArrayHelper; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; @@ -24,281 +25,283 @@ import sys.FileSystem; class AndroidPlatform extends PlatformTarget { - - + + private var deviceID:String; - - + + public function new (command:String, _project:HXProject, targetFlags:Map) { - + super (command, _project, targetFlags); - + if (command != "display" && command != "clean") { - + // project = project.clone (); - + if (!project.environment.exists ("ANDROID_SETUP")) { - + LogHelper.error ("You need to run \"lime setup android\" before you can use the Android target"); - + } - + AndroidHelper.initialize (project); - + if (deviceID == null && project.targetFlags.exists ("device")) { - + deviceID = project.targetFlags.get ("device") + ":5555"; - + } - + } - + targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("android.output-directory", "android")); - + } - - + + public override function build ():Void { - + var destination = targetDirectory + "/bin"; var hxml = targetDirectory + "/haxe/" + buildType + ".hxml"; var sourceSet = destination + "/app/src/main"; - + var hasARMV5 = (ArrayHelper.containsValue (project.architectures, Architecture.ARMV5) || ArrayHelper.containsValue (project.architectures, Architecture.ARMV6)); var hasARMV7 = ArrayHelper.containsValue (project.architectures, Architecture.ARMV7); var hasARM64 = ArrayHelper.containsValue (project.architectures, Architecture.ARM64); var hasX86 = ArrayHelper.containsValue (project.architectures, Architecture.X86); - + var architectures = []; - + if (hasARMV5) architectures.push (Architecture.ARMV5); if (hasARMV7 || (!hasARMV5 && !hasX86)) architectures.push (Architecture.ARMV7); if (hasARM64) architectures.push (Architecture.ARM64); if (hasX86) architectures.push (Architecture.X86); - + for (architecture in architectures) { - + var haxeParams = [ hxml, "-D", "android", "-D", "PLATFORM=android-14" ]; var cppParams = [ "-Dandroid", "-DPLATFORM=android-14" ]; var path = sourceSet + "/jniLibs/armeabi"; var suffix = ".so"; - + if (architecture == Architecture.ARMV7) { - + haxeParams.push ("-D"); haxeParams.push ("HXCPP_ARMV7"); cppParams.push ("-DHXCPP_ARMV7"); - + if (hasARMV5) { - + path = sourceSet + "/jniLibs/armeabi-v7a"; - + } - + suffix = "-v7.so"; - + } else if (architecture == Architecture.ARM64) { - + haxeParams = [ hxml, "-D", "android", "-D", "PLATFORM=android-21" ]; cppParams = [ "-Dandroid", "-DPLATFORM=android-21" ]; - + haxeParams.push ("-D"); haxeParams.push ("HXCPP_ARM64"); cppParams.push ("-DHXCPP_ARM64"); path = sourceSet + "/jniLibs/arm64-v8a"; suffix = "-64.so"; - + } else if (architecture == Architecture.X86) { - + haxeParams.push ("-D"); haxeParams.push ("HXCPP_X86"); cppParams.push ("-DHXCPP_X86"); path = sourceSet + "/jniLibs/x86"; suffix = "-x86.so"; - + } - + for (ndll in project.ndlls) { - + FileHelper.copyLibrary (project, ndll, "Android", "lib", suffix, path, project.debug, ".so"); - + } - + ProcessHelper.runCommand ("", "haxe", haxeParams); - + if (noOutput) return; - + CPPHelper.compile (project, targetDirectory + "/obj", cppParams); - + FileHelper.copyIfNewer (targetDirectory + "/obj/libApplicationMain" + (project.debug ? "-debug" : "") + suffix, path + "/libApplicationMain.so"); - + } - + if (!ArrayHelper.containsValue (project.architectures, Architecture.ARMV7) || !hasARMV5) { - + if (FileSystem.exists (sourceSet + "/jniLibs/armeabi-v7a")) { - + PathHelper.removeDirectory (sourceSet + "/jniLibs/armeabi-v7a"); - + } - + } - + if (!hasARM64) { - + if (FileSystem.exists (sourceSet + "/jniLibs/arm64-v8a")) { - + PathHelper.removeDirectory (sourceSet + "/jniLibs/arm64-v8a"); - + } - + } - + if (!hasX86) { - + if (FileSystem.exists (sourceSet + "/jniLibs/x86")) { - + PathHelper.removeDirectory (sourceSet + "/jniLibs/x86"); - + } - + } - + if (noOutput) return; - + AndroidHelper.build (project, destination); - + } - - + + public override function clean ():Void { - + if (FileSystem.exists (targetDirectory)) { - + PathHelper.removeDirectory (targetDirectory); - + } - + } - - + + public override function deploy ():Void { - + DeploymentHelper.deploy (project, targetFlags, targetDirectory, "Android"); - + } - - + + public override function display ():Void { - + Sys.println (getDisplayHXML ()); - + } - - + + private function getDisplayHXML ():String { - + var hxml = PathHelper.findTemplate (project.templatePaths, "android/hxml/" + buildType + ".hxml"); - + var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; context.OUTPUT_DIR = targetDirectory; - + var template = new Template (File.getContent (hxml)); - + return template.execute (context) + "\n-D display"; - + } - - + + public override function install ():Void { - + var build = "-debug"; - + if (project.keystore != null) { - + build = "-release"; - + } - + var outputDirectory = null; - + if (project.config.exists ("android.gradle-build-directory")) { - + outputDirectory = PathHelper.combine (project.config.getString ("android.gradle-build-directory"), project.app.file + "/app/outputs/apk"); - + } else { - + outputDirectory = PathHelper.combine (FileSystem.fullPath (targetDirectory), "bin/app/build/outputs/apk"); - + } - + var apkPath = PathHelper.combine (outputDirectory, project.app.file + build + ".apk"); - + deviceID = AndroidHelper.install (project, apkPath, deviceID); - + } - - + + public override function rebuild ():Void { - + var armv5 = (command == "rebuild" || ArrayHelper.containsValue (project.architectures, Architecture.ARMV5) || ArrayHelper.containsValue (project.architectures, Architecture.ARMV6)); var armv7 = (command == "rebuild" || ArrayHelper.containsValue (project.architectures, Architecture.ARMV7)); var arm64 = (command == "rebuild" || ArrayHelper.containsValue (project.architectures, Architecture.ARM64)); var x86 = (command == "rebuild" || ArrayHelper.containsValue (project.architectures, Architecture.X86)); - + var commands = []; - + if (armv5) commands.push ([ "-Dandroid", "-DPLATFORM=android-14" ]); if (armv7) commands.push ([ "-Dandroid", "-DHXCPP_ARMV7", "-DHXCPP_ARM7", "-DPLATFORM=android-14" ]); if (arm64) commands.push ([ "-Dandroid", "-DHXCPP_ARM64", "-DPLATFORM=android-21" ]); if (x86) commands.push ([ "-Dandroid", "-DHXCPP_X86", "-DPLATFORM=android-14" ]); - + CPPHelper.rebuild (project, commands); - + } - - + + public override function run ():Void { - + AndroidHelper.run (project.meta.packageName + "/" + project.meta.packageName + ".MainActivity", deviceID); - + } - - + + public override function trace ():Void { - + AndroidHelper.trace (project, project.debug, deviceID); - + } - - + + public override function uninstall ():Void { - + AndroidHelper.uninstall (project.meta.packageName, deviceID); - + } - - + + public override function update ():Void { - + + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); - + for (asset in project.assets) { - + if (asset.embed && asset.sourcePath == "") { - + var path = PathHelper.combine (targetDirectory + "/obj/tmp", asset.targetPath); PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path); asset.sourcePath = path; - + } - + } - + //initialize (project); - + var destination = targetDirectory + "/bin"; var sourceSet = destination + "/app/src/main"; PathHelper.mkdir (sourceSet); @@ -306,48 +309,48 @@ class AndroidPlatform extends PlatformTarget { PathHelper.mkdir (sourceSet + "/res/drawable-mdpi/"); PathHelper.mkdir (sourceSet + "/res/drawable-hdpi/"); PathHelper.mkdir (sourceSet + "/res/drawable-xhdpi/"); - + for (asset in project.assets) { - + if (asset.type != AssetType.TEMPLATE) { - + var targetPath = ""; - + switch (asset.type) { - + default: //case SOUND, MUSIC: - + //var extension = Path.extension (asset.sourcePath); //asset.flatName += ((extension != "") ? "." + extension : ""); - + //asset.resourceName = asset.flatName; targetPath = PathHelper.combine (sourceSet + "/assets/", asset.resourceName); - + //asset.resourceName = asset.id; //targetPath = sourceSet + "/res/raw/" + asset.flatName + "." + Path.extension (asset.targetPath); - + //default: - + //asset.resourceName = asset.flatName; //targetPath = sourceSet + "/assets/" + asset.resourceName; - + } - + FileHelper.copyAssetIfNewer (asset, targetPath); - + } - + } - + if (project.targetFlags.exists ("xml")) { - + project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); - + } - + var context = project.templateContext; - + context.CPP_DIR = targetDirectory + "/obj"; context.OUTPUT_DIR = targetDirectory; context.ANDROID_INSTALL_LOCATION = project.config.getString ("android.install-location", "auto"); @@ -358,149 +361,149 @@ class AndroidPlatform extends PlatformTarget { context.ANDROID_GRADLE_VERSION = project.config.getString ("android.gradle-version", "2.10"); context.ANDROID_GRADLE_PLUGIN = project.config.getString ("android.gradle-plugin", "2.1.0"); context.ANDROID_LIBRARY_PROJECTS = []; - + if (!project.environment.exists ("ANDROID_SDK") || !project.environment.exists ("ANDROID_NDK_ROOT")) { - + var command = #if lime "lime" #else "hxp" #end; var toolsBase = Type.resolveClass ("CommandLineTools"); if (toolsBase != null) command = Reflect.field (toolsBase, "commandName"); - + LogHelper.error ("You must define ANDROID_SDK and ANDROID_NDK_ROOT to target Android, please run '" + command + " setup android' first"); Sys.exit (1); - + } - + if (project.config.exists ("android.gradle-build-directory")) { - + context.ANDROID_GRADLE_BUILD_DIRECTORY = project.config.getString ("android.gradle-build-directory"); - + } - + if (project.config.exists ("android.build-tools-version")) { - + context.ANDROID_BUILD_TOOLS_VERSION = project.config.getString ("android.build-tools-version"); - + } else { - + context.ANDROID_BUILD_TOOLS_VERSION = AndroidHelper.getBuildToolsVersion (project); - + } - + var escaped = ~/([ #!=\\:])/g; context.ANDROID_SDK_ESCAPED = escaped.replace(context.ENV_ANDROID_SDK, "\\$1"); context.ANDROID_NDK_ROOT_ESCAPED = escaped.replace(context.ENV_ANDROID_NDK_ROOT, "\\$1"); - + if (Reflect.hasField (context, "KEY_STORE")) context.KEY_STORE = StringTools.replace (context.KEY_STORE, "\\", "\\\\"); if (Reflect.hasField (context, "KEY_STORE_ALIAS")) context.KEY_STORE_ALIAS = StringTools.replace (context.KEY_STORE_ALIAS, "\\", "\\\\"); if (Reflect.hasField (context, "KEY_STORE_PASSWORD")) context.KEY_STORE_PASSWORD = StringTools.replace (context.KEY_STORE_PASSWORD, "\\", "\\\\"); if (Reflect.hasField (context, "KEY_STORE_ALIAS_PASSWORD")) context.KEY_STORE_ALIAS_PASSWORD = StringTools.replace (context.KEY_STORE_ALIAS_PASSWORD, "\\", "\\\\"); - + var index = 1; - + for (dependency in project.dependencies) { - + if (dependency.path != "" && FileSystem.exists (dependency.path) && FileSystem.isDirectory (dependency.path) && (FileSystem.exists (PathHelper.combine (dependency.path, "project.properties")) || FileSystem.exists (PathHelper.combine (dependency.path, "build.gradle")))) { - + var name = dependency.name; if (name == "") name = "project" + index; - + context.ANDROID_LIBRARY_PROJECTS.push ({ name: name, index: index, path: "deps/" + name, source: dependency.path }); index++; - + } - + } - + var iconTypes = [ "ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi" ]; var iconSizes = [ 36, 48, 72, 96, 144, 192 ]; var icons = project.icons; - + if (icons.length == 0) { - + icons = [ new Icon (PathHelper.findTemplate (project.templatePaths, "default/icon.svg")) ]; - + } - + for (i in 0...iconTypes.length) { - + if (IconHelper.createIcon (icons, iconSizes[i], iconSizes[i], sourceSet + "/res/drawable-" + iconTypes[i] + "/icon.png")) { - + context.HAS_ICON = true; - + } - + } - + IconHelper.createIcon (icons, 732, 412, sourceSet + "/res/drawable-xhdpi/ouya_icon.png"); - + var packageDirectory = project.meta.packageName; packageDirectory = sourceSet + "/java/" + packageDirectory.split (".").join ("/"); PathHelper.mkdir (packageDirectory); - + for (javaPath in project.javaPaths) { - + try { - + if (FileSystem.isDirectory (javaPath)) { - + FileHelper.recursiveCopy (javaPath, sourceSet + "/java", context, true); - + } else { - + if (Path.extension (javaPath) == "jar") { - + FileHelper.copyIfNewer (javaPath, destination + "/app/libs/" + Path.withoutDirectory (javaPath)); - + } else { - + FileHelper.copyIfNewer (javaPath, sourceSet + "/java/" + Path.withoutDirectory (javaPath)); - + } - + } - + } catch (e:Dynamic) {} - - // throw"Could not find javaPath " + javaPath +" required by extension."; - + + // throw"Could not find javaPath " + javaPath +" required by extension."; + //} - + } - + for (library in context.ANDROID_LIBRARY_PROJECTS) { - + FileHelper.recursiveCopy (library.source, destination + "/deps/" + library.name, context, true); - + } - + FileHelper.recursiveSmartCopyTemplate (project, "android/template", destination, context); FileHelper.copyFileTemplate (project.templatePaths, "android/MainActivity.java", packageDirectory + "/MainActivity.java", context); FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, "android/hxml", targetDirectory + "/haxe", context); - + for (asset in project.assets) { - + if (asset.type == AssetType.TEMPLATE) { - + var targetPath = PathHelper.combine (destination, asset.targetPath); PathHelper.mkdir (Path.directory (targetPath)); FileHelper.copyAsset (asset, targetPath, context); - + } - + } - + } - - + + public override function watch ():Void { - + var dirs = WatchHelper.processHXML (project, getDisplayHXML ()); var command = WatchHelper.getCurrentCommand (); WatchHelper.watch (project, command, dirs); - + } - - + + } diff --git a/tools/platforms/EmscriptenPlatform.hx b/tools/platforms/EmscriptenPlatform.hx index 387a0589d..a1510adb9 100644 --- a/tools/platforms/EmscriptenPlatform.hx +++ b/tools/platforms/EmscriptenPlatform.hx @@ -4,6 +4,7 @@ package; import haxe.io.Path; import haxe.Json; import haxe.Template; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; @@ -285,6 +286,8 @@ class EmscriptenPlatform extends PlatformTarget { public override function update ():Void { + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); for (asset in project.assets) { diff --git a/tools/platforms/FlashPlatform.hx b/tools/platforms/FlashPlatform.hx index 47c7251dc..da636990a 100644 --- a/tools/platforms/FlashPlatform.hx +++ b/tools/platforms/FlashPlatform.hx @@ -4,6 +4,7 @@ package; import haxe.io.Path; import haxe.Json; import haxe.Template; +import hxp.helpers.AssetHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; import hxp.helpers.FlashHelper; @@ -27,268 +28,270 @@ import neko.vm.Thread; class FlashPlatform extends PlatformTarget { - - + + private var embedded:Bool; private var logLength:Int = 0; - - + + public function new (command:String, _project:HXProject, targetFlags:Map) { - + super (command, _project, targetFlags); - + targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("flash.output-directory", "flash")); - + } - - + + public override function build ():Void { - + ProcessHelper.runCommand ("", "haxe", [ targetDirectory + "/haxe/" + buildType + ".hxml" ]); - + } - - + + public override function clean ():Void { - + var targetPath = targetDirectory + ""; - + if (FileSystem.exists (targetPath)) { - + PathHelper.removeDirectory (targetPath); - + } - + } - - + + public override function deploy ():Void { - + DeploymentHelper.deploy (project, targetFlags, targetDirectory, "Flash"); - + } - - + + public override function display ():Void { - + Sys.println (getDisplayHXML ()); - + } - - + + private function generateContext ():Dynamic { - + // project = project.clone (); - + if (project.targetFlags.exists ("xml")) { - + project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); - + } - + if (LogHelper.verbose) { - + project.haxedefs.set ("verbose", 1); - + } - + var context = project.templateContext; context.WIN_FLASHBACKGROUND = project.window.background != null ? StringTools.hex (project.window.background, 6) : "0xFFFFFF"; var assets:Array = cast context.assets; - + for (asset in assets) { - + var assetType:AssetType = Reflect.field (AssetType, asset.type.toUpperCase ()); - + switch (assetType) { - + case MUSIC : asset.flashClass = "flash.media.Sound"; case SOUND : asset.flashClass = "flash.media.Sound"; case IMAGE : asset.flashClass = "flash.display.BitmapData"; case FONT : asset.flashClass = "flash.text.Font"; default: asset.flashClass = "flash.utils.ByteArray"; - + } - + } - + return context; - + } - - + + private function getDisplayHXML ():String { - + var hxml = PathHelper.findTemplate (project.templatePaths, "flash/hxml/" + buildType + ".hxml"); - + var context = project.templateContext; context.WIN_FLASHBACKGROUND = StringTools.hex (project.window.background, 6); context.OUTPUT_DIR = targetDirectory; - + var template = new Template (File.getContent (hxml)); - + return template.execute (context) + "\n-D display"; - + } - - + + public override function run ():Void { - + if (traceEnabled) { - + FlashHelper.enableLogging (); logLength = FlashHelper.getLogLength (); - + } - + if (project.app.url != null && project.app.url != "") { - + ProcessHelper.openURL (project.app.url); - + } else { - + var destination = targetDirectory + "/bin"; var targetPath = project.app.file + ".swf"; - + if (project.targetFlags.exists ("web")) { - + HTML5Helper.launch (project, targetDirectory + "/bin"); - + } else { - + if (traceEnabled) { - + #if neko Thread.create (function () { #end - + FlashHelper.run (project, destination, targetPath); //Sys.exit (0); - + #if neko }); #end - + Sys.sleep (0.1); - + } else { - + FlashHelper.run (project, destination, targetPath); - + } - + } - + } - + } - - + + public override function trace ():Void { - + FlashHelper.enableLogging (); FlashHelper.tailLog (logLength); - + } - - + + public override function update ():Void { - + + AssetHelper.processLibraries (project, targetDirectory); + var destination = targetDirectory + "/bin/"; PathHelper.mkdir (destination); - + // project = project.clone (); - + embedded = FlashHelper.embedAssets (project, targetDirectory); - + var context = generateContext (); context.OUTPUT_DIR = targetDirectory; - + FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, "flash/hxml", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, "flash/haxe", targetDirectory + "/haxe", context, true, false); - + if (project.targetFlags.exists ("web") || project.app.url != "") { - + PathHelper.mkdir (destination); FileHelper.recursiveSmartCopyTemplate (project, "flash/templates/web", destination, generateContext ()); - + } - + if (embedded) { - + var files = [ "debug.hxml", "release.hxml", "final.hxml" ]; var path, hxml, lines, output; - + for (file in files) { - + path = targetDirectory + "/haxe/" + file; hxml = File.getContent (path); - + if (hxml.indexOf ("-swf-header") > -1) { - + lines = ~/[\r\n]+/g.split (hxml); output = []; - + for (line in lines) { - + if (line.indexOf ("-swf-header") > -1) continue; output.push (line); - + } - + if (output.length < lines.length) { - + File.saveContent (path, output.join ("\n")); - + } - + } - + } - + } - + for (asset in project.assets) { - + if (asset.type == AssetType.TEMPLATE || asset.embed == false /*|| !usesLime*/) { - + var path = PathHelper.combine (destination, asset.targetPath); - + PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path, context); - + } - + } - + } - - + + /*private function getIcon (size:Int, targetPath:String):Void { - + var icon = icons.findIcon (size, size); - + if (icon != "") { - + FileHelper.copyIfNewer (icon, targetPath); - + } else { - + icons.updateIcon (size, size, targetPath); - + } - + }*/ - - + + public override function watch ():Void { - + var dirs = WatchHelper.processHXML (project, getDisplayHXML ()); var command = WatchHelper.getCurrentCommand (); WatchHelper.watch (project, command, dirs); - + } - - + + @ignore public override function install ():Void {} @ignore public override function rebuild ():Void {} @ignore public override function uninstall ():Void {} - + } diff --git a/tools/platforms/HTML5Platform.hx b/tools/platforms/HTML5Platform.hx index 18f351a5a..9077d3648 100644 --- a/tools/platforms/HTML5Platform.hx +++ b/tools/platforms/HTML5Platform.hx @@ -6,6 +6,7 @@ import haxe.Template; #if lime import lime.text.Font; #end +import hxp.helpers.AssetHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.ElectronHelper; import hxp.helpers.FileHelper; @@ -186,6 +187,8 @@ class HTML5Platform extends PlatformTarget { public override function update ():Void { + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); var destination = targetDirectory + "/bin/"; diff --git a/tools/platforms/IOSPlatform.hx b/tools/platforms/IOSPlatform.hx index 76fc53a0c..1cdc244ea 100644 --- a/tools/platforms/IOSPlatform.hx +++ b/tools/platforms/IOSPlatform.hx @@ -6,6 +6,7 @@ import haxe.io.Path; import haxe.Json; import haxe.Template; import hxp.helpers.ArrayHelper; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; @@ -462,6 +463,8 @@ class IOSPlatform extends PlatformTarget { public override function update ():Void { + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); for (asset in project.assets) { diff --git a/tools/platforms/LinuxPlatform.hx b/tools/platforms/LinuxPlatform.hx index 1df61a6d0..29fc4b709 100644 --- a/tools/platforms/LinuxPlatform.hx +++ b/tools/platforms/LinuxPlatform.hx @@ -3,6 +3,7 @@ package; import haxe.io.Path; import haxe.Template; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; @@ -26,432 +27,434 @@ import sys.FileSystem; class LinuxPlatform extends PlatformTarget { - - + + private var applicationDirectory:String; private var executablePath:String; private var is64:Bool; private var isRaspberryPi:Bool; private var targetType:String; - - + + public function new (command:String, _project:HXProject, targetFlags:Map ) { - + super (command, _project, targetFlags); - + for (architecture in project.architectures) { - + if (!targetFlags.exists ("32") && architecture == Architecture.X64) { - + is64 = true; - + } else if (architecture == Architecture.ARMV7) { - + isRaspberryPi = true; - + } - + } - + if (project.targetFlags.exists ("rpi")) { - + isRaspberryPi = true; is64 = false; - + } - + if (project.targetFlags.exists ("neko") || project.target != PlatformHelper.hostPlatform) { - + targetType = "neko"; - + } else if (project.targetFlags.exists ("hl")) { - + targetType = "hl"; - + } else if (project.targetFlags.exists ("nodejs")) { - + targetType = "nodejs"; - + } else if (project.targetFlags.exists ("java")) { - + targetType = "java"; - + } else { - + targetType = "cpp"; - + } - + targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("linux.output-directory", targetType == "cpp" ? "linux" : targetType)); targetDirectory = StringTools.replace (targetDirectory, "arch64", is64 ? "64" : ""); applicationDirectory = targetDirectory + "/bin/"; executablePath = PathHelper.combine (applicationDirectory, project.app.file); - + } - - + + public override function build ():Void { - + var hxml = targetDirectory + "/haxe/" + buildType + ".hxml"; - + PathHelper.mkdir (targetDirectory); - + if (!project.targetFlags.exists ("static") || targetType != "cpp") { - + var targetSuffix = (targetType == "hl") ? ".hdll" : null; - + for (ndll in project.ndlls) { - + if (isRaspberryPi) { - + FileHelper.copyLibrary (project, ndll, "RPi", "", (ndll.haxelib != null && (ndll.haxelib.name == "hxcpp" || ndll.haxelib.name == "hxlibc")) ? ".dso" : ".ndll", applicationDirectory, project.debug, targetSuffix); - + } else { - + FileHelper.copyLibrary (project, ndll, "Linux" + (is64 ? "64" : ""), "", (ndll.haxelib != null && (ndll.haxelib.name == "hxcpp" || ndll.haxelib.name == "hxlibc")) ? ".dso" : ".ndll", applicationDirectory, project.debug, targetSuffix); - + } - + } - + } - + if (targetType == "neko") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + if (isRaspberryPi) { - + NekoHelper.createExecutable (project.templatePaths, "rpi", targetDirectory + "/obj/ApplicationMain.n", executablePath); NekoHelper.copyLibraries (project.templatePaths, "rpi", applicationDirectory); - + } else { - + NekoHelper.createExecutable (project.templatePaths, "linux" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath); NekoHelper.copyLibraries (project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory); - + } - + } else if (targetType == "hl") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".hl", PathHelper.combine (applicationDirectory, project.app.file + ".hl")); - + } else if (targetType == "nodejs") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); //NekoHelper.createExecutable (project.templatePaths, "linux" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath); //NekoHelper.copyLibraries (project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory); - + } else if (targetType == "java") { - + var libPath = PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates/java/lib/"); - + ProcessHelper.runCommand ("", "haxe", [ hxml, "-java-lib", libPath + "disruptor.jar", "-java-lib", libPath + "lwjgl.jar" ]); //ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + var haxeVersion = project.environment.get ("haxe_ver"); var haxeVersionString = "3404"; - + if (haxeVersion.length > 4) { - + haxeVersionString = haxeVersion.charAt (0) + haxeVersion.charAt (2) + (haxeVersion.length == 5 ? "0" + haxeVersion.charAt (4) : haxeVersion.charAt (4) + haxeVersion.charAt (5)); - + } - + ProcessHelper.runCommand (targetDirectory + "/obj", "haxelib", [ "run", "hxjava", "hxjava_build.txt", "--haxe-version", haxeVersionString ]); FileHelper.recursiveCopy (targetDirectory + "/obj/lib", PathHelper.combine (applicationDirectory, "lib")); FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".jar", PathHelper.combine (applicationDirectory, project.app.file + ".jar")); JavaHelper.copyLibraries (project.templatePaths, "Linux" + (is64 ? "64" : ""), applicationDirectory); - + } else { - + var haxeArgs = [ hxml ]; var flags = []; - + if (is64) { - + haxeArgs.push ("-D"); haxeArgs.push ("HXCPP_M64"); flags.push ("-DHXCPP_M64"); - + } else { - + haxeArgs.push ("-D"); haxeArgs.push ("HXCPP_M32"); flags.push ("-DHXCPP_M32"); - + } - + if (!project.targetFlags.exists ("static")) { - + ProcessHelper.runCommand ("", "haxe", haxeArgs); - + if (noOutput) return; - + CPPHelper.compile (project, targetDirectory + "/obj", flags); - + FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-debug" : ""), executablePath); - + } else { - + ProcessHelper.runCommand ("", "haxe", haxeArgs.concat ([ "-D", "static_link" ])); - + if (noOutput) return; - + CPPHelper.compile (project, targetDirectory + "/obj", flags.concat ([ "-Dstatic_link" ])); CPPHelper.compile (project, targetDirectory + "/obj", flags, "BuildMain.xml"); - + FileHelper.copyFile (targetDirectory + "/obj/Main" + (project.debug ? "-debug" : ""), executablePath); - + } - + } - + if (PlatformHelper.hostPlatform != Platform.WINDOWS && (targetType != "nodejs" && targetType != "java")) { - + ProcessHelper.runCommand ("", "chmod", [ "755", executablePath ]); - + } - + } - - + + public override function clean ():Void { - + if (FileSystem.exists (targetDirectory)) { - + PathHelper.removeDirectory (targetDirectory); - + } - + } - - + + public override function deploy ():Void { - + DeploymentHelper.deploy (project, targetFlags, targetDirectory, "Linux " + (is64 ? "64" : "32") + "-bit"); - + } - - + + public override function display ():Void { - + Sys.println (getDisplayHXML ()); - + } - - + + private function generateContext ():Dynamic { - + // var project = project.clone (); - + if (isRaspberryPi) { - + project.haxedefs.set ("rpi", 1); - + } - + var context = project.templateContext; - + context.NEKO_FILE = targetDirectory + "/obj/ApplicationMain.n"; context.NODE_FILE = targetDirectory + "/bin/ApplicationMain.js"; context.HL_FILE = targetDirectory + "/obj/ApplicationMain.hl"; context.CPP_DIR = targetDirectory + "/obj/"; context.BUILD_DIR = project.app.path + "/linux" + (is64 ? "64" : "") + (isRaspberryPi ? "-rpi" : ""); context.WIN_ALLOW_SHADERS = false; - + return context; - + } - - + + private function getDisplayHXML ():String { - + var hxml = PathHelper.findTemplate (project.templatePaths, targetType + "/hxml/" + buildType + ".hxml"); var template = new Template (File.getContent (hxml)); - + var context = generateContext (); context.OUTPUT_DIR = targetDirectory; - + return template.execute (context) + "\n-D display"; - + } - - + + public override function rebuild ():Void { - + var commands = []; - + if (targetFlags.exists ("rpi")) { - + commands.push ([ "-Dlinux", "-Drpi", "-Dtoolchain=linux", "-DBINDIR=RPi", "-DCXX=arm-linux-gnueabihf-g++", "-DHXCPP_M32", "-DHXCPP_STRIP=arm-linux-gnueabihf-strip", "-DHXCPP_AR=arm-linux-gnueabihf-ar", "-DHXCPP_RANLIB=arm-linux-gnueabihf-ranlib" ]); - + } else { - + if (!targetFlags.exists ("32") && PlatformHelper.hostArchitecture == X64) { - + commands.push ([ "-Dlinux", "-DHXCPP_M64" ]); - + } - + if (!targetFlags.exists ("64") && (command == "rebuild" || PlatformHelper.hostArchitecture == Architecture.X86)) { - + commands.push ([ "-Dlinux", "-DHXCPP_M32" ]); - + } - + } - + CPPHelper.rebuild (project, commands); - + } - - + + public override function run ():Void { - + var arguments = additionalArguments.copy (); - + if (LogHelper.verbose) { - + arguments.push ("-verbose"); - + } - + if (targetType == "hl") { - + ProcessHelper.runCommand (applicationDirectory, "hl", [ project.app.file + ".hl" ].concat (arguments)); - + } else if (targetType == "nodejs") { - + NodeJSHelper.run (project, targetDirectory + "/bin/ApplicationMain.js", arguments); - + } else if (targetType == "java") { - + ProcessHelper.runCommand (applicationDirectory, "java", [ "-jar", project.app.file + ".jar" ].concat (arguments)); - + } else if (project.target == PlatformHelper.hostPlatform) { - + arguments = arguments.concat ([ "-livereload" ]); ProcessHelper.runCommand (applicationDirectory, "./" + Path.withoutDirectory (executablePath), arguments); - + } - + } - - + + public override function update ():Void { - + + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); //initialize (project); - + for (asset in project.assets) { - + if (asset.embed && asset.sourcePath == "") { - + var path = PathHelper.combine (targetDirectory + "/obj/tmp", asset.targetPath); PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path); asset.sourcePath = path; - + } - + } - + if (project.targetFlags.exists ("xml")) { - + project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); - + } - + var context = generateContext (); context.OUTPUT_DIR = targetDirectory; - + if (targetType == "cpp" && project.targetFlags.exists ("static")) { - + for (i in 0...project.ndlls.length) { - + var ndll = project.ndlls[i]; - + if (ndll.path == null || ndll.path == "") { - + if (isRaspberryPi) { - + context.ndlls[i].path = PathHelper.getLibraryPath (ndll, "RPi", "lib", ".a", project.debug); - + } else { - + context.ndlls[i].path = PathHelper.getLibraryPath (ndll, "Linux" + (is64 ? "64" : ""), "lib", ".a", project.debug); - + } - + } - + } - + } - + PathHelper.mkdir (targetDirectory); PathHelper.mkdir (targetDirectory + "/obj"); PathHelper.mkdir (targetDirectory + "/haxe"); PathHelper.mkdir (applicationDirectory); - + //SWFHelper.generateSWFClasses (project, targetDirectory + "/haxe"); - + FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, targetType + "/hxml", targetDirectory + "/haxe", context); - + if (targetType == "cpp" && project.targetFlags.exists ("static")) { - + FileHelper.recursiveSmartCopyTemplate (project, "cpp/static", targetDirectory + "/obj", context); - + } - + //context.HAS_ICON = IconHelper.createIcon (project.icons, 256, 256, PathHelper.combine (applicationDirectory, "icon.png")); for (asset in project.assets) { - + var path = PathHelper.combine (applicationDirectory, asset.targetPath); - + if (asset.embed != true) { - + if (asset.type != AssetType.TEMPLATE) { - + PathHelper.mkdir (Path.directory (path)); FileHelper.copyAssetIfNewer (asset, path); - + } else { - + PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path, context); - + } - + } - + } - + } - - + + public override function watch ():Void { - + var dirs = WatchHelper.processHXML (project, getDisplayHXML ()); var command = WatchHelper.getCurrentCommand (); WatchHelper.watch (project, command, dirs); - + } - - + + @ignore public override function install ():Void {} @ignore public override function trace ():Void {} @ignore public override function uninstall ():Void {} - - + + } \ No newline at end of file diff --git a/tools/platforms/MacPlatform.hx b/tools/platforms/MacPlatform.hx index e7be6344d..333d8278e 100644 --- a/tools/platforms/MacPlatform.hx +++ b/tools/platforms/MacPlatform.hx @@ -3,6 +3,7 @@ package; import haxe.io.Path; import haxe.Template; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.CSHelper; import hxp.helpers.DeploymentHelper; @@ -30,129 +31,129 @@ import sys.FileSystem; class MacPlatform extends PlatformTarget { - - + + private var applicationDirectory:String; private var contentDirectory:String; private var executableDirectory:String; private var executablePath:String; private var is64:Bool; private var targetType:String; - - + + public function new (command:String, _project:HXProject, targetFlags:Map ) { - + super (command, _project, targetFlags); - + for (architecture in project.architectures) { - + if (architecture == Architecture.X64) { - + is64 = true; - + } - + } - + if (project.targetFlags.exists ("neko") || project.target != PlatformHelper.hostPlatform) { - + targetType = "neko"; - + } else if (project.targetFlags.exists ("hl")) { - + targetType = "hl"; - + } else if (project.targetFlags.exists ("java")) { - + targetType = "java"; - + } else if (project.targetFlags.exists ("nodejs")) { - + targetType = "nodejs"; - + } else if (project.targetFlags.exists ("cs")) { - + targetType = "cs"; - + } else { - + targetType = "cpp"; - + } - + targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("mac.output-directory", targetType == "cpp" ? "macos" : targetType)); targetDirectory = StringTools.replace (targetDirectory, "arch64", is64 ? "64" : ""); applicationDirectory = targetDirectory + "/bin/" + project.app.file + ".app"; contentDirectory = applicationDirectory + "/Contents/Resources"; executableDirectory = applicationDirectory + "/Contents/MacOS"; executablePath = executableDirectory + "/" + project.app.file; - + } - - + + public override function build ():Void { - + var hxml = targetDirectory + "/haxe/" + buildType + ".hxml"; - + PathHelper.mkdir (targetDirectory); - + if (!project.targetFlags.exists ("static") || targetType != "cpp") { - + var targetSuffix = (targetType == "hl") ? ".hdll" : null; - + for (ndll in project.ndlls) { - + FileHelper.copyLibrary (project, ndll, "Mac" + (is64 ? "64" : ""), "", (ndll.haxelib != null && (ndll.haxelib.name == "hxcpp" || ndll.haxelib.name == "hxlibc")) ? ".dylib" : ".ndll", executableDirectory, project.debug, targetSuffix); - + } - + } - + if (targetType == "neko") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + NekoHelper.createExecutable (project.templatePaths, "mac" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath); NekoHelper.copyLibraries (project.templatePaths, "mac" + (is64 ? "64" : ""), executableDirectory); - + } else if (targetType == "hl") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".hl", PathHelper.combine (executableDirectory, project.app.file + ".hl")); - + } else if (targetType == "java") { - + var libPath = PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "templates/java/lib/"); - + ProcessHelper.runCommand ("", "haxe", [ hxml, "-java-lib", libPath + "disruptor.jar", "-java-lib", libPath + "lwjgl.jar" ]); - + if (noOutput) return; - + HaxelibHelper.runCommand (targetDirectory + "/obj", [ "run", "hxjava", "hxjava_build.txt", "--haxe-version", "3103" ]); FileHelper.recursiveCopy (targetDirectory + "/obj/lib", PathHelper.combine (executableDirectory, "lib")); FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".jar", PathHelper.combine (executableDirectory, project.app.file + ".jar")); JavaHelper.copyLibraries (project.templatePaths, "Mac" + (is64 ? "64" : ""), executableDirectory); - + } else if (targetType == "nodejs") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + //NekoHelper.createExecutable (project.templatePaths, "Mac" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath); //NekoHelper.copyLibraries (project.templatePaths, "Mac" + (is64 ? "64" : ""), executableDirectory); - + } else if (targetType == "cs") { - + ProcessHelper.runCommand ("", "haxe", [ hxml ]); - + if (noOutput) return; - + CSHelper.copySourceFiles (project.templatePaths, targetDirectory + "/obj/src"); var txtPath = targetDirectory + "/obj/hxcs_build.txt"; CSHelper.addSourceFiles (txtPath, CSHelper.ndllSourceFiles); @@ -160,266 +161,268 @@ class MacPlatform extends PlatformTarget { CSHelper.compile (project, targetDirectory + "/obj", targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-debug" : ""), "x64", "desktop"); FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-debug" : "") + ".exe", executablePath + ".exe"); File.saveContent (executablePath, "#!/bin/sh\nmono ${PWD}/" + project.app.file + ".exe"); - + } else { - + var haxeArgs = [ hxml, "-D", "HXCPP_CLANG" ]; var flags = [ "-DHXCPP_CLANG" ]; - + if (is64) { - + haxeArgs.push ("-D"); haxeArgs.push ("HXCPP_M64"); flags.push ("-DHXCPP_M64"); - + } - + if (!project.targetFlags.exists ("static")) { - + ProcessHelper.runCommand ("", "haxe", haxeArgs); - + if (noOutput) return; - + CPPHelper.compile (project, targetDirectory + "/obj", flags); - + FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-debug" : ""), executablePath); - + } else { - + ProcessHelper.runCommand ("", "haxe", haxeArgs.concat ([ "-D", "static_link" ])); - + if (noOutput) return; - + CPPHelper.compile (project, targetDirectory + "/obj", flags.concat ([ "-Dstatic_link" ])); CPPHelper.compile (project, targetDirectory + "/obj", flags, "BuildMain.xml"); - + FileHelper.copyFile (targetDirectory + "/obj/Main" + (project.debug ? "-debug" : ""), executablePath); - + } - + } - + if (PlatformHelper.hostPlatform != Platform.WINDOWS && targetType != "nodejs" && targetType != "java") { - + ProcessHelper.runCommand ("", "chmod", [ "755", executablePath ]); - + } - + } - - + + public override function clean ():Void { - + if (FileSystem.exists (targetDirectory)) { - + PathHelper.removeDirectory (targetDirectory); - + } - + } - - + + public override function deploy ():Void { - + DeploymentHelper.deploy (project, targetFlags, targetDirectory, "Mac"); - + } - - + + public override function display ():Void { - + Sys.println (getDisplayHXML ()); - + } - - + + private function generateContext ():Dynamic { - + var context = project.templateContext; context.NEKO_FILE = targetDirectory + "/obj/ApplicationMain.n"; context.NODE_FILE = executableDirectory + "/ApplicationMain.js"; context.HL_FILE = targetDirectory + "/obj/ApplicationMain.hl"; context.CPP_DIR = targetDirectory + "/obj/"; context.BUILD_DIR = project.app.path + "/mac" + (is64 ? "64" : ""); - + return context; - + } - - + + private function getDisplayHXML ():String { - + var hxml = PathHelper.findTemplate (project.templatePaths, targetType + "/hxml/" + buildType + ".hxml"); var template = new Template (File.getContent (hxml)); - + var context = generateContext (); context.OUTPUT_DIR = targetDirectory; - + return template.execute (context) + "\n-D display"; - + } - - + + public override function rebuild ():Void { - + var commands = []; - + if (!targetFlags.exists ("32") && (command == "rebuild" || PlatformHelper.hostArchitecture == Architecture.X64)) { - + commands.push ([ "-Dmac", "-DHXCPP_CLANG", "-DHXCPP_M64" ]); - + } - + if (!targetFlags.exists ("64") && (command == "rebuild" || PlatformHelper.hostArchitecture == Architecture.X86)) { - + commands.push ([ "-Dmac", "-DHXCPP_CLANG", "-DHXCPP_M32" ]); - + } - + CPPHelper.rebuild (project, commands); - + } - - + + public override function run ():Void { - + var arguments = additionalArguments.copy (); - + if (LogHelper.verbose) { - + arguments.push ("-verbose"); - + } - + if (targetType == "hl") { - + ProcessHelper.runCommand (applicationDirectory, "hl", [ project.app.file + ".hl" ].concat (arguments)); - + } else if (targetType == "nodejs") { - + NodeJSHelper.run (project, executableDirectory + "/ApplicationMain.js", arguments); - + } else if (targetType == "java") { - + ProcessHelper.runCommand (executableDirectory, "java", [ "-jar", project.app.file + ".jar" ].concat (arguments)); - + } else if (project.target == PlatformHelper.hostPlatform) { - + arguments = arguments.concat ([ "-livereload" ]); ProcessHelper.runCommand (executableDirectory, "./" + Path.withoutDirectory (executablePath), arguments); - + } - + } - - + + public override function update ():Void { - + + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); - + if (project.targetFlags.exists ("xml")) { - + project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); - + } - + for (asset in project.assets) { - + if (asset.embed && asset.sourcePath == "") { - + var path = PathHelper.combine (targetDirectory + "/obj/tmp", asset.targetPath); PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path); asset.sourcePath = path; - + } - + } - + var context = generateContext (); context.OUTPUT_DIR = targetDirectory; - + if (targetType == "cpp" && project.targetFlags.exists ("static")) { - + for (i in 0...project.ndlls.length) { - + var ndll = project.ndlls[i]; - + if (ndll.path == null || ndll.path == "") { - + context.ndlls[i].path = PathHelper.getLibraryPath (ndll, "Mac" + (is64 ? "64" : ""), "lib", ".a", project.debug); - + } - + } - + } - + PathHelper.mkdir (targetDirectory); PathHelper.mkdir (targetDirectory + "/obj"); PathHelper.mkdir (targetDirectory + "/haxe"); PathHelper.mkdir (applicationDirectory); PathHelper.mkdir (contentDirectory); - + //SWFHelper.generateSWFClasses (project, targetDirectory + "/haxe"); - + FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, targetType + "/hxml", targetDirectory + "/haxe", context); - + if (targetType == "cpp" && project.targetFlags.exists ("static")) { - + FileHelper.recursiveSmartCopyTemplate (project, "cpp/static", targetDirectory + "/obj", context); - + } - + FileHelper.copyFileTemplate (project.templatePaths, "mac/Info.plist", targetDirectory + "/bin/" + project.app.file + ".app/Contents/Info.plist", context); FileHelper.copyFileTemplate (project.templatePaths, "mac/Entitlements.plist", targetDirectory + "/bin/" + project.app.file + ".app/Contents/Entitlements.plist", context); - + var icons = project.icons; - + if (icons.length == 0) { - + icons = [ new Icon (PathHelper.findTemplate (project.templatePaths, "default/icon.svg")) ]; - + } - + context.HAS_ICON = IconHelper.createMacIcon (icons, PathHelper.combine (contentDirectory, "icon.icns")); - + for (asset in project.assets) { - + if (asset.embed != true) { - + if (asset.type != AssetType.TEMPLATE) { - + PathHelper.mkdir (Path.directory (PathHelper.combine (contentDirectory, asset.targetPath))); FileHelper.copyAssetIfNewer (asset, PathHelper.combine (contentDirectory, asset.targetPath)); - + } else { - + PathHelper.mkdir (Path.directory (PathHelper.combine (targetDirectory, asset.targetPath))); FileHelper.copyAsset (asset, PathHelper.combine (targetDirectory, asset.targetPath), context); - + } - + } - + } - + } - - + + public override function watch ():Void { - + var dirs = WatchHelper.processHXML (project, getDisplayHXML ()); var command = WatchHelper.getCurrentCommand (); WatchHelper.watch (project, command, dirs); - + } - - + + @ignore public override function install ():Void {} @ignore public override function trace ():Void {} @ignore public override function uninstall ():Void {} - - + + } \ No newline at end of file diff --git a/tools/platforms/TVOSPlatform.hx b/tools/platforms/TVOSPlatform.hx index 5bfbd9579..707393346 100644 --- a/tools/platforms/TVOSPlatform.hx +++ b/tools/platforms/TVOSPlatform.hx @@ -5,6 +5,7 @@ package; import haxe.io.Path; import haxe.Json; import haxe.Template; +import hxp.helpers.AssetHelper; import hxp.helpers.ArrayHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; @@ -358,6 +359,8 @@ class TVOSPlatform extends PlatformTarget { public override function update ():Void { + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); for (asset in project.assets) { diff --git a/tools/platforms/TizenPlatform.hx b/tools/platforms/TizenPlatform.hx index 989bff425..4da9fb642 100644 --- a/tools/platforms/TizenPlatform.hx +++ b/tools/platforms/TizenPlatform.hx @@ -3,6 +3,7 @@ package; import haxe.io.Path; import haxe.Template; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; @@ -19,214 +20,216 @@ import sys.FileSystem; class TizenPlatform extends PlatformTarget { - - + + private static var uuid:String = null; - - + + public function new (command:String, _project:HXProject, targetFlags:Map ) { - + super (command, _project, targetFlags); - + targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("tizen.output-directory", "tizen")); - + } - - + + public override function build ():Void { - + var destination = targetDirectory + "/bin/"; - + var arch = ""; - + if (project.targetFlags.exists ("simulator")) { - + arch = "-x86"; - + } - + for (ndll in project.ndlls) { - + FileHelper.copyLibrary (project, ndll, "Tizen", "", arch + ".so", destination + "lib/", project.debug, ".so"); - + } - + var hxml = targetDirectory + "/haxe/" + buildType + ".hxml"; - + ProcessHelper.runCommand ("", "haxe", [ hxml, "-D", "tizen" ] ); - + if (noOutput) return; - + var args = [ "-Dtizen", "-DAPP_ID=" + TizenHelper.getUUID (project) ]; - + if (project.targetFlags.exists ("simulator")) { - + args.push ("-Dsimulator"); - + } - + CPPHelper.compile (project, targetDirectory + "/obj", args); FileHelper.copyIfNewer (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-debug" : "") + ".exe", targetDirectory + "/bin/CommandLineBuild/" + project.app.file + ".exe"); TizenHelper.createPackage (project, targetDirectory + "/bin/CommandLineBuild", ""); - + } - - + + public override function clean ():Void { - + if (FileSystem.exists (targetDirectory)) { - + PathHelper.removeDirectory (targetDirectory); - + } - + } - - + + public override function deploy ():Void { - + DeploymentHelper.deploy (project, targetFlags, targetDirectory, "Tizen"); - + } - - + + public override function display ():Void { - + var hxml = PathHelper.findTemplate (project.templatePaths, "tizen/hxml/" + buildType + ".hxml"); - + var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; context.OUTPUT_DIR = targetDirectory; - + var template = new Template (File.getContent (hxml)); - + Sys.println (template.execute (context)); Sys.println ("-D display"); - + } - - + + public override function rebuild ():Void { - + var device = (command == "rebuild" || !targetFlags.exists ("simulator")); var simulator = (command == "rebuild" || targetFlags.exists ("simulator")); - + var commands = []; - + if (device) commands.push ([ "-Dtizen" ]); if (simulator) commands.push ([ "-Dtizen", "-Dsimulator" ]); - + CPPHelper.rebuild (project, commands); - + } - - + + public override function run ():Void { - + TizenHelper.install (project, targetDirectory + "/bin/CommandLineBuild"); TizenHelper.launch (project); - + } - - + + public override function trace ():Void { - + TizenHelper.trace (project); - + } - - + + public override function update ():Void { - + + AssetHelper.processLibraries (project, targetDirectory); + // project = project.clone (); - + for (asset in project.assets) { - + if (asset.embed && asset.sourcePath == "") { - + var path = PathHelper.combine (targetDirectory + "/obj/tmp", asset.targetPath); PathHelper.mkdir (Path.directory (path)); FileHelper.copyAsset (asset, path); asset.sourcePath = path; - + } - + } - + var destination = targetDirectory + "/bin/"; PathHelper.mkdir (destination); - + for (asset in project.assets) { - + asset.resourceName = "../res/" + asset.resourceName; - + } - + if (project.targetFlags.exists ("xml")) { - + project.haxeflags.push ("-xml " + targetDirectory + "/types.xml"); - + } - + var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; context.OUTPUT_DIR = targetDirectory; context.APP_PACKAGE = TizenHelper.getUUID (project); context.SIMULATOR = project.targetFlags.exists ("simulator"); - + PathHelper.mkdir (destination + "shared/res/screen-density-xhigh"); - + var icons = project.icons; - + if (icons.length == 0) { - + icons = [ new Icon (PathHelper.findTemplate (project.templatePaths, "default/icon.svg")) ]; - + } - + if (IconHelper.createIcon (icons, 117, 117, PathHelper.combine (destination + "shared/res/screen-density-xhigh", "mainmenu.png"))) { - + context.APP_ICON = "mainmenu.png"; - + } - + FileHelper.recursiveSmartCopyTemplate (project, "tizen/template", destination, context); FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveSmartCopyTemplate (project, "tizen/hxml", targetDirectory + "/haxe", context); - + for (asset in project.assets) { - + var path = PathHelper.combine (destination + "res/", asset.targetPath); - + PathHelper.mkdir (Path.directory (path)); - + if (asset.type != AssetType.TEMPLATE) { - + if (asset.targetPath == "/appinfo.json") { - + FileHelper.copyAsset (asset, path, context); - + } else { - + // going to root directory now, but should it be a forced "assets" folder later? - + FileHelper.copyAssetIfNewer (asset, path); - + } - + } else { - + FileHelper.copyAsset (asset, path, context); - + } - + } - + } - - + + @ignore public override function install ():Void {} @ignore public override function uninstall ():Void {} - - + + } \ No newline at end of file diff --git a/tools/platforms/WindowsPlatform.hx b/tools/platforms/WindowsPlatform.hx index 8239a0845..058867004 100644 --- a/tools/platforms/WindowsPlatform.hx +++ b/tools/platforms/WindowsPlatform.hx @@ -4,6 +4,7 @@ package; import haxe.io.Path; import haxe.Template; import hxp.project.Icon; +import hxp.helpers.AssetHelper; import hxp.helpers.CPPHelper; import hxp.helpers.DeploymentHelper; import hxp.helpers.FileHelper; @@ -537,6 +538,8 @@ class WindowsPlatform extends PlatformTarget { public override function update ():Void { + AssetHelper.processLibraries (project, targetDirectory); + if (targetType == "winjs") { updateUWP (); diff --git a/tools/platforms/extraParams.hxml b/tools/platforms/extraParams.hxml new file mode 100644 index 000000000..4ef79ad34 --- /dev/null +++ b/tools/platforms/extraParams.hxml @@ -0,0 +1 @@ +-lib lime \ No newline at end of file