1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-21 08:45:06 -05:00

Extensions: Update to Paster, Updater, and SRL

This commit is contained in:
John P (Dgby714) 2011-06-09 14:27:32 -04:00
parent c375bb13ee
commit 70fd6fce71
3 changed files with 32 additions and 17 deletions

View File

@ -322,6 +322,16 @@ begin
Result := True;
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;
var
I: integer;

View File

@ -10,7 +10,7 @@ end;
function GetVersion: string;
begin;
Result := '1.0a';
Result := '1.0b';
end;
{$IFDEF EXTENSION}
@ -361,7 +361,7 @@ end;
procedure UpdateCheck;
var
V, S: string;
V: string;
I: integer;
SA: TStringArray;
begin
@ -380,15 +380,11 @@ begin
begin
if (Settings.isKey('Host' + IntToStr(I))) then
begin
S := Settings.getKeyValueDef('Host' + IntToStr(I), 'Host' + IntToStr(I));
if (S <> 'Host' + IntToStr(I)) then
begin
SetLength(SA, Length(SA) + 1);
SA[High(SA)] := S;
end;
SA[High(SA)] := Settings.getKeyValue('Host' + IntToStr(I));
Settings.DeleteKey('Host' + IntToStr(I));
end;
end;
for I := 0 to High(SA) do
Settings.setKeyValue('Host' + IntToStr(I + 1), SA[I]);
end;

View File

@ -22,20 +22,29 @@ procedure OpenDefScript(Sender: TObject);
var
Script: TStringArray;
begin
SetLength(Script, 6);
SetLength(Script, 7);
Script[0] := 'program Untitled;';
Script[1] := '//{$DEFINE SMART} //Uncomment for SMART';
Script[2] := '{.include SRL/SRL.scar}';
Script[1] := '{$DEFINE SMART}';
Script[2] := '{$I SRL/SRL.scar}';
if (TMenuItem(Sender).Parent.Caption = 'Reflection') then
begin
SetLength(Script, 7);
Script[1] := '{$DEFINE SMART}';
Script[3] := '{.include Reflection/Reflection.scar}';
SetLength(Script, Length(Script) + 1);
Script[High(Script) - 4] := '{$I Reflection/Reflection.simba}';
end;
Script[Length(Script) - 3] := '';
Script[Length(Script) - 2] := 'begin';
Script[Length(Script) - 1] := 'end.';
Script[High(Script) - 3] := '';
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...');
OpenScript('', Implode({$IFDEF WIN}#13+{$ENDIF}#10, Script), False);
end;