mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 03:59:10 +02:00
IDE: auto creating project unit output directory
git-svn-id: trunk@16284 -
This commit is contained in:
parent
a5bf37a4f3
commit
81ea7b9458
14
ide/main.pp
14
ide/main.pp
@ -9202,6 +9202,7 @@ var
|
||||
i: integer;
|
||||
VersionInfo: TProjectVersionInfo;
|
||||
NeedBuildAllFlag: Boolean;
|
||||
UnitOutputDirectory: String;
|
||||
begin
|
||||
if Project1.MainUnitInfo=nil then begin
|
||||
// this project has not source to compile
|
||||
@ -9322,6 +9323,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// create output directories
|
||||
UnitOutputDirectory:=Project1.CompilerOptions.GetUnitOutPath(false);
|
||||
if not DirPathExistsCached(UnitOutputDirectory) then begin
|
||||
if not FileIsInPath(UnitOutputDirectory,WorkingDir) then begin
|
||||
Result:=IDEQuestionDialog('Create directory?',
|
||||
'The output directory "'+UnitOutputDirectory+'" is missing.',
|
||||
mtConfirmation,[mrYes,'Create it',mrCancel],'');
|
||||
if Result<>mrYes then exit;
|
||||
end;
|
||||
Result:=ForceDirectoryInteractive(UnitOutputDirectory,[mbRetry]);
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
|
||||
// execute compilation tool 'Before'
|
||||
if not (pbfSkipTools in Flags) then begin
|
||||
ToolBefore:=TProjectCompilationToolOptions(
|
||||
|
Loading…
Reference in New Issue
Block a user