|
|
|
#1
|
|||
|
|||
|
Join many Files to One using Inno Only
Code:
const
joinFileBufsize = 4096;
procedure ConcatenateFiles(const InFileNames: array of string; const OutFileName: string);
var
i: Integer;
InStream, OutStream: TFileStream;
read : longInt;
Buffer : string;
begin
OutStream := TFileStream.Create(OutFileName, fmOpenwrite);
try
// if not done so, read() will fail, maybe it internally assumes that bufsize is 0
for i := 0 to joinFileBufsize do
buffer := buffer + '0';
for i := 0 to high(InFileNames) do
begin
InStream := TFileStream.Create(InFileNames[i], fmOpenRead);
try
while InStream.Position <> InStream.Size do
begin
read := InStream.Read(buffer,joinFileBufsize);
OutStream.Write(buffer,read);
end;
finally
InStream.Free;
end;
end;
finally
OutStream.Free;
end;
end;
function InitializeSetup(): Boolean;
begin
ConcatenateFiles(['test.iss','join.iss'],'JoinTest');
end;
|
| The Following 4 Users Say Thank You to Gupta For This Useful Post: | ||
| Sponsored Links |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BlackBox v2 | y_thelastknight | Conversion Tutorials | 567 | 11-03-2025 07:16 |
| INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 05:51 |
| Inno Setup: Additional Libraries | altef_4 | Conversion Tutorials | 50 | 21-10-2020 09:59 |
| Useful Dll for Inno Setup users | peterf1999 | Conversion Tutorials | 88 | 01-12-2017 16:00 |
| INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |