Ignore:
Timestamp:
Jul 31, 2012, 8:53:58 AM (12 years ago)
Author:
chronos
Message:
  • Added: ModuleSystem package which helps manage available module instalation/uninstallation and their dependencies.
Location:
ModularSystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ModularSystem

    • Property svn:ignore set to
      lib
  • ModularSystem/UModularSystem.pas

    r315 r394  
    2020    Version: string;
    2121    Name: string;
     22    Title: string;
    2223    Dependencies: TStringList;
    2324    Author: string;
    24     Description: string;
     25    Description: TStringList;
     26    License: string;
    2527    procedure Install; virtual;
    2628    procedure Uninstall; virtual;
     
    9799    Module := FindModuleByName(Dependencies[I]);
    98100    if Assigned(Module) then begin
    99       if not Module.Installed and (ModuleList.IndexOf(Module.Name) = -1) then
     101      if not Module.Installed and (ModuleList.IndexOf(Module.Name) = -1) then begin
    100102        ModuleList.Add(Module.Name);
     103        EnumModulesInstall(Module.Dependencies, ModuleList);
     104      end;
    101105    end else raise Exception.CreateFmt(SModuleNotFound, [Module.Name]);
    102106  end;
     
    111115  with TModule(Modules[I]) do begin
    112116    if (Dependencies.IndexOf(ModuleName) <> -1) and Installed and
    113       (ModuleList.IndexOf(Name) = -1) then
     117      (ModuleList.IndexOf(Name) = -1) then begin
    114118      ModuleList.Add(Name);
     119      Self.EnumModulesUninstall(Name, ModuleList);
     120    end;
    115121  end;
    116122end;
     
    169175begin
    170176  Dependencies := TStringList.Create;
     177  Description := TStringList.Create;
    171178end;
    172179
    173180destructor TModule.Destroy;
    174181begin
     182  Description.Free;
    175183  Dependencies.Free;
    176184  inherited Destroy;
Note: See TracChangeset for help on using the changeset viewer.