1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-07 11:48:04 -05:00

Test Update 0.1

This commit is contained in:
Thomas Dunne 2011-08-13 11:57:26 +01:00
parent a0c8a75bc1
commit e10ff5efc1
3 changed files with 32 additions and 14 deletions

View File

@ -47,14 +47,14 @@
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="scriptmanager"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="367"/>
<CursorPos X="33" Y="377"/>
<FoldState Value=" T7i2HD111 T3kG0F52A24."/>
<ComponentState Value="1"/>
<TopLine Value="110"/>
<CursorPos X="1" Y="123"/>
<UsageCount Value="83"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../../../lazarus/lcl/interfaces/gtk/gtkwidgetset.inc"/>
@ -72,7 +72,6 @@
<Unit4>
<Filename Value="../../Units/MMLAddon/settings.pas"/>
<UnitName Value="settings"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="564"/>
@ -300,7 +299,7 @@
<Loaded Value="True"/>
</Unit33>
</Units>
<JumpHistory Count="3" HistoryIndex="2">
<JumpHistory Count="6" HistoryIndex="5">
<Position1>
<Filename Value="scriptmanager.pas"/>
<Caret Line="377" Column="3" TopLine="363"/>
@ -313,6 +312,18 @@
<Filename Value="scriptmanager.pas"/>
<Caret Line="376" Column="135" TopLine="363"/>
</Position3>
<Position4>
<Filename Value="scriptmanager.pas"/>
<Caret Line="40" Column="13" TopLine="616"/>
</Position4>
<Position5>
<Filename Value="scriptmanager.pas"/>
<Caret Line="384" Column="21" TopLine="371"/>
</Position5>
<Position6>
<Filename Value="scriptmanager.pas"/>
<Caret Line="392" Column="36" TopLine="381"/>
</Position6>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>

View File

@ -1,5 +1,5 @@
object Form1: TForm1
Left = 508
Left = 515
Height = 434
Top = 179
Width = 702

View File

@ -37,7 +37,7 @@ uses
{$IFDEF UNIX}cthreads,cmem,{$ENDIF} Classes, SysUtils, FileUtil, Forms,
Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, ComCtrls, ActnList, Menus, settings, updater,strutils, MufasaTypes,
dom, mmisc, Simbasettings, SimbaUnit;
dom, mmisc;
type
@ -213,12 +213,12 @@ begin
Script := TSimbaScript(ListView1.Selected.Data);
if Script.IsInstalled then
begin
ShowMessage('Updating Script "' + Script.Name + '"');
// ShowMessage('Updating Script "' + Script.Name + '"');
Mng.UpdateLScript(mng.FindRScriptByName(Script.Name));
ShowMessage('Finished Updating Script "' + Script.Name + '"');
end else
begin
ShowMessage('Installing Script "' + Script.Name + '"');
// ShowMessage('Installing Script "' + Script.Name + '"');
Mng.InstallNewRScript(mng.FindRScriptByName(Script.Name));
ShowMessage('Finished Installing Script "' + Script.Name + '"');
end;
@ -284,13 +284,13 @@ begin
Writeln(' Version: ' + Version);
Writeln(' Description: ' + Description);
Writeln(' Installed: '+ BoolToStr(Installed,true));
{ Writeln(' Tags:');
Writeln(' Tags:');
for i := 0 to Tags.Count - 1 do
Writeln(' ' + Tags[i]);
Writeln(' Files:');
for i := 0 to Files.Count - 1 do
Writeln(' ' + Files[i]);
}end;
end;
constructor TSimbaScript.Create;
begin
@ -372,17 +372,24 @@ var
begin
Databs := TStringList.Create;
Databs.Add('http://tootoot222.hopto.org:8080/~mcteo/scriptman/scripts.xml');
Databs.Add('http://tootoot222.hopto.org:8080/~mcteo/scriptman2/scripts.xml');
Databs.Add('http://tootoot222.hopto.org:8080/~mcteo/secretrepo/scripts.cgi?user=user&pass=pass');
//TODO: Load list of repositories
// ShowMessage(SettingsForm.Settings.GetKeyValueDefLoad('Settings/SourceEditor/DefScriptPath', ,SimbaSettingsFile));
ShowMessage(SimbaSettingsFile);
// ShowMessage(LoadSettingDef('Settings/SourceEditor/DefScriptPath', ExpandFileName(MainDir+DS+'default.simba')));
FRScripts.Clear();
Form1.Memo1.Clear;
Form1.Memo1.Lines.Add('Updating from Repos');
for X := 0 to Databs.Count-1 do
begin
Form1.Memo1.Lines.Add('Updating from Repos ' + inttostr(X+1) +
'/' + inttostr(Databs.Count));
AppendRemoteDB(Databs[X]);
end;
Databs.Free;
Form1.Memo1.Lines.Add('Finished updating from Repos');
end;
{ Downloads online scripts.xml and parses it, populating FRScripts }