Skip to content

Commit

Permalink
Updating Package Generator to generate new packages for Delphi XE3+, …
Browse files Browse the repository at this point in the history
…as well as adding new generators for compiler-specific files like .rc/.res, .inc, and .cmd (will add .bat files for C++Builder at a later time).

Rewriting Computil.exe so it doesn't need to be updated every time a new IDE version is released.

Bumping Indy version number to 10.6.3.
  • Loading branch information
rlebeau committed Mar 2, 2024
1 parent 40ba7a2 commit b079cb2
Show file tree
Hide file tree
Showing 510 changed files with 10,883 additions and 2,286 deletions.
1 change: 0 additions & 1 deletion Builder/Package Generator/DModule.dfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
object DM: TDM
OldCreateOrder = False
Height = 333
Width = 537
end
38 changes: 16 additions & 22 deletions Builder/Package Generator/DModule.pas
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ TDM = class(TDataModule)
procedure SetDataPath(const AValue : String);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure CheckForMissingFiles;
procedure GetFileList(const ACriteria: String; AFiles: TStrings);
property DataPath : String read FDataPath write SetDataPath;
Expand Down Expand Up @@ -106,10 +107,16 @@ function UpTwoDirs(const APath : String):String;
constructor TDM.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
// Default Output Path is w:\source\Indy10
OutputPath := SysUtils.ExcludeTrailingPathDelimiter(GIndyPath);
// Default Data Path is W:\source\Indy10\builder\Package Generator\Data
DataPath := GIndyPath + 'Builder\Package Generator\Data';
// Default Output Path is w:\source\Indy10\
OutputPath := SysUtils.IncludeTrailingPathDelimiter(GIndyPath);
// Default Data Path is W:\source\Indy10\Builder\Package Generator\Data
DataPath := OutputPath + 'Builder\Package Generator\Data\';
end;

destructor TDM.Destroy;
begin
FreeAndNil(FIni);
inherited Destroy;
end;

procedure TDM.CheckForMissingFiles;
Expand Down Expand Up @@ -161,21 +168,6 @@ procedure TDM.CheckForMissingFiles;
finally
FindClose(SR);
end;

if FindFirst(GIndyPath + 'Lib\Protocols\IdFTPListParse*.pas', faAnyFile, SR) = 0 then
try
repeat
UnitName := ChangeFileExt(SR.Name, '');
if not FIni.SectionExists(UnitName) then
begin
FIni.WriteString(UnitName, 'Pkg', 'Protocols');
FIni.WriteBool(UnitName, 'SettingsNeeded', True);
WriteLn('Missing settings for: Protocols\' + UnitName);
end;
until FindNext(SR) <> 0;
finally
FindClose(SR);
end;
end;

procedure TDM.GetFileList(const ACriteria: String; AFiles: TStrings);
Expand All @@ -190,6 +182,7 @@ procedure TDM.GetFileList(const ACriteria: String; AFiles: TStrings);
LFiles := TStringList.Create;
try
FIni.ReadSections(LFiles);
//LFiles.Sort;
LCriteria := TStringList.Create;
try
LCriteria.CommaText := ACriteria;
Expand Down Expand Up @@ -222,17 +215,18 @@ procedure TDM.GetFileList(const ACriteria: String; AFiles: TStrings);

procedure TDM.SetDataPath(const AValue: String);
begin
FDataPath := AValue;
FDataPath := SysUtils.IncludeTrailingPathDelimiter(AValue);
FreeAndNil(FIni);
FIni := TMemIniFile.Create(SysUtils.IncludeTrailingPathDelimiter(AValue) + 'File.ini');
FIni := TMemIniFile.Create(FDataPath + 'File.ini');
FIni.AutoSave := True;
end;

procedure SetIndyPath;
var
Param: String;
I: Integer;
begin
if ParamCount > 0 then begin
if ParamCount > 0 then begin
for I := 1 to ParamCount do begin
Param := ParamStr(I);
if not CharInSet(Param[1], ['/', '-']) then begin
Expand Down
Loading

0 comments on commit b079cb2

Please sign in to comment.