mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-25 02:32:19 -05:00
Extensions: Update to Paster, Updater, and SRL
This commit is contained in:
parent
c375bb13ee
commit
70fd6fce71
@ -322,6 +322,16 @@ begin
|
|||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ procedure Free; //Doesn't Work
|
||||||
|
var
|
||||||
|
I: integer;
|
||||||
|
begin
|
||||||
|
for I := 0 to High(UpdaterArr) do
|
||||||
|
with UpdaterArr[I] do
|
||||||
|
if (Timer <> nil) then
|
||||||
|
Timer.Free;
|
||||||
|
end; }
|
||||||
|
|
||||||
procedure Attach;
|
procedure Attach;
|
||||||
var
|
var
|
||||||
I: integer;
|
I: integer;
|
||||||
|
@ -10,7 +10,7 @@ end;
|
|||||||
|
|
||||||
function GetVersion: string;
|
function GetVersion: string;
|
||||||
begin;
|
begin;
|
||||||
Result := '1.0a';
|
Result := '1.0b';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF EXTENSION}
|
{$IFDEF EXTENSION}
|
||||||
@ -361,7 +361,7 @@ end;
|
|||||||
|
|
||||||
procedure UpdateCheck;
|
procedure UpdateCheck;
|
||||||
var
|
var
|
||||||
V, S: string;
|
V: string;
|
||||||
I: integer;
|
I: integer;
|
||||||
SA: TStringArray;
|
SA: TStringArray;
|
||||||
begin
|
begin
|
||||||
@ -380,15 +380,11 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (Settings.isKey('Host' + IntToStr(I))) then
|
if (Settings.isKey('Host' + IntToStr(I))) then
|
||||||
begin
|
begin
|
||||||
S := Settings.getKeyValueDef('Host' + IntToStr(I), 'Host' + IntToStr(I));
|
SA[High(SA)] := Settings.getKeyValue('Host' + IntToStr(I));
|
||||||
if (S <> 'Host' + IntToStr(I)) then
|
|
||||||
begin
|
|
||||||
SetLength(SA, Length(SA) + 1);
|
|
||||||
SA[High(SA)] := S;
|
|
||||||
end;
|
|
||||||
Settings.DeleteKey('Host' + IntToStr(I));
|
Settings.DeleteKey('Host' + IntToStr(I));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for I := 0 to High(SA) do
|
for I := 0 to High(SA) do
|
||||||
Settings.setKeyValue('Host' + IntToStr(I + 1), SA[I]);
|
Settings.setKeyValue('Host' + IntToStr(I + 1), SA[I]);
|
||||||
end;
|
end;
|
||||||
|
@ -22,19 +22,28 @@ procedure OpenDefScript(Sender: TObject);
|
|||||||
var
|
var
|
||||||
Script: TStringArray;
|
Script: TStringArray;
|
||||||
begin
|
begin
|
||||||
SetLength(Script, 6);
|
SetLength(Script, 7);
|
||||||
Script[0] := 'program Untitled;';
|
Script[0] := 'program Untitled;';
|
||||||
Script[1] := '//{$DEFINE SMART} //Uncomment for SMART';
|
Script[1] := '{$DEFINE SMART}';
|
||||||
Script[2] := '{.include SRL/SRL.scar}';
|
Script[2] := '{$I SRL/SRL.scar}';
|
||||||
|
|
||||||
if (TMenuItem(Sender).Parent.Caption = 'Reflection') then
|
if (TMenuItem(Sender).Parent.Caption = 'Reflection') then
|
||||||
begin
|
begin
|
||||||
SetLength(Script, 7);
|
SetLength(Script, Length(Script) + 1);
|
||||||
Script[1] := '{$DEFINE SMART}';
|
Script[High(Script) - 4] := '{$I Reflection/Reflection.simba}';
|
||||||
Script[3] := '{.include Reflection/Reflection.scar}';
|
|
||||||
end;
|
end;
|
||||||
Script[Length(Script) - 3] := '';
|
|
||||||
Script[Length(Script) - 2] := 'begin';
|
Script[High(Script) - 3] := '';
|
||||||
Script[Length(Script) - 1] := 'end.';
|
Script[High(Script) - 2] := 'begin';
|
||||||
|
Script[High(Script) - 1] := ' SetupSRL;';
|
||||||
|
|
||||||
|
if (TMenuItem(Sender).Parent.Caption = 'Reflection') then
|
||||||
|
begin
|
||||||
|
SetLength(Script, Length(Script) + 1);
|
||||||
|
Script[High(Script) - 1] := ' SetupReflection;';
|
||||||
|
end;
|
||||||
|
|
||||||
|
Script[High(Script)] := 'end.';
|
||||||
|
|
||||||
WriteLn('Opening ' + TMenuItem(Sender).Parent.Caption + ' Default Script...');
|
WriteLn('Opening ' + TMenuItem(Sender).Parent.Caption + ' Default Script...');
|
||||||
OpenScript('', Implode({$IFDEF WIN}#13+{$ENDIF}#10, Script), False);
|
OpenScript('', Implode({$IFDEF WIN}#13+{$ENDIF}#10, Script), False);
|
||||||
|
Loading…
Reference in New Issue
Block a user