mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 01:41:22 +02:00
IDE: compiler options: show options with target file name
git-svn-id: trunk@25148 -
This commit is contained in:
parent
aa3bf01500
commit
a9499f1de3
@ -2759,7 +2759,7 @@ begin
|
||||
|
||||
}
|
||||
// append -o Option if neccessary
|
||||
//DebugLn(['TBaseCompilerOptions.MakeOptionsString ',ccloDoNotAppendOutFileOption in Flags,' TargetFilename="',TargetFilename,'" CurMainSrcFile="',CurMainSrcFile,'" CurOutputDir="',CurOutputDir,'"']);
|
||||
//DebugLn(['TBaseCompilerOptions.MakeOptionsString ',DbgSName(Self),' ',ccloDoNotAppendOutFileOption in Flags,' TargetFilename="',TargetFilename,'" CurMainSrcFile="',CurMainSrcFile,'" CurOutputDir="',CurOutputDir,'"']);
|
||||
if (not (ccloDoNotAppendOutFileOption in Flags)) and
|
||||
((TargetFilename<>'') or (CurMainSrcFile<>'') or (CurOutputDir<>'')) then
|
||||
begin
|
||||
@ -2981,6 +2981,9 @@ begin
|
||||
fOptionsString := CompOpts.fOptionsString;
|
||||
fLoaded := CompOpts.fLoaded;
|
||||
|
||||
// Target
|
||||
TargetFilename := CompOpts.TargetFilename;
|
||||
|
||||
// Search Paths
|
||||
StorePathDelim := CompOpts.StorePathDelim;
|
||||
IncludePath := CompOpts.fIncludePaths;
|
||||
@ -3110,6 +3113,9 @@ begin
|
||||
Tool.AddPathsDiff('StorePathDelim',PathDelimSwitchToDelim[FStorePathDelim],
|
||||
PathDelimSwitchToDelim[CompOpts.FStorePathDelim]);
|
||||
|
||||
// target
|
||||
Tool.AddDiff('TargetFilename',fTargetFilename,CompOpts.fTargetFilename);
|
||||
|
||||
// search paths
|
||||
Tool.Path:='Paths';
|
||||
Tool.AddPathsDiff('IncludePaths',fIncludePaths,CompOpts.fIncludePaths);
|
||||
|
@ -8,7 +8,8 @@ uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||
Buttons, StdCtrls, LCLType, InterfaceBase, IDEOptionsIntf, Project,
|
||||
CompilerOptions, LazarusIDEStrConsts, PathEditorDlg, LazConf, IDEProcs,
|
||||
CheckCompilerOpts, MacroIntf, ShowCompilerOpts, MainIntf;
|
||||
CheckCompilerOpts, MacroIntf, ShowCompilerOpts, MainIntf,
|
||||
project_application_options;
|
||||
|
||||
type
|
||||
|
||||
@ -51,6 +52,7 @@ type
|
||||
procedure DoLoadSave(Sender: TObject);
|
||||
protected
|
||||
procedure DoSaveSettings(AOptions: TAbstractIDEOptions);
|
||||
function GetTargetFilename: string;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
function Check: boolean; override;
|
||||
@ -132,6 +134,7 @@ begin
|
||||
Options := TBaseCompilerOptionsClass(FCompilerOpts.ClassType).Create(FCompilerOpts.Owner);
|
||||
try
|
||||
DoSaveSettings(Options);
|
||||
Options.TargetFilename:=GetTargetFilename;
|
||||
ShowCompilerOptionsDialog(Self, Options);
|
||||
finally
|
||||
Options.Free;
|
||||
@ -184,6 +187,34 @@ begin
|
||||
OnSaveIDEOptions(Self, AOptions);
|
||||
end;
|
||||
|
||||
function TCompilerPathOptionsFrame.GetTargetFilename: string;
|
||||
|
||||
function Search(Control: TWinControl): string;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if Control is TProjectApplicationOptionsFrame then begin
|
||||
Result:=TProjectApplicationOptionsFrame(Control).TargetFileEdit.Text;
|
||||
exit;
|
||||
end;
|
||||
for i:=0 to Control.ControlCount-1 do begin
|
||||
if Control.Controls[i] is TWinControl then begin
|
||||
Result:=Search(TWinControl(Control.Controls[i]));
|
||||
if Result<>'' then exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
if FCompilerOpts is TProjectCompilerOptions then begin
|
||||
// the target filename is on the project options page
|
||||
Result:=Search(GetParentForm(Self));
|
||||
if Result<>'' then exit;
|
||||
// project options frame not shown, use default
|
||||
Result:=FCompilerOpts.TargetFilename;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TCompilerPathOptionsFrame.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
|
@ -5,7 +5,7 @@ unit project_application_options;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||
ExtCtrls, StdCtrls, Buttons, ComCtrls, ExtDlgs, Math, LCLType, IDEOptionsIntf,
|
||||
Project, LazarusIDEStrConsts, EnvironmentOpts, ApplicationBundle, ProjectIcon,
|
||||
W32Manifest;
|
||||
|
@ -357,6 +357,9 @@ type
|
||||
// Beware: eventually LCLWidgetType will be replaced by a more generic solution
|
||||
property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType;
|
||||
|
||||
// target:
|
||||
property TargetFilename: String read fTargetFilename write SetTargetFilename;
|
||||
|
||||
// parsing:
|
||||
property SyntaxMode: string read FSyntaxMode write FSyntaxMode;
|
||||
property AssemblerStyle: Integer read fAssemblerStyle write fAssemblerStyle;
|
||||
@ -404,7 +407,6 @@ type
|
||||
property ExecutableType: TCompilationExecutableType
|
||||
read FExecutableType write FExecutableType;
|
||||
property UseExternalDbgSyms: Boolean read FUseExternalDbgSyms write FUseExternalDbgSyms;
|
||||
property TargetFilename: String read fTargetFilename write SetTargetFilename;
|
||||
|
||||
// messages:
|
||||
property ShowErrors: Boolean read fShowErrors write fShowErrors;
|
||||
|
Loading…
Reference in New Issue
Block a user