program makebas;
uses
Forms, SysUtils, Classes;
var
DLLList, Tmp: TStringList;
Path, DLLName, S, SS: String;
Info: TSearchRec;
R, Index, J: Integer;
begin
DLLList := TStringList.Create;
Path := ExtractFilePath( Application.ExeName ) + '*.dll';
R := FindFirst( Path, faAnyFile, Info );
while R = 0 do
begin
DLLList.Add( Info.Name );
R := FindNext( Info);
end;
FindClose( Info );
for Index := 0 to DLLList.Count - 1 do
begin
S := DLLList[ Index ];
DLLName := ChangeFileExt( S, '' );
Tmp := TStringList.Create;
Tmp.LoadFromFile( 'sample.&&&' );
for J := 0 to Tmp.Count - 1 do
begin
Tmp[ J ] := StringReplace( Tmp[ J ], 'DLLNAME', DLLName,
[rfIgnoreCase] );
end;
SS := DLLName + '.bas';
Tmp.SaveToFile( SS );
Writeln( SS + ' has been created.' );
end;
end.
SEO | [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送 | ||