API Remake
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
|||||||
[submodule "FasmOnDelphi"]
|
[submodule "FasmOnDelphi"]
|
||||||
path = FasmOnDelphi
|
path = FasmOnDelphi
|
||||||
url = git@git.teamfnd.ru:artem3213212/FasmOnDelphi.git
|
url = git@git.teamfnd.ru:artem3213212/FasmOnDelphi.git
|
||||||
|
[submodule "lib/pLua-XE"]
|
||||||
|
path = lib/pLua-XE
|
||||||
|
url = https://github.com/felipedaragon/pLua-XE.git
|
||||||
|
|||||||
Submodule FasmOnDelphi deleted from 62a5d170ba
@@ -2,6 +2,8 @@ unit RuntimeBuilder.Fasm;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
//{$INLINE auto}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
System.Classes,System.TypInfo,System.IOUtils,System.Rtti,Winapi.Windows,
|
System.Classes,System.TypInfo,System.IOUtils,System.Rtti,Winapi.Windows,
|
||||||
RuntimeBuilder,FasmOnDelphi;
|
RuntimeBuilder,FasmOnDelphi;
|
||||||
@@ -35,23 +37,23 @@ type
|
|||||||
constructor Create(Name:string);
|
constructor Create(Name:string);
|
||||||
destructor Destroy;override;
|
destructor Destroy;override;
|
||||||
end;
|
end;
|
||||||
|
protected
|
||||||
|
libs:TStringList;
|
||||||
|
function GetIncLibs():string;
|
||||||
protected
|
protected
|
||||||
FText:string;
|
FText:string;
|
||||||
function GetText:string;override;
|
function GetText:string;override;
|
||||||
procedure SetText(S:string);override;
|
procedure SetText(S:string);override;
|
||||||
public
|
public
|
||||||
|
function LoadLib(Name:string):TRTBLib;override;
|
||||||
constructor Create(Compiler:TRTBFasmCompiler);
|
constructor Create(Compiler:TRTBFasmCompiler);
|
||||||
function CompilateAsFunc:TRTBFunc;override;
|
function CompilateAsFunc:TRTBFunc;override;
|
||||||
function CompilateAsLib:TRTBLib;override;
|
function CompilateAsLib:TRTBLib;override;
|
||||||
end;
|
end;
|
||||||
protected
|
|
||||||
function GetIncLibs():string;
|
|
||||||
public
|
public
|
||||||
CompilerMem:NativeUInt;
|
CompilerMem:NativeUInt;
|
||||||
MaxSteps:word;
|
MaxSteps:word;
|
||||||
libs:TStringList;
|
|
||||||
constructor Create(FasmPath:String=FasmPath;AsDll:boolean=false);
|
constructor Create(FasmPath:String=FasmPath;AsDll:boolean=false);
|
||||||
function LoadLib(Name:string):TRTBLib;
|
|
||||||
function GenNewSrc():TRTBSource;override;
|
function GenNewSrc():TRTBSource;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -68,9 +70,6 @@ FreeMem(p);
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TRTBFasmCompiler.TRTBFasmSource.TRTBFasmFunc.Call(OutType:PTypeInfo;args:TArray<TValue>;CallType:TRTBCallType=CRTBCallTypeDefault):TValue;
|
function TRTBFasmCompiler.TRTBFasmSource.TRTBFasmFunc.Call(OutType:PTypeInfo;args:TArray<TValue>;CallType:TRTBCallType=CRTBCallTypeDefault):TValue;
|
||||||
{$IFDEF CPUX64}
|
|
||||||
//function()
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
{$IFDEF CPUX64}
|
{$IFDEF CPUX64}
|
||||||
Result:=Invoke(p,args,ccReg,OutType);
|
Result:=Invoke(p,args,ccReg,OutType);
|
||||||
@@ -127,10 +126,25 @@ begin
|
|||||||
FText:=S;
|
FText:=S;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRTBFasmCompiler.TRTBFasmSource.GetIncLibs():string;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
begin
|
||||||
|
Result:='';
|
||||||
|
for i:=0 to libs.count-1 do
|
||||||
|
Result:=Result+sLineBreak+'include '+#39+libs.Strings[i]+#39;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TRTBFasmCompiler.TRTBFasmSource.Create(Compiler:TRTBFasmCompiler);
|
constructor TRTBFasmCompiler.TRTBFasmSource.Create(Compiler:TRTBFasmCompiler);
|
||||||
begin
|
begin
|
||||||
inherited Create(Compiler);
|
inherited Create(Compiler);
|
||||||
FText:='';
|
FText:='';
|
||||||
|
libs:=TStringList.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRTBFasmCompiler.TRTBFasmSource.LoadLib(Name:string):TRTBLib;
|
||||||
|
begin
|
||||||
|
libs.Add(Name);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRTBFasmCompiler.TRTBFasmSource.CompilateAsFunc:TRTBFunc;
|
function TRTBFasmCompiler.TRTBFasmSource.CompilateAsFunc:TRTBFunc;
|
||||||
@@ -162,21 +176,6 @@ begin
|
|||||||
CompilerMem:=1024*1024*16;
|
CompilerMem:=1024*1024*16;
|
||||||
MaxSteps:=65535;
|
MaxSteps:=65535;
|
||||||
OpenFASM(FasmPath,AsDll);
|
OpenFASM(FasmPath,AsDll);
|
||||||
libs:=TStringList.Create;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TRTBFasmCompiler.LoadLib(Name:string):TRTBLib;
|
|
||||||
begin
|
|
||||||
libs.Add(Name);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TRTBFasmCompiler.GetIncLibs():string;
|
|
||||||
var
|
|
||||||
i:integer;
|
|
||||||
begin
|
|
||||||
Result:='';
|
|
||||||
for i:=0 to libs.count-1 do
|
|
||||||
Result:=Result+sLineBreak+'include '+#39+libs.Strings[i]+#39;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRTBFasmCompiler.GenNewSrc():TRTBSource;
|
function TRTBFasmCompiler.GenNewSrc():TRTBSource;
|
||||||
|
|||||||
166
Source/RuntimeBuilder.Lua.pas
Normal file
166
Source/RuntimeBuilder.Lua.pas
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
unit RuntimeBuilder.Lua;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
System.Classes,System.TypInfo,System.IOUtils,System.Rtti,Winapi.Windows,
|
||||||
|
pLuaObject,pLuaRecord,pLuaTable,uWordList,Lua,LuaObject,LuaWrapper,pLua,RuntimeBuilder;
|
||||||
|
|
||||||
|
type
|
||||||
|
TRTBLuaCompiler=class(TRTBCompiler)
|
||||||
|
protected type
|
||||||
|
TRTBLuaSource=class(TRTBSource)
|
||||||
|
protected type
|
||||||
|
{TRTBLuaFunc=class(TRTBFunc)
|
||||||
|
protected
|
||||||
|
p:Pointer;
|
||||||
|
sb:NativeUInt;
|
||||||
|
public
|
||||||
|
constructor Create(p:Pointer;sb:NativeUInt);
|
||||||
|
function Call(OutType:PTypeInfo;args:TArray<TValue>;CallType:TRTBCallType=CRTBCallTypeDefault):TValue;override;
|
||||||
|
destructor Destroy;override;
|
||||||
|
end;
|
||||||
|
TRTBLuaLib=class(TRTBLib)
|
||||||
|
private type
|
||||||
|
TRTBLuaLibFunc=class(TRTBLuaFunc)
|
||||||
|
public
|
||||||
|
constructor Create(p:Pointer);
|
||||||
|
destructor Destroy;override;
|
||||||
|
end;
|
||||||
|
private
|
||||||
|
filename:string;
|
||||||
|
Lib:NativeUInt;
|
||||||
|
function GetFuntion(Name:string):TRTBFunc;override;
|
||||||
|
public
|
||||||
|
constructor Create(Name:string);
|
||||||
|
destructor Destroy;override;
|
||||||
|
end;}
|
||||||
|
protected
|
||||||
|
FText:string;
|
||||||
|
function GetText:string;override;
|
||||||
|
procedure SetText(S:string);override;
|
||||||
|
public
|
||||||
|
constructor Create(Compiler:TRTBLuaCompiler);
|
||||||
|
function CompilateAsFunc:TRTBFunc;override;
|
||||||
|
//function CompilateAsLib:TRTBLib;override;
|
||||||
|
end;
|
||||||
|
protected
|
||||||
|
Lua:Plua_state;
|
||||||
|
//function GetIncLibs():string;
|
||||||
|
public
|
||||||
|
libs:TStringList;
|
||||||
|
constructor Create();
|
||||||
|
//function LoadLib(Name:string):TRTBLib;
|
||||||
|
function GenNewSrc():TRTBSource;override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses System.SysUtils;
|
||||||
|
|
||||||
|
{constructor TRTBLuaCompiler.TRTBLuaSource.TRTBLuaFunc.Create(p:Pointer;sb:NativeUInt);
|
||||||
|
begin
|
||||||
|
Self.p:=VirtualAlloc(nil,sb,MEM_COMMIT ,PAGE_EXECUTE_READWRITE);
|
||||||
|
CopyMemory(Self.p,p,sb);
|
||||||
|
Self.sb:=sb;
|
||||||
|
FreeMem(p);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRTBLuaCompiler.TRTBLuaSource.TRTBLuaFunc.Call(OutType:PTypeInfo;args:TArray<TValue>;CallType:TRTBCallType=CRTBCallTypeDefault):TValue;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TRTBLuaCompiler.TRTBLuaSource.TRTBLuaFunc.Destroy;
|
||||||
|
begin
|
||||||
|
VirtualFree(p,sb,MEM_RELEASE);
|
||||||
|
p:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TRTBLuaCompiler.TRTBLuaSource.TRTBLuaLib.TRTBLuaLibFunc.Create(p:Pointer);
|
||||||
|
begin
|
||||||
|
Self.p:=p;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TRTBLuaCompiler.TRTBLuaSource.TRTBLuaLib.TRTBLuaLibFunc.Destroy;
|
||||||
|
begin
|
||||||
|
p:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRTBLuaCompiler.TRTBLuaSource.TRTBLuaLib.GetFuntion(Name:string):TRTBFunc;
|
||||||
|
begin
|
||||||
|
Result:=TRTBLuaLibFunc.Create(GetProcAddress(Lib,pwidechar(Name)));
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TRTBLuaCompiler.TRTBLuaSource.TRTBLuaLib.Create(Name:string);
|
||||||
|
begin
|
||||||
|
filename:=Name;
|
||||||
|
Lib:=LoadLibrary(pwidechar(Name));
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TRTBLuaCompiler.TRTBLuaSource.TRTBLuaLib.Destroy;
|
||||||
|
begin
|
||||||
|
FreeLibrary(Lib);
|
||||||
|
end;}
|
||||||
|
|
||||||
|
function TRTBLuaCompiler.TRTBLuaSource.GetText:string;
|
||||||
|
begin
|
||||||
|
Result:=FText;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRTBLuaCompiler.TRTBLuaSource.SetText(S:string);
|
||||||
|
begin
|
||||||
|
FText:=S;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TRTBLuaCompiler.TRTBLuaSource.Create(Compiler:TRTBLuaCompiler);
|
||||||
|
begin
|
||||||
|
inherited Create(Compiler);
|
||||||
|
FText:='';
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRTBLuaCompiler.TRTBLuaSource.CompilateAsFunc:TRTBFunc;
|
||||||
|
begin
|
||||||
|
//lua_(lua_tocfunction());
|
||||||
|
//(Compiler as TRTBLuaCompiler).Lua.RegisterFunction();
|
||||||
|
end;
|
||||||
|
|
||||||
|
(*function TRTBLuaCompiler.TRTBLuaSource.CompilateAsLib:TRTBLib;
|
||||||
|
var
|
||||||
|
templib:string;
|
||||||
|
Res:TLuaResult;
|
||||||
|
begin
|
||||||
|
templib:=TPath.GetTempFileName;
|
||||||
|
Res:=LuaAssembleToFile({$IFDEF CPUX64}'format PE64 DLL'{$ELSE}'format PE DLL'{$ENDIF}+
|
||||||
|
(Compiler as TRTBLuaCompiler).GetIncLibs+sLineBreak+Text,templib,
|
||||||
|
(Compiler as TRTBLuaCompiler).CompilerMem,(Compiler as TRTBLuaCompiler).MaxSteps);
|
||||||
|
if Res.Error<>Lua_OK then
|
||||||
|
raise Exception.Create(Res.OutStr);
|
||||||
|
Result:=TRTBLuaLib.Create(templib);
|
||||||
|
end;*)
|
||||||
|
|
||||||
|
{function TRTBLuaCompiler.GetIncLibs():string;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
begin
|
||||||
|
Result:='';
|
||||||
|
for i:=0 to libs.count-1 do
|
||||||
|
Result:=Result+sLineBreak+'include '+#39+libs.Strings[i]+#39;
|
||||||
|
end;}
|
||||||
|
|
||||||
|
constructor TRTBLuaCompiler.Create();
|
||||||
|
begin
|
||||||
|
Lua:=luaL_newstate;
|
||||||
|
libs:=TStringList.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{function TRTBLuaCompiler.LoadLib(Name:string):TRTBLib;
|
||||||
|
begin
|
||||||
|
libs.Add(Name);
|
||||||
|
end;}
|
||||||
|
|
||||||
|
function TRTBLuaCompiler.GenNewSrc():TRTBSource;
|
||||||
|
begin
|
||||||
|
Result:=TRTBLuaSource.Create(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
@@ -2,26 +2,38 @@ unit RuntimeBuilder;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses System.TypInfo,System.Rtti;
|
uses
|
||||||
|
System.TypInfo,System.Rtti;
|
||||||
|
|
||||||
const
|
const
|
||||||
CRTBCallTypeNil=$0;
|
CRTBCallTypeNil=ccReg;
|
||||||
CRTBCallTypeRegister=$1;
|
CRTBCallTypeRegister=ccReg;
|
||||||
CRTBCallTypeStdCall=$2;
|
CRTBCallTypeStdCall=ccStdCall;
|
||||||
CRTBCallTypeCdecl=$3;
|
CRTBCallTypeCdecl=ccCdecl;
|
||||||
CRTBCallTypePascal=$4;
|
CRTBCallTypePascal=ccPascal;
|
||||||
CRTBCallTypeSafeCall=$5;
|
CRTBCallTypeSafeCall=ccSafeCall;
|
||||||
CRTBCallType64Call=$40;
|
CRTBCallType64Call=CRTBCallTypeNil;
|
||||||
CRTBCallTypeDefault=$80;
|
CRTBCallTypeScript=CRTBCallTypeNil;
|
||||||
|
CRTBCallTypeDefault=CRTBCallTypeNil;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRTBCompiler=class;
|
TRTBCompiler=class;
|
||||||
|
|
||||||
TRTBCallType=CRTBCallTypeNil..CRTBCallTypeDefault;
|
TRTBCallType=TCallConv;
|
||||||
|
|
||||||
|
TRTBType=PTypeInfo;
|
||||||
|
|
||||||
TRTBFunc=class abstract
|
TRTBFunc=class abstract
|
||||||
public
|
public
|
||||||
function Call(OutType:PTypeInfo;args:TArray<TValue>;CallType:TRTBCallType=CRTBCallTypeDefault):TValue;virtual;abstract;
|
function Call(Name:string;OutType:PTypeInfo;args:TArray<TValue>;CallType:TRTBCallType=CRTBCallTypeDefault):TValue;virtual;abstract;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TRTBVar=class abstract
|
||||||
|
protected
|
||||||
|
function SetVal(TValue);virtual;abstract;
|
||||||
|
function GetVal:TValue;virtual;abstract;
|
||||||
|
public
|
||||||
|
property Val:TValue read GetVal write SetVal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TRTBLib=class abstract
|
TRTBLib=class abstract
|
||||||
@@ -29,6 +41,7 @@ type
|
|||||||
function GetFuntion(Name:string):TRTBFunc;virtual;abstract;
|
function GetFuntion(Name:string):TRTBFunc;virtual;abstract;
|
||||||
public
|
public
|
||||||
property Funtion[Name:string]:TRTBFunc read GetFuntion;
|
property Funtion[Name:string]:TRTBFunc read GetFuntion;
|
||||||
|
property &Var[Name:string]:TRTBVar read GetFuntion;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TRTBSource=class abstract
|
TRTBSource=class abstract
|
||||||
@@ -38,8 +51,29 @@ type
|
|||||||
procedure SetText(S:string);virtual;abstract;
|
procedure SetText(S:string);virtual;abstract;
|
||||||
public
|
public
|
||||||
constructor Create(Compiler:TRTBCompiler);
|
constructor Create(Compiler:TRTBCompiler);
|
||||||
function CompilateAsFunc:TRTBFunc;virtual;abstract;
|
|
||||||
function CompilateAsLib:TRTBLib;virtual;abstract;
|
procedure LoadLib(Name:string);virtual;abstract;
|
||||||
|
procedure UnLoadLib(Name:string);virtual;abstract;
|
||||||
|
|
||||||
|
procedure AddNameSpace(Name:string);virtual;abstract;
|
||||||
|
procedure DelNameSpace(Name:string);virtual;abstract;
|
||||||
|
|
||||||
|
procedure AddType(NameSpace:string;Name:string;&Type:TRTBType);virtual;abstract;
|
||||||
|
procedure ExportType(NameSpace:string;Name:string;&Type:TRTBType);virtual;abstract;
|
||||||
|
procedure DelType(NameSpace:string;Name:string);virtual;abstract;
|
||||||
|
|
||||||
|
procedure AddConst(NameSpace:string;Name:string;Val:TValue);virtual;abstract;
|
||||||
|
procedure ExportConst(NameSpace:string;Name:string;Val:TValue);virtual;abstract;
|
||||||
|
procedure DelConst(NameSpace:string;Name:string);virtual;abstract;
|
||||||
|
|
||||||
|
procedure AddVariable(NameSpace:string;Name:string;var Data);virtual;abstract;
|
||||||
|
procedure ExportVariable(NameSpace:string;Name:string;var Data);virtual;abstract;
|
||||||
|
procedure DelVariable(NameSpace:string;Name:string);virtual;abstract;
|
||||||
|
|
||||||
|
procedure &Register(NameSpace:string;Name:string;&Type:TRTBType);virtual;abstract;
|
||||||
|
procedure &RegisterFunction(NameSpace:string;Name:string);virtual;abstract;
|
||||||
|
|
||||||
|
function Compilate:TRTBLib;virtual;abstract;
|
||||||
procedure LoadFromFile(&File:string);
|
procedure LoadFromFile(&File:string);
|
||||||
procedure SaveToFile(&File:string);
|
procedure SaveToFile(&File:string);
|
||||||
property Text:string read GetText write SetText;
|
property Text:string read GetText write SetText;
|
||||||
@@ -47,7 +81,6 @@ type
|
|||||||
|
|
||||||
TRTBCompiler=class abstract
|
TRTBCompiler=class abstract
|
||||||
public
|
public
|
||||||
function LoadLib(Name:string):TRTBLib;virtual;abstract;
|
|
||||||
function GenNewSrc():TRTBSource;virtual;abstract;
|
function GenNewSrc():TRTBSource;virtual;abstract;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,17 @@ uses
|
|||||||
Unit1 in 'Unit1.pas',
|
Unit1 in 'Unit1.pas',
|
||||||
RuntimeBuilder in '..\Source\RuntimeBuilder.pas',
|
RuntimeBuilder in '..\Source\RuntimeBuilder.pas',
|
||||||
RuntimeBuilder.Fasm in '..\Source\RuntimeBuilder.Fasm.pas',
|
RuntimeBuilder.Fasm in '..\Source\RuntimeBuilder.Fasm.pas',
|
||||||
FasmOnDelphi in '..\FasmOnDelphi\Source\FasmOnDelphi.pas',
|
FasmOnDelphi in '..\lib\FasmOnDelphi\Source\FasmOnDelphi.pas',
|
||||||
Fasm4Delphi in '..\FasmOnDelphi\Fasm4Delphi\Source\Fasm4Delphi.pas';
|
Fasm4Delphi in '..\lib\FasmOnDelphi\Fasm4Delphi\Source\Fasm4Delphi.pas'{,
|
||||||
|
RuntimeBuilder.Lua in '..\Source\RuntimeBuilder.Lua.pas',
|
||||||
|
pLuaObject in '..\lib\pLua-XE\src\pLuaObject.pas',
|
||||||
|
pLuaRecord in '..\lib\pLua-XE\src\pLuaRecord.pas',
|
||||||
|
pLuaTable in '..\lib\pLua-XE\src\pLuaTable.pas',
|
||||||
|
uWordList in '..\lib\pLua-XE\src\uWordList.pas',
|
||||||
|
Lua in '..\lib\pLua-XE\src\Lua.pas',
|
||||||
|
LuaObject in '..\lib\pLua-XE\src\LuaObject.pas',
|
||||||
|
LuaWrapper in '..\lib\pLua-XE\src\LuaWrapper.pas',
|
||||||
|
pLua in '..\lib\pLua-XE\src\pLua.pas'{};
|
||||||
|
|
||||||
var
|
var
|
||||||
runner : ITestRunner;
|
runner : ITestRunner;
|
||||||
|
|||||||
@@ -98,8 +98,19 @@
|
|||||||
<DCCReference Include="Unit1.pas"/>
|
<DCCReference Include="Unit1.pas"/>
|
||||||
<DCCReference Include="..\Source\RuntimeBuilder.pas"/>
|
<DCCReference Include="..\Source\RuntimeBuilder.pas"/>
|
||||||
<DCCReference Include="..\Source\RuntimeBuilder.Fasm.pas"/>
|
<DCCReference Include="..\Source\RuntimeBuilder.Fasm.pas"/>
|
||||||
<DCCReference Include="..\FasmOnDelphi\Source\FasmOnDelphi.pas"/>
|
<DCCReference Include="..\lib\FasmOnDelphi\Source\FasmOnDelphi.pas"/>
|
||||||
<DCCReference Include="..\FasmOnDelphi\Fasm4Delphi\Source\Fasm4Delphi.pas"/>
|
<DCCReference Include="..\lib\FasmOnDelphi\Fasm4Delphi\Source\Fasm4Delphi.pas">
|
||||||
|
<Form>,
|
||||||
|
RuntimeBuilder.Lua in '..\Source\RuntimeBuilder.Lua.pas',
|
||||||
|
pLuaObject in '..\lib\pLua-XE\src\pLuaObject.pas',
|
||||||
|
pLuaRecord in '..\lib\pLua-XE\src\pLuaRecord.pas',
|
||||||
|
pLuaTable in '..\lib\pLua-XE\src\pLuaTable.pas',
|
||||||
|
uWordList in '..\lib\pLua-XE\src\uWordList.pas',
|
||||||
|
Lua in '..\lib\pLua-XE\src\Lua.pas',
|
||||||
|
LuaObject in '..\lib\pLua-XE\src\LuaObject.pas',
|
||||||
|
LuaWrapper in '..\lib\pLua-XE\src\LuaWrapper.pas',
|
||||||
|
pLua in '..\lib\pLua-XE\src\pLua.pas'{</Form>
|
||||||
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Release">
|
<BuildConfiguration Include="Release">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
@@ -456,13 +467,13 @@
|
|||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||||
|
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
||||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
|
||||||
</Deployment>
|
</Deployment>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform value="OSX32">False</Platform>
|
<Platform value="OSX32">False</Platform>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ var
|
|||||||
Src:TRTBSource;
|
Src:TRTBSource;
|
||||||
Func1:TRTBFunc;
|
Func1:TRTBFunc;
|
||||||
begin
|
begin
|
||||||
Fasm:=TRTBFasmCompiler.Create('..\..\..\FasmOnDelphi\fasmw172\fasm');
|
{Fasm:=TRTBFasmCompiler.Create('..\..\..\FasmOnDelphi\fasmw172\fasm');
|
||||||
Src:=Fasm.GenNewSrc;
|
Src:=Fasm.GenNewSrc;
|
||||||
Src.Text:='use32'+sLineBreak+'pop ecx'+sLineBreak+'pop eax'+sLineBreak+'jmp ecx';
|
Src.Text:='use32'+sLineBreak+'pop ecx'+sLineBreak+'pop eax'+sLineBreak+'jmp ecx';
|
||||||
Func1:=src.CompilateAsFunc;
|
Func1:=src.CompilateAsFunc;
|
||||||
@@ -33,7 +33,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
FreeAndNil(Func1);
|
FreeAndNil(Func1);
|
||||||
FreeAndNil(Src);
|
FreeAndNil(Src);
|
||||||
FreeAndNil(Fasm);
|
FreeAndNil(Fasm);}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRuntimeBuilderTestObject.Test2();
|
procedure TRuntimeBuilderTestObject.Test2();
|
||||||
@@ -43,7 +43,7 @@ var
|
|||||||
lib:TRTBLib;
|
lib:TRTBLib;
|
||||||
Func1:TRTBFunc;
|
Func1:TRTBFunc;
|
||||||
begin
|
begin
|
||||||
Fasm:=TRTBFasmCompiler.Create('..\..\..\FasmOnDelphi\fasmw172\fasm');
|
{Fasm:=TRTBFasmCompiler.Create('..\..\..\FasmOnDelphi\fasmw172\fasm');
|
||||||
Src:=Fasm.GenNewSrc;
|
Src:=Fasm.GenNewSrc;
|
||||||
Src.LoadFromFile('..\..\testlib.fasm');
|
Src.LoadFromFile('..\..\testlib.fasm');
|
||||||
Fasm.LoadLib('W:\RuntimeBuilder\FasmOnDelphi\fasmw172\INCLUDE\win32a.inc');
|
Fasm.LoadLib('W:\RuntimeBuilder\FasmOnDelphi\fasmw172\INCLUDE\win32a.inc');
|
||||||
@@ -55,7 +55,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
FreeAndNil(Func1);
|
FreeAndNil(Func1);
|
||||||
FreeAndNil(Src);
|
FreeAndNil(Src);
|
||||||
FreeAndNil(Fasm);
|
FreeAndNil(Fasm);}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|||||||
1
lib/FasmOnDelphi
Submodule
1
lib/FasmOnDelphi
Submodule
Submodule lib/FasmOnDelphi added at dd1e5ff80a
1
lib/pLua-XE
Submodule
1
lib/pLua-XE
Submodule
Submodule lib/pLua-XE added at 79883e7f4e
Reference in New Issue
Block a user