1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-08 04:08:02 -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"/> <ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="scriptmanager"/> <UnitName Value="scriptmanager"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="367"/> <TopLine Value="110"/>
<CursorPos X="33" Y="377"/> <CursorPos X="1" Y="123"/>
<FoldState Value=" T7i2HD111 T3kG0F52A24."/>
<ComponentState Value="1"/>
<UsageCount Value="83"/> <UsageCount Value="83"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="../../../lazarus/lcl/interfaces/gtk/gtkwidgetset.inc"/> <Filename Value="../../../lazarus/lcl/interfaces/gtk/gtkwidgetset.inc"/>
@ -72,7 +72,6 @@
<Unit4> <Unit4>
<Filename Value="../../Units/MMLAddon/settings.pas"/> <Filename Value="../../Units/MMLAddon/settings.pas"/>
<UnitName Value="settings"/> <UnitName Value="settings"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="564"/> <TopLine Value="564"/>
@ -300,7 +299,7 @@
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit33> </Unit33>
</Units> </Units>
<JumpHistory Count="3" HistoryIndex="2"> <JumpHistory Count="6" HistoryIndex="5">
<Position1> <Position1>
<Filename Value="scriptmanager.pas"/> <Filename Value="scriptmanager.pas"/>
<Caret Line="377" Column="3" TopLine="363"/> <Caret Line="377" Column="3" TopLine="363"/>
@ -313,6 +312,18 @@
<Filename Value="scriptmanager.pas"/> <Filename Value="scriptmanager.pas"/>
<Caret Line="376" Column="135" TopLine="363"/> <Caret Line="376" Column="135" TopLine="363"/>
</Position3> </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> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

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

View File

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