procedure CopyDir(const fromDir, toDir:String);
var
searchResult : TFindRec;
begin
if fromDir[Length(fromDir)]<>'\' then fromDir:=fromDir+'\';
if toDir[Length(toDir)]<>'\' then toDir:=toDir+'\';
ForceDirectories(toDir);
if FindFirst(fromDir+'*.*', searchResult) then
begin
repeat
Application.ProcessMessages();
if (searchResult.Attributes and FILE_ATTRIBUTE_DIRECTORY ) <> FILE_ATTRIBUTE_DIRECTORY then
begin
if FileExists(toDir+searchResult.name) then
DeleteFile(toDir+searchResult.name);
FileCopy(fromDir+searchResult.name, toDir+searchResult.name, false);
end else if (searchResult.Name <> '..') and (searchResult.Name <> '.') then
CopyDir(fromDir + searchResult.Name, toDir + searchResult.Name);
until not FindNext(searchResult);
FindClose(searchResult);
end;
end;
CopyDir(ExpandConstant('{app}\test\'), ExpandConstant('{app}'));
DelTree(ExpandConstant('{app}\test\'), True, True, True);
procedure MoveDir(const fromDir, toDir:String);
var
searchResult : TFindRec;
begin
if fromDir[Length(fromDir)]<>'\' then fromDir:=fromDir+'\';
if toDir[Length(toDir)]<>'\' then toDir:=toDir+'\';
ForceDirectories(toDir);
if FindFirst(fromDir+'*.*', searchResult) then
begin
repeat
Application.ProcessMessages();
if (searchResult.Attributes and FILE_ATTRIBUTE_DIRECTORY ) <> FILE_ATTRIBUTE_DIRECTORY then
begin
if FileExists(toDir+searchResult.name) then
DeleteFile(toDir+searchResult.name);
RenameFile(fromDir+searchResult.name, toDir+searchResult.name);
end else if (searchResult.Name <> '..') and (searchResult.Name <> '.') then
MoveDir(fromDir + searchResult.Name, toDir + searchResult.Name);
until not FindNext(searchResult);
FindClose(searchResult);
end;
end;
procedure CopyDir(const fromDir, toDir:String);
var
searchResult : TFindRec;
begin
if fromDir[Length(fromDir)]<>'\' then fromDir:=fromDir+'\';
if toDir[Length(toDir)]<>'\' then toDir:=toDir+'\';
ForceDirectories(toDir);
if FindFirst(fromDir+'*.*', searchResult) then
begin
repeat
Application.ProcessMessages();
if (searchResult.Attributes and FILE_ATTRIBUTE_DIRECTORY ) <> FILE_ATTRIBUTE_DIRECTORY then
begin
if FileExists(toDir+searchResult.name) then
DeleteFile(toDir+searchResult.name);
FileCopy(fromDir+searchResult.name, toDir+searchResult.name, false);
end else if (searchResult.Name <> '..') and (searchResult.Name <> '.') then
CopyDir(fromDir + searchResult.Name, toDir + searchResult.Name);
until not FindNext(searchResult);
FindClose(searchResult);
end;
end;
procedure MoveDir(const fromDir, toDir:String);
var
searchResult : TFindRec;
begin
if fromDir[Length(fromDir)]<>'\' then fromDir:=fromDir+'\';
if toDir[Length(toDir)]<>'\' then toDir:=toDir+'\';
ForceDirectories(toDir);
if FindFirst(fromDir+'*.*', searchResult) then
begin
repeat
Application.ProcessMessages();
if (searchResult.Attributes and FILE_ATTRIBUTE_DIRECTORY ) <> FILE_ATTRIBUTE_DIRECTORY then
begin
if FileExists(toDir+searchResult.name) then
DeleteFile(toDir+searchResult.name);
FileCopy(fromDir+searchResult.name, toDir+searchResult.name, false);
end else if (searchResult.Name <> '..') and (searchResult.Name <> '.') then
MoveDir(fromDir + searchResult.Name, toDir + searchResult.Name);
until not FindNext(searchResult);
FindClose(searchResult);
end;
end;
Оффсайт в ауте, но через веб-архив ещё можно скачать FreeARC 0.67 Alpha http://web.archive.org/web/20170106...download/testing/FreeArc-0.67-alpha-win32.exealexa1995,
Неблагодори
That's remarkable aha, thank you so much! The elapsed time is working correctly now but oddly enough the `Time Left` output is just saying `Test Run` not quite sure as to why
Short instructions:
- First, comment out the line #define records
- Compile the project and run the installation. This will be our test pass. All operations must go to the end and complete successfully.
- After the test run in the specified folder creates the records.inf file, you need to add it to the project by uncommenting the line #define records
- Again compile the project. After that, the installer is ready to work.