From e10ff5efc10524799b08928349a4b1db1b601c95 Mon Sep 17 00:00:00 2001 From: Thomas Dunne Date: Sat, 13 Aug 2011 11:57:26 +0100 Subject: [PATCH] Test Update 0.1 --- Projects/ScriptManager/project1.lpi | 23 +++++++++++++++++------ Projects/ScriptManager/scriptmanager.lfm | 2 +- Projects/ScriptManager/scriptmanager.pas | 21 ++++++++++++++------- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/Projects/ScriptManager/project1.lpi b/Projects/ScriptManager/project1.lpi index 4d27472..c4dc757 100644 --- a/Projects/ScriptManager/project1.lpi +++ b/Projects/ScriptManager/project1.lpi @@ -47,14 +47,14 @@ + - - - - + + + @@ -72,7 +72,6 @@ - @@ -300,7 +299,7 @@ - + @@ -313,6 +312,18 @@ + + + + + + + + + + + + diff --git a/Projects/ScriptManager/scriptmanager.lfm b/Projects/ScriptManager/scriptmanager.lfm index da830c8..8affe30 100644 --- a/Projects/ScriptManager/scriptmanager.lfm +++ b/Projects/ScriptManager/scriptmanager.lfm @@ -1,5 +1,5 @@ object Form1: TForm1 - Left = 508 + Left = 515 Height = 434 Top = 179 Width = 702 diff --git a/Projects/ScriptManager/scriptmanager.pas b/Projects/ScriptManager/scriptmanager.pas index ac86dd3..6e99827 100644 --- a/Projects/ScriptManager/scriptmanager.pas +++ b/Projects/ScriptManager/scriptmanager.pas @@ -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 }