DistPasFileList.dpr 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. program DistPasFileList;
  2. {$APPTYPE CONSOLE}
  3. uses
  4. Classes,
  5. SysUtils,
  6. DModule in 'DModule.pas' {DM: TDataModule};
  7. procedure Main;
  8. var s : TStringList;
  9. Lst : String;
  10. begin
  11. DM := TDM.Create(nil); try
  12. s := TStringList.Create;
  13. try
  14. // Default Output Path is w:\source\Indy10
  15. // DM.OutputPath := 'w:\source\Indy10';
  16. // Default Data Path is W:\source\Indy10\builder\Package Generator\Data
  17. // DM.DataPath := 'W:\source\Indy10\builder\Package Generator\Data';
  18. DM.tablFile.Open;
  19. try
  20. while not DM.tablFile.Eof do
  21. begin
  22. if DM.tablFile.FieldByName('Release').AsBoolean then
  23. begin
  24. LSt := DM.tablFile.FieldByName('Pkg').AsString+'\' + DM.tablFile.FieldByName('FileName').AsString+'.pas';
  25. s.Add(LSt);
  26. WriteLn(LSt);
  27. end;
  28. DM.tablFile.Next;
  29. end;
  30. s.SaveToFile(DM.OutputPath+'\Lib\FileList.txt');
  31. finally
  32. DM.tablFile.Close;
  33. end;
  34. finally
  35. FreeAndNil(s);
  36. end;
  37. finally FreeAndNil(DM); end;
  38. end;
  39. begin
  40. { TODO -oUser -cConsole Main : Insert code here }
  41. Main;
  42. end.