fsScript1.GetILCode (EAbstract Error)
I am trying to develop a utility that will allow my to compile my scripts for distribution with my application. I want them to be pre-compiled, keeping my code safe and allowing for quicker execution.
The code I have in the btnSaveCompiled Button on my form is.
The above code gets an error during execution on the fsScript1.GetILCode(sIL); line
I have tried to debug it but since I am currently running the Demo version it is requesting an fs_xml.pas file which I do not have. I would like to be able to test this script engine for my project.
Any suggestions?
The code I have in the btnSaveCompiled Button on my form is.
var
  sIL: TStream;
  sFile: TFileStream;
  objWriter : TWriter;
begin
  fsScript1.Clear;
  fsScript1.Lines := Memo1.Lines;
  fsScript1.Parent := fsGlobalUnit;
  sIL := TStream.Create();
  fsScript1.GetILCode(sIL);
  sFile := TFileStream.Create(ExtractFilePath(Application.ExeName)
                              + txtCompiledFileName.Text,
                              fmCreate or fmOpenWrite or fmShareDenyNone);
  sFile.CopyFrom(sIL, sIL.Size);
  sFile.Destroy;
end;
The above code gets an error during execution on the fsScript1.GetILCode(sIL); line
I have tried to debug it but since I am currently running the Demo version it is requesting an fs_xml.pas file which I do not have. I would like to be able to test this script engine for my project.
Any suggestions?