mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 12:29:15 +02:00
IDE: Fix BackupDir for Publish Module. Improve debug output.
git-svn-id: trunk@58870 -
This commit is contained in:
parent
a354560ef1
commit
5103cea987
@ -123,14 +123,12 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
function ShowPublishDialog(AOptions: TPublishModuleOptions): TModalResult;
|
function ShowPublishDialog(AOptions: TPublishModuleOptions): TModalResult;
|
||||||
var
|
|
||||||
PublishModuleDialog: TPublishModuleDialog;
|
|
||||||
begin
|
|
||||||
PublishModuleDialog:=TPublishModuleDialog.Create(nil);
|
|
||||||
with PublishModuleDialog do
|
|
||||||
begin
|
begin
|
||||||
|
with TPublishModuleDialog.Create(nil) do
|
||||||
|
try
|
||||||
Options:=AOptions;
|
Options:=AOptions;
|
||||||
Result:=ShowModal;
|
Result:=ShowModal;
|
||||||
|
finally
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -157,10 +155,10 @@ begin
|
|||||||
FTopDir := FProjPack.Directory; // Initial value for TopDir. It may change.
|
FTopDir := FProjPack.Directory; // Initial value for TopDir. It may change.
|
||||||
FSrcDir := FTopDir;
|
FSrcDir := FTopDir;
|
||||||
FDestDir := TrimAndExpandDirectory(RealPublishDir(FOptions));
|
FDestDir := TrimAndExpandDirectory(RealPublishDir(FOptions));
|
||||||
FBackupDir := AppendPathDelim(FSrcDir)
|
FBackupDir := AppendPathDelim(FSrcDir
|
||||||
+ EnvironmentOptions.BackupInfoProjectFiles.SubDirectory;
|
+ EnvironmentOptions.BackupInfoProjectFiles.SubDirectory);
|
||||||
COpts := FProjPack.LazCompilerOptions as TBaseCompilerOptions;
|
COpts := FProjPack.LazCompilerOptions as TBaseCompilerOptions;
|
||||||
FLibDir := AppendPathDelim(COpts.GetUnitOutPath(True,coptParsed));
|
FLibDir := COpts.GetUnitOutPath(True,coptParsed);
|
||||||
DebugLn(['TPublisher: Source Directory = ', FSrcDir]);
|
DebugLn(['TPublisher: Source Directory = ', FSrcDir]);
|
||||||
DebugLn(['TPublisher: Destination Directory = ', FDestDir]);
|
DebugLn(['TPublisher: Destination Directory = ', FDestDir]);
|
||||||
DebugLn(['TPublisher: Backup Directory = ', FBackupDir]);
|
DebugLn(['TPublisher: Backup Directory = ', FBackupDir]);
|
||||||
@ -184,19 +182,24 @@ var
|
|||||||
CurDir: string;
|
CurDir: string;
|
||||||
begin
|
begin
|
||||||
if FCopiedFiles.IndexOf(FileName) >= 0 then
|
if FCopiedFiles.IndexOf(FileName) >= 0 then
|
||||||
DebugLn(['DoFileFound: Already copied file ', FileName])
|
|
||||||
else if FOptions.FileCanBePublished(FileName) then
|
|
||||||
begin
|
begin
|
||||||
|
DebugLn(['DoFileFound: Already copied file ', FileName]);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
CurDir := ExtractFilePath(FileName);
|
CurDir := ExtractFilePath(FileName);
|
||||||
if (CurDir = FBackupDir) or (CurDir = FLibDir) then
|
if (CurDir = FBackupDir) or (CurDir = FLibDir) then
|
||||||
|
begin
|
||||||
|
DebugLn(['DoFileFound: In Backup or Output dir, not copied: ', FileName]);
|
||||||
Exit;
|
Exit;
|
||||||
|
end;
|
||||||
|
if FOptions.FileCanBePublished(FileName) then
|
||||||
|
begin
|
||||||
if CopyAFile(FileName) <> mrOK then
|
if CopyAFile(FileName) <> mrOK then
|
||||||
Inc(FCopyFailedCount);
|
Inc(FCopyFailedCount);
|
||||||
end
|
end
|
||||||
else begin
|
else
|
||||||
DebugLn(['DoFileFound: Rejected file ', FileName]);
|
DebugLn(['DoFileFound: Rejected file ', FileName]);
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPublisher.DoDirectoryFound;
|
procedure TPublisher.DoDirectoryFound;
|
||||||
begin
|
begin
|
||||||
@ -488,6 +491,7 @@ begin
|
|||||||
FCopyFailedCount:=0;
|
FCopyFailedCount:=0;
|
||||||
for I := 0 to FProjDirs.Count - 1 do
|
for I := 0 to FProjDirs.Count - 1 do
|
||||||
begin
|
begin
|
||||||
|
DebugLn(['Copy extra directory ', FProjDirs.Strings[I]]);
|
||||||
if IsDrive(FProjDirs.Strings[I]) then
|
if IsDrive(FProjDirs.Strings[I]) then
|
||||||
Search(FProjDirs.Strings[I], '', False)
|
Search(FProjDirs.Strings[I], '', False)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user