Eval, HXP, asset library fixes
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package haxe.io; #if (!hl && !js)
|
package haxe.io; #if (!hl && !js && !eval)
|
||||||
|
|
||||||
|
|
||||||
#if cpp
|
#if cpp
|
||||||
@@ -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
|
#end
|
||||||
@@ -109,7 +109,7 @@ class JPEG {
|
|||||||
|
|
||||||
#if java
|
#if java
|
||||||
|
|
||||||
#elseif (sys && (!disable_cffi || !format) && !macro)
|
#elseif (sys && lime_cffi && (!disable_cffi || !format) && !macro)
|
||||||
|
|
||||||
if (CFFI.enabled) {
|
if (CFFI.enabled) {
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class PNG {
|
|||||||
|
|
||||||
#if java
|
#if java
|
||||||
|
|
||||||
#elseif (sys && (!disable_cffi || !format) && !macro)
|
#elseif (sys && lime_cffi && (!disable_cffi || !format) && !macro)
|
||||||
|
|
||||||
if (CFFI.enabled) {
|
if (CFFI.enabled) {
|
||||||
|
|
||||||
|
|||||||
@@ -46,24 +46,26 @@ class DefineMacro {
|
|||||||
|
|
||||||
Compiler.define ("native");
|
Compiler.define ("native");
|
||||||
|
|
||||||
|
var cffi = (!Context.defined ("nocffi") && !Context.defined ("eval"));
|
||||||
|
|
||||||
if (Context.defined ("ios") || Context.defined ("android") || Context.defined ("tizen")) {
|
if (Context.defined ("ios") || Context.defined ("android") || Context.defined ("tizen")) {
|
||||||
|
|
||||||
Compiler.define ("mobile");
|
Compiler.define ("mobile");
|
||||||
if (!Context.defined ("nocffi")) Compiler.define ("lime-opengles");
|
if (cffi) Compiler.define ("lime-opengles");
|
||||||
|
|
||||||
} else if (Context.defined ("emscripten")) {
|
} else if (Context.defined ("emscripten")) {
|
||||||
|
|
||||||
Compiler.define ("web");
|
Compiler.define ("web");
|
||||||
if (!Context.defined ("nocffi")) Compiler.define ("lime-opengles");
|
if (cffi) Compiler.define ("lime-opengles");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Compiler.define ("desktop");
|
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");
|
Compiler.define ("lime-cffi");
|
||||||
|
|
||||||
@@ -73,6 +75,10 @@ class DefineMacro {
|
|||||||
Compiler.define ("lime-harfbuzz");
|
Compiler.define ("lime-harfbuzz");
|
||||||
Compiler.define ("lime-vorbis");
|
Compiler.define ("lime-vorbis");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Compiler.define ("disable-cffi");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ class System {
|
|||||||
return flash.Lib.getTimer ();
|
return flash.Lib.getTimer ();
|
||||||
#elseif ((js && !nodejs) || electron)
|
#elseif ((js && !nodejs) || electron)
|
||||||
return Std.int (Browser.window.performance.now ());
|
return Std.int (Browser.window.performance.now ());
|
||||||
#elseif (!disable_cffi && !macro)
|
#elseif (lime_cffi && !macro)
|
||||||
return cast NativeCFFI.lime_system_get_timer ();
|
return cast NativeCFFI.lime_system_get_timer ();
|
||||||
#elseif cpp
|
#elseif cpp
|
||||||
return Std.int (untyped __global__.__time_stamp () * 1000);
|
return Std.int (untyped __global__.__time_stamp () * 1000);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import hxp.project.Icon;
|
|||||||
import hxp.project.Platform;
|
import hxp.project.Platform;
|
||||||
import hxp.project.PlatformType;
|
import hxp.project.PlatformType;
|
||||||
import hxp.helpers.AIRHelper;
|
import hxp.helpers.AIRHelper;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
import hxp.helpers.FlashHelper;
|
import hxp.helpers.FlashHelper;
|
||||||
@@ -243,6 +244,8 @@ class AIRPlatform extends FlashPlatform {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
var destination = targetDirectory + "/bin/";
|
var destination = targetDirectory + "/bin/";
|
||||||
PathHelper.mkdir (destination);
|
PathHelper.mkdir (destination);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import haxe.io.Path;
|
|||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
import hxp.helpers.AndroidHelper;
|
import hxp.helpers.AndroidHelper;
|
||||||
import hxp.helpers.ArrayHelper;
|
import hxp.helpers.ArrayHelper;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -282,6 +283,8 @@ class AndroidPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
for (asset in project.assets) {
|
for (asset in project.assets) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package;
|
|||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -285,6 +286,8 @@ class EmscriptenPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
for (asset in project.assets) {
|
for (asset in project.assets) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package;
|
|||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
import hxp.helpers.FlashHelper;
|
import hxp.helpers.FlashHelper;
|
||||||
@@ -190,6 +191,8 @@ class FlashPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
var destination = targetDirectory + "/bin/";
|
var destination = targetDirectory + "/bin/";
|
||||||
PathHelper.mkdir (destination);
|
PathHelper.mkdir (destination);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import haxe.Template;
|
|||||||
#if lime
|
#if lime
|
||||||
import lime.text.Font;
|
import lime.text.Font;
|
||||||
#end
|
#end
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.ElectronHelper;
|
import hxp.helpers.ElectronHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -186,6 +187,8 @@ class HTML5Platform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
var destination = targetDirectory + "/bin/";
|
var destination = targetDirectory + "/bin/";
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import haxe.io.Path;
|
|||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
import hxp.helpers.ArrayHelper;
|
import hxp.helpers.ArrayHelper;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -462,6 +463,8 @@ class IOSPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
for (asset in project.assets) {
|
for (asset in project.assets) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package;
|
|||||||
|
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -349,6 +350,8 @@ class LinuxPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
//initialize (project);
|
//initialize (project);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package;
|
|||||||
|
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.CSHelper;
|
import hxp.helpers.CSHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
@@ -315,6 +316,8 @@ class MacPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
if (project.targetFlags.exists ("xml")) {
|
if (project.targetFlags.exists ("xml")) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package;
|
|||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.ArrayHelper;
|
import hxp.helpers.ArrayHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
@@ -358,6 +359,8 @@ class TVOSPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
for (asset in project.assets) {
|
for (asset in project.assets) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package;
|
|||||||
|
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -138,6 +139,8 @@ class TizenPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
// project = project.clone ();
|
// project = project.clone ();
|
||||||
|
|
||||||
for (asset in project.assets) {
|
for (asset in project.assets) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package;
|
|||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.Template;
|
import haxe.Template;
|
||||||
import hxp.project.Icon;
|
import hxp.project.Icon;
|
||||||
|
import hxp.helpers.AssetHelper;
|
||||||
import hxp.helpers.CPPHelper;
|
import hxp.helpers.CPPHelper;
|
||||||
import hxp.helpers.DeploymentHelper;
|
import hxp.helpers.DeploymentHelper;
|
||||||
import hxp.helpers.FileHelper;
|
import hxp.helpers.FileHelper;
|
||||||
@@ -537,6 +538,8 @@ class WindowsPlatform extends PlatformTarget {
|
|||||||
|
|
||||||
public override function update ():Void {
|
public override function update ():Void {
|
||||||
|
|
||||||
|
AssetHelper.processLibraries (project, targetDirectory);
|
||||||
|
|
||||||
if (targetType == "winjs") {
|
if (targetType == "winjs") {
|
||||||
|
|
||||||
updateUWP ();
|
updateUWP ();
|
||||||
|
|||||||
1
tools/platforms/extraParams.hxml
Normal file
1
tools/platforms/extraParams.hxml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-lib lime
|
||||||
Reference in New Issue
Block a user