1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-27 03:22:17 -05:00
Simba/Extensions/msi.sex

50 lines
1.1 KiB
Plaintext
Raw Normal View History

2011-01-08 05:48:12 -05:00
program MSIUpdater;
{$INCLUDE ..\Extensions\Updater.sei}
procedure ClickMSI(Sender: TObject);
begin
if (not (FileExists(IncludePath + 'msi\RunMe.simba'))) then
begin
WriteLn('MSI: Couldn''t find MSI!');
Exit;
end;
if (TMenuItem(Sender).Caption = 'Run') then
WriteLn('Running MSI...')
else
WriteLn('Opening MSI...');
OpenScriptEx(IncludePath + 'msi\RunMe.simba', (TMenuItem(Sender).Caption = 'Run'));
end;
procedure Init;
var
MSI, I: integer;
MenuItems: array[0..1] of TMenuItem;
Names: array of string;
begin
if (AddUpdater('MSI', 'http://wizzup.org/static/srl/msi.tar.bz2', 'http://wizzup.org/static/srl/msi_version', IncludePath, True, True, MSI)) then
begin
Names := ['Run', 'Open'];
for I := 0 to 1 do
begin
MenuItems[I] := TMenuItem.Create(UpdaterArr[MSI].MainMenu);
MenuItems[I].OnClick := @ClickMSI;
MenuItems[I].Caption := Names[I];
UpdaterArr[MSI].MainMenu.Insert(I, MenuItems[I]);
end;
end;
end;
function GetName: string;
begin
Result := 'MSI Updater';
end;
function GetVersion: string;
begin
Result := '0.1';
end;
begin
end.