mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-30 23:00:18 -05:00
Simba: Completed USE_RUTIS compiler directives.
This commit is contained in:
parent
bb5f00fab7
commit
374ca8d9fc
@ -23,7 +23,7 @@
|
|||||||
unit SimbaUnit;
|
unit SimbaUnit;
|
||||||
|
|
||||||
{$undef EditButtons}
|
{$undef EditButtons}
|
||||||
{$define USE_RUTIS}
|
//{$define USE_RUTIS}
|
||||||
{$Undef ProcessMessages} //Define this for processmessages in ThreadSafeCall
|
{$Undef ProcessMessages} //Define this for processmessages in ThreadSafeCall
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ type
|
|||||||
procedure SaveFormSettings;
|
procedure SaveFormSettings;
|
||||||
procedure LoadExtensions;
|
procedure LoadExtensions;
|
||||||
procedure AddRecentFile(const filename : string);
|
procedure AddRecentFile(const filename : string);
|
||||||
procedure InitalizeTMThread(var Thread : TMThread);
|
procedure InitializeTMThread(var Thread : TMThread);
|
||||||
procedure HandleParameters;
|
procedure HandleParameters;
|
||||||
procedure OnSaveScript(const Filename : string);
|
procedure OnSaveScript(const Filename : string);
|
||||||
property Interpreter : Integer read GetInterpreter write SetInterpreter;
|
property Interpreter : Integer read GetInterpreter write SetInterpreter;
|
||||||
@ -929,7 +929,7 @@ begin
|
|||||||
FormWritelnEx('The script hasn''t stopped yet, so we cannot start a new one.');
|
FormWritelnEx('The script hasn''t stopped yet, so we cannot start a new one.');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
InitalizeTMThread(scriptthread);
|
InitializeTMThread(scriptthread);
|
||||||
ScriptThread.CompileOnly:= false;
|
ScriptThread.CompileOnly:= false;
|
||||||
ScriptThread.OnTerminate:=@ScriptThreadTerminate;
|
ScriptThread.OnTerminate:=@ScriptThreadTerminate;
|
||||||
ScriptState:= ss_Running;
|
ScriptState:= ss_Running;
|
||||||
@ -1446,11 +1446,10 @@ begin
|
|||||||
RecentFileItems[len - 1-i].Caption:= ExtractFileName(RecentFiles[i]);
|
RecentFileItems[len - 1-i].Caption:= ExtractFileName(RecentFiles[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.InitalizeTMThread(var Thread: TMThread);
|
procedure TSimbaForm.InitializeTMThread(var Thread: TMThread);
|
||||||
var
|
var
|
||||||
AppPath : string;
|
AppPath : string;
|
||||||
ScriptPath : string;
|
ScriptPath : string;
|
||||||
UseCPascal: String;
|
|
||||||
Script : string;
|
Script : string;
|
||||||
Se: TMMLSettingsSandbox;
|
Se: TMMLSettingsSandbox;
|
||||||
loadFontsOnScriptStart: boolean;
|
loadFontsOnScriptStart: boolean;
|
||||||
@ -1632,7 +1631,7 @@ procedure TSimbaForm.ActionCompileScriptExecute(Sender: TObject);
|
|||||||
var
|
var
|
||||||
TempThread : TMThread;
|
TempThread : TMThread;
|
||||||
begin
|
begin
|
||||||
InitalizeTMThread(TempThread);
|
InitializeTMThread(TempThread);
|
||||||
TempThread.CompileOnly:= true;
|
TempThread.CompileOnly:= true;
|
||||||
TempThread.Resume;
|
TempThread.Resume;
|
||||||
end;
|
end;
|
||||||
@ -1810,7 +1809,9 @@ end;
|
|||||||
|
|
||||||
procedure TSimbaForm.ActionRUTISExecute(Sender: TObject);
|
procedure TSimbaForm.ActionRUTISExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF USE_RUTIS}
|
||||||
Interpreter:= interp_RT;
|
Interpreter:= interp_RT;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.ActionSaveAllExecute(Sender: TObject);
|
procedure TSimbaForm.ActionSaveAllExecute(Sender: TObject);
|
||||||
@ -2177,7 +2178,7 @@ begin
|
|||||||
sleep(25);
|
sleep(25);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
SimbaForm.InitalizeTMThread(t);
|
SimbaForm.InitializeTMThread(t);
|
||||||
KillThread(t.ThreadID);
|
KillThread(t.ThreadID);
|
||||||
if (t is TPSThread) then
|
if (t is TPSThread) then
|
||||||
try
|
try
|
||||||
@ -2299,6 +2300,10 @@ begin
|
|||||||
//Load the extensions
|
//Load the extensions
|
||||||
LoadExtensions;
|
LoadExtensions;
|
||||||
UpdateTitle;
|
UpdateTitle;
|
||||||
|
|
||||||
|
{$IFNDEF USE_RUTIS}
|
||||||
|
MenuItemRUTIS.Enabled:=False;
|
||||||
|
{$ENDIF}
|
||||||
self.EndFormUpdate;
|
self.EndFormUpdate;
|
||||||
|
|
||||||
if SettingsForm.Oops then
|
if SettingsForm.Oops then
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
unit mmlpsthread;
|
unit mmlpsthread;
|
||||||
|
|
||||||
{$Define PS_USESSUPPORT}
|
{$Define PS_USESSUPPORT}
|
||||||
{$define USE_RUTIS}
|
//{$define USE_RUTIS}
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -36,7 +36,8 @@ uses
|
|||||||
settings,settingssandbox, lcltype, dialogs
|
settings,settingssandbox, lcltype, dialogs
|
||||||
{$IFDEF USE_RUTIS}
|
{$IFDEF USE_RUTIS}
|
||||||
,Rutis_Engine,Rutis_Defs
|
,Rutis_Engine,Rutis_Defs
|
||||||
{$ENDIF};
|
{$ENDIF}
|
||||||
|
;
|
||||||
|
|
||||||
const
|
const
|
||||||
m_Status = 0; //Data = PChar to new status
|
m_Status = 0; //Data = PChar to new status
|
||||||
|
Loading…
Reference in New Issue
Block a user