IDE: show compiler options: save option relative paths

git-svn-id: trunk@45420 -
This commit is contained in:
mattias 2014-06-09 07:40:55 +00:00
parent 98febbb4b8
commit 717159b415
5 changed files with 230 additions and 42 deletions

View File

@ -26,7 +26,8 @@
Author: Mattias Gaertner Author: Mattias Gaertner
Abstract:
History lists for strings and file names.
} }
unit InputHistory; unit InputHistory;

View File

@ -4719,6 +4719,7 @@ begin
end; end;
if DlgResult in [mrOk,mrYes,mrAll] then begin if DlgResult in [mrOk,mrYes,mrAll] then begin
MiscellaneousOptions.Modified:=true;
MiscellaneousOptions.Save; MiscellaneousOptions.Save;
IncreaseCompilerParseStamp; IncreaseCompilerParseStamp;
if DlgResult=mrAll then if DlgResult=mrAll then
@ -7613,8 +7614,10 @@ begin
Result:=fBuilder.MakeLazarus(BuildLazProfiles.Current, IDEBuildFlags); Result:=fBuilder.MakeLazarus(BuildLazProfiles.Current, IDEBuildFlags);
if Result<>mrOk then exit; if Result<>mrOk then exit;
if fBuilder.ProfileChanged then if fBuilder.ProfileChanged then begin
MiscellaneousOptions.Modified:=true;
MiscellaneousOptions.Save; MiscellaneousOptions.Save;
end;
finally finally
MainBuildBoss.SetBuildTargetProject1(true); MainBuildBoss.SetBuildTargetProject1(true);
DoCheckFilesOnDisk; DoCheckFilesOnDisk;

View File

@ -30,8 +30,8 @@ unit MiscOptions;
interface interface
uses uses
Classes, SysUtils, LCLProc, BuildProfileManager, Classes, SysUtils, LCLProc, BuildProfileManager, CodeToolsStructs, TextTools,
CodeToolsStructs, TextTools, FileUtil, Laz2_XMLCfg, LazConf, IDEProcs; FileUtil, Laz2_XMLCfg, LazFileCache, LazConf, IDEProcs;
type type
{ TFindRenameIdentifierOptions } { TFindRenameIdentifierOptions }
@ -44,19 +44,43 @@ type
); );
TFindRenameIdentifierOptions = class TFindRenameIdentifierOptions = class
private
FChangeStamp: integer;
FExtraFiles: TStrings;
FIdentifierFilename: string;
FIdentifierPosition: TPoint;
FRename: boolean;
FRenameShowResult: boolean;
FRenameTo: string;
FScope: TFindRenameScope;
FSearchInComments: boolean;
fSavedStamp: integer;
function GetModified: boolean;
procedure SetExtraFiles(AValue: TStrings);
procedure SetIdentifierFilename(AValue: string);
procedure SetIdentifierPosition(AValue: TPoint);
procedure SetModified(AValue: boolean);
procedure SetRename(AValue: boolean);
procedure SetRenameShowResult(AValue: boolean);
procedure SetRenameTo(AValue: string);
procedure SetScope(AValue: TFindRenameScope);
procedure SetSearchInComments(AValue: boolean);
public public
IdentifierFilename: string;
IdentifierPosition: TPoint;
Rename: boolean;
RenameTo: string;
SearchInComments: boolean;
RenameShowResult: boolean;
Scope: TFindRenameScope;
ExtraFiles: TStrings;
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
procedure LoadFromXMLConfig(XMLConfig: TXMLConfig; const Path: string); procedure LoadFromXMLConfig(XMLConfig: TXMLConfig; const Path: string);
procedure SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string); procedure SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string);
property ChangeStamp: integer read FChangeStamp;
procedure IncreaseChangeStamp; inline;
property Modified: boolean read GetModified write SetModified;
property IdentifierFilename: string read FIdentifierFilename write SetIdentifierFilename;
property IdentifierPosition: TPoint read FIdentifierPosition write SetIdentifierPosition;
property Rename: boolean read FRename write SetRename;
property RenameTo: string read FRenameTo write SetRenameTo;
property SearchInComments: boolean read FSearchInComments write SetSearchInComments;
property RenameShowResult: boolean read FRenameShowResult write SetRenameShowResult;
property Scope: TFindRenameScope read FScope write SetScope;
property ExtraFiles: TStrings read FExtraFiles write SetExtraFiles;
end; end;
@ -65,32 +89,47 @@ type
TMiscellaneousOptions = class TMiscellaneousOptions = class
private private
fBuildLazProfiles: TBuildLazarusProfiles; fBuildLazProfiles: TBuildLazarusProfiles;
FChangeStamp: integer;
FExtractProcName: string; FExtractProcName: string;
fFilename: string; fFilename: string;
FFindRenameIdentifierOptions: TFindRenameIdentifierOptions; FFindRenameIdentifierOptions: TFindRenameIdentifierOptions;
FMakeResourceStringInsertPolicy: TResourcestringInsertPolicy; FMakeResourceStringInsertPolicy: TResourcestringInsertPolicy;
FShowCompOptFullFilenames: boolean;
FSortSelDirection: TSortDirection; FSortSelDirection: TSortDirection;
FSortSelDomain: TSortDomain; FSortSelDomain: TSortDomain;
fSavedStamp: integer;
function GetBuildLazOpts: TBuildLazarusProfile; function GetBuildLazOpts: TBuildLazarusProfile;
function GetFilename: string; function GetFilename: string;
function GetModified: boolean;
procedure SetExtractProcName(AValue: string);
procedure SetMakeResourceStringInsertPolicy(
AValue: TResourcestringInsertPolicy);
procedure SetModified(AValue: boolean);
procedure SetShowCompOptFullFilenames(AValue: boolean);
procedure SetSortSelDirection(AValue: TSortDirection);
public public
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
procedure Load; procedure Load;
procedure Save; procedure Save;
property Filename: string read GetFilename; property Filename: string read GetFilename;
property ChangeStamp: integer read FChangeStamp;
procedure IncreaseChangeStamp; inline;
property Modified: boolean read GetModified write SetModified;
property BuildLazProfiles: TBuildLazarusProfiles read fBuildLazProfiles; property BuildLazProfiles: TBuildLazarusProfiles read fBuildLazProfiles;
property BuildLazOpts: TBuildLazarusProfile read GetBuildLazOpts; property BuildLazOpts: TBuildLazarusProfile read GetBuildLazOpts;
property ExtractProcName: string read FExtractProcName write FExtractProcName; property ExtractProcName: string read FExtractProcName write SetExtractProcName;
property SortSelDirection: TSortDirection read FSortSelDirection property SortSelDirection: TSortDirection read FSortSelDirection
write FSortSelDirection; write SetSortSelDirection;
property SortSelDomain: TSortDomain read FSortSelDomain write FSortSelDomain; property SortSelDomain: TSortDomain read FSortSelDomain write FSortSelDomain;
property MakeResourceStringInsertPolicy: TResourcestringInsertPolicy property MakeResourceStringInsertPolicy: TResourcestringInsertPolicy
read FMakeResourceStringInsertPolicy read FMakeResourceStringInsertPolicy
write FMakeResourceStringInsertPolicy; write SetMakeResourceStringInsertPolicy;
property FindRenameIdentifierOptions: TFindRenameIdentifierOptions property FindRenameIdentifierOptions: TFindRenameIdentifierOptions
read FFindRenameIdentifierOptions; read FFindRenameIdentifierOptions;
property ShowCompOptFullFilenames: boolean read FShowCompOptFullFilenames
write SetShowCompOptFullFilenames;
end; end;
const const
@ -153,9 +192,16 @@ end;
{ TMiscellaneousOptions } { TMiscellaneousOptions }
// inline
procedure TMiscellaneousOptions.IncreaseChangeStamp;
begin
LUIncreaseChangeStamp(fChangeStamp);
end;
constructor TMiscellaneousOptions.Create; constructor TMiscellaneousOptions.Create;
begin begin
inherited Create; inherited Create;
fSavedStamp:=LUInvalidChangeStamp;
fBuildLazProfiles:=TBuildLazarusProfiles.Create; fBuildLazProfiles:=TBuildLazarusProfiles.Create;
FExtractProcName:='NewProc'; FExtractProcName:='NewProc';
fSortSelDirection:=sdAscending; fSortSelDirection:=sdAscending;
@ -186,6 +232,50 @@ begin
Result:=fFilename; Result:=fFilename;
end; end;
function TMiscellaneousOptions.GetModified: boolean;
begin
Result:=(ChangeStamp<>fSavedStamp) or FindRenameIdentifierOptions.Modified;
end;
procedure TMiscellaneousOptions.SetExtractProcName(AValue: string);
begin
if FExtractProcName=AValue then Exit;
FExtractProcName:=AValue;
IncreaseChangeStamp;
end;
procedure TMiscellaneousOptions.SetMakeResourceStringInsertPolicy(
AValue: TResourcestringInsertPolicy);
begin
if FMakeResourceStringInsertPolicy=AValue then Exit;
FMakeResourceStringInsertPolicy:=AValue;
IncreaseChangeStamp;
end;
procedure TMiscellaneousOptions.SetModified(AValue: boolean);
begin
if AValue then
IncreaseChangeStamp
else begin
fSavedStamp:=ChangeStamp;
FindRenameIdentifierOptions.Modified:=false;
end;
end;
procedure TMiscellaneousOptions.SetShowCompOptFullFilenames(AValue: boolean);
begin
if FShowCompOptFullFilenames=AValue then Exit;
FShowCompOptFullFilenames:=AValue;
IncreaseChangeStamp;
end;
procedure TMiscellaneousOptions.SetSortSelDirection(AValue: TSortDirection);
begin
if FSortSelDirection=AValue then Exit;
FSortSelDirection:=AValue;
IncreaseChangeStamp;
end;
function TMiscellaneousOptions.GetBuildLazOpts: TBuildLazarusProfile; function TMiscellaneousOptions.GetBuildLazOpts: TBuildLazarusProfile;
begin begin
Result:=BuildLazProfiles.Current; Result:=BuildLazProfiles.Current;
@ -206,8 +296,6 @@ begin
try try
Path:='MiscellaneousOptions/'; Path:='MiscellaneousOptions/';
FileVersion:=XMLConfig.GetValue(Path+'Version/Value',0); FileVersion:=XMLConfig.GetValue(Path+'Version/Value',0);
// if (FileVersion<MiscOptsVersion) and (FileVersion<>0) then
// DebugLn('NOTE: converting old miscellaneous options ...');
BuildLazProfiles.Load(XMLConfig,Path+'BuildLazarusOptions/',FileVersion); BuildLazProfiles.Load(XMLConfig,Path+'BuildLazarusOptions/',FileVersion);
SortSelDirection:=SortDirectionNameToType(XMLConfig.GetValue( SortSelDirection:=SortDirectionNameToType(XMLConfig.GetValue(
Path+'SortSelection/Direction',SortDirectionNames[sdAscending])); Path+'SortSelection/Direction',SortDirectionNames[sdAscending]));
@ -219,6 +307,7 @@ begin
ExtractProcName:=XMLConfig.GetValue(Path+'ExtractProcName/Value','NewProc'); ExtractProcName:=XMLConfig.GetValue(Path+'ExtractProcName/Value','NewProc');
FindRenameIdentifierOptions.LoadFromXMLConfig(XMLConfig, FindRenameIdentifierOptions.LoadFromXMLConfig(XMLConfig,
Path+'FindRenameIdentifier/'); Path+'FindRenameIdentifier/');
ShowCompOptFullFilenames:=XMLConfig.GetValue(Path+'ShowCompOpts/Filenames/Full',false);
finally finally
XMLConfig.Free; XMLConfig.Free;
end; end;
@ -227,6 +316,7 @@ begin
DebugLn('ERROR: unable read miscellaneous options from "',GetFilename,'": ',E.Message); DebugLn('ERROR: unable read miscellaneous options from "',GetFilename,'": ',E.Message);
end; end;
end; end;
Modified:=false;
end; end;
procedure TMiscellaneousOptions.Save; procedure TMiscellaneousOptions.Save;
@ -234,6 +324,7 @@ var XMLConfig: TXMLConfig;
Path: String; Path: String;
XMLFilename: String; XMLFilename: String;
begin begin
if not Modified then exit;
XMLFilename:=GetFilename; XMLFilename:=GetFilename;
try try
XMLConfig:=TXMLConfig.CreateClean(XMLFilename); XMLConfig:=TXMLConfig.CreateClean(XMLFilename);
@ -261,6 +352,7 @@ begin
'NewProc'); 'NewProc');
FindRenameIdentifierOptions.SaveToXMLConfig(XMLConfig, FindRenameIdentifierOptions.SaveToXMLConfig(XMLConfig,
Path+'FindRenameIdentifier/'); Path+'FindRenameIdentifier/');
XMLConfig.SetDeleteValue(Path+'ShowCompOpts/Filenames/Full',ShowCompOptFullFilenames,false);
XMLConfig.Flush; XMLConfig.Flush;
finally finally
XMLConfig.Free; XMLConfig.Free;
@ -270,33 +362,112 @@ begin
DebugLn('ERROR: unable read miscellaneous options from "',XMLFilename,'": ',E.Message); DebugLn('ERROR: unable read miscellaneous options from "',XMLFilename,'": ',E.Message);
end; end;
end; end;
Modified:=false;
end; end;
{ TFindRenameIdentifierOptions } { TFindRenameIdentifierOptions }
// inline
procedure TFindRenameIdentifierOptions.IncreaseChangeStamp;
begin
LUIncreaseChangeStamp(fChangeStamp);
end;
procedure TFindRenameIdentifierOptions.SetExtraFiles(AValue: TStrings);
begin
if (FExtraFiles=AValue) or FExtraFiles.Equals(AValue) then Exit;
FExtraFiles.Assign(AValue);
IncreaseChangeStamp;
end;
function TFindRenameIdentifierOptions.GetModified: boolean;
begin
Result:=fSavedStamp=ChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetIdentifierFilename(AValue: string);
begin
if FIdentifierFilename=AValue then Exit;
FIdentifierFilename:=AValue;
IncreaseChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetIdentifierPosition(AValue: TPoint);
begin
if ComparePoints(FIdentifierPosition,AValue)=0 then Exit;
FIdentifierPosition:=AValue;
IncreaseChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetModified(AValue: boolean);
begin
if AValue then
IncreaseChangeStamp
else
fSavedStamp:=ChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetRename(AValue: boolean);
begin
if FRename=AValue then Exit;
FRename:=AValue;
IncreaseChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetRenameShowResult(AValue: boolean);
begin
if FRenameShowResult=AValue then Exit;
FRenameShowResult:=AValue;
IncreaseChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetRenameTo(AValue: string);
begin
if FRenameTo=AValue then Exit;
FRenameTo:=AValue;
IncreaseChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetScope(AValue: TFindRenameScope);
begin
if FScope=AValue then Exit;
FScope:=AValue;
IncreaseChangeStamp;
end;
procedure TFindRenameIdentifierOptions.SetSearchInComments(AValue: boolean);
begin
if FSearchInComments=AValue then Exit;
FSearchInComments:=AValue;
IncreaseChangeStamp;
end;
constructor TFindRenameIdentifierOptions.Create; constructor TFindRenameIdentifierOptions.Create;
begin begin
ExtraFiles:=TStringList.Create; inherited;
fSavedStamp:=LUInvalidChangeStamp;
fExtraFiles:=TStringList.Create;
end; end;
destructor TFindRenameIdentifierOptions.Destroy; destructor TFindRenameIdentifierOptions.Destroy;
begin begin
ExtraFiles.Free; FreeAndNil(FExtraFiles);
inherited Destroy; inherited Destroy;
end; end;
procedure TFindRenameIdentifierOptions.LoadFromXMLConfig(XMLConfig: TXMLConfig; procedure TFindRenameIdentifierOptions.LoadFromXMLConfig(XMLConfig: TXMLConfig;
const Path: string); const Path: string);
begin begin
IdentifierFilename:=XMLConfig.GetValue(Path+'Identifier/Filename',''); fIdentifierFilename:=XMLConfig.GetValue(Path+'Identifier/Filename','');
LoadPoint(XMLConfig,Path+'Identifier/',IdentifierPosition,Point(0,0)); LoadPoint(XMLConfig,Path+'Identifier/',fIdentifierPosition,Point(0,0));
Rename:=XMLConfig.GetValue(Path+'Rename/Value',false); fRename:=XMLConfig.GetValue(Path+'Rename/Value',false);
RenameTo:=XMLConfig.GetValue(Path+'Rename/Identifier',''); fRenameTo:=XMLConfig.GetValue(Path+'Rename/Identifier','');
SearchInComments:=XMLConfig.GetValue(Path+'SearchInComments/Value',true); fSearchInComments:=XMLConfig.GetValue(Path+'SearchInComments/Value',true);
RenameShowResult:=XMLConfig.GetValue(Path+'RenameShowResult/Value',false); fRenameShowResult:=XMLConfig.GetValue(Path+'RenameShowResult/Value',false);
Scope:=FindRenameScopeNameToScope(XMLConfig.GetValue(Path+'Scope/Value', fScope:=FindRenameScopeNameToScope(XMLConfig.GetValue(Path+'Scope/Value',
FindRenameScopeNames[frAllOpenProjectsAndPackages])); FindRenameScopeNames[frAllOpenProjectsAndPackages]));
LoadStringList(XMLConfig,ExtraFiles,Path+'ExtraFiles/'); LoadStringList(XMLConfig,fExtraFiles,Path+'ExtraFiles/');
Modified:=false;
end; end;
procedure TFindRenameIdentifierOptions.SaveToXMLConfig(XMLConfig: TXMLConfig; procedure TFindRenameIdentifierOptions.SaveToXMLConfig(XMLConfig: TXMLConfig;
@ -311,6 +482,7 @@ begin
XMLConfig.SetDeleteValue(Path+'Scope/Value',FindRenameScopeNames[Scope], XMLConfig.SetDeleteValue(Path+'Scope/Value',FindRenameScopeNames[Scope],
FindRenameScopeNames[frAllOpenProjectsAndPackages]); FindRenameScopeNames[frAllOpenProjectsAndPackages]);
SaveStringList(XMLConfig,ExtraFiles,Path+'ExtraFiles/'); SaveStringList(XMLConfig,ExtraFiles,Path+'ExtraFiles/');
Modified:=false;
end; end;
end. end.

View File

@ -9,20 +9,21 @@ object ShowCompilerOptionsDlg: TShowCompilerOptionsDlg
ClientWidth = 481 ClientWidth = 481
Constraints.MinHeight = 194 Constraints.MinHeight = 194
Constraints.MinWidth = 390 Constraints.MinWidth = 390
OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
Position = poOwnerFormCenter Position = poOwnerFormCenter
LCLVersion = '1.1' LCLVersion = '1.3'
object CloseButton: TBitBtn object CloseButton: TBitBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 400 Left = 392
Height = 28 Height = 22
Top = 386 Top = 392
Width = 75 Width = 83
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -35,7 +36,7 @@ object ShowCompilerOptionsDlg: TShowCompilerOptionsDlg
object PageControl1: TPageControl object PageControl1: TPageControl
AnchorSideBottom.Control = CloseButton AnchorSideBottom.Control = CloseButton
Left = 0 Left = 0
Height = 380 Height = 386
Top = 0 Top = 0
Width = 481 Width = 481
ActivePage = InheritedParamsTabSheet ActivePage = InheritedParamsTabSheet
@ -80,13 +81,13 @@ object ShowCompilerOptionsDlg: TShowCompilerOptionsDlg
end end
object InheritedParamsTabSheet: TTabSheet object InheritedParamsTabSheet: TTabSheet
Caption = 'InheritedParams' Caption = 'InheritedParams'
ClientHeight = 351 ClientHeight = 347
ClientWidth = 477 ClientWidth = 475
object InhTreeView: TTreeView object InhTreeView: TTreeView
Left = 0 Left = 0
Height = 285 Height = 281
Top = 0 Top = 0
Width = 477 Width = 475
Align = alClient Align = alClient
DefaultItemHeight = 18 DefaultItemHeight = 18
ReadOnly = True ReadOnly = True
@ -98,8 +99,8 @@ object ShowCompilerOptionsDlg: TShowCompilerOptionsDlg
object InhItemMemo: TMemo object InhItemMemo: TMemo
Left = 0 Left = 0
Height = 61 Height = 61
Top = 290 Top = 286
Width = 477 Width = 475
Align = alBottom Align = alBottom
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoVertical ScrollBars = ssAutoVertical
@ -109,8 +110,8 @@ object ShowCompilerOptionsDlg: TShowCompilerOptionsDlg
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 5 Height = 5
Top = 285 Top = 281
Width = 477 Width = 475
Align = alBottom Align = alBottom
ResizeAnchor = akBottom ResizeAnchor = akBottom
end end

View File

@ -40,7 +40,7 @@ uses
CodeToolsCfgScript, CodeToolsCfgScript,
LazIDEIntf, IDEImagesIntf, CompOptsIntf, ProjectIntf, LazIDEIntf, IDEImagesIntf, CompOptsIntf, ProjectIntf,
LazarusIDEStrConsts, CompilerOptions, TransferMacros, LazarusIDEStrConsts, CompilerOptions, TransferMacros,
IDEProcs, Project, ModeMatrixOpts, PackageDefs; IDEProcs, Project, ModeMatrixOpts, PackageDefs, MiscOptions;
type type
@ -56,6 +56,7 @@ type
InhTreeView: TTreeView; InhTreeView: TTreeView;
PageControl1: TPageControl; PageControl1: TPageControl;
RelativePathsCheckBox: TCheckBox; RelativePathsCheckBox: TCheckBox;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure InhTreeViewSelectionChanged(Sender: TObject); procedure InhTreeViewSelectionChanged(Sender: TObject);
@ -170,6 +171,7 @@ begin
PageControl1.ActivePage:=CmdLineParamsTabSheet; PageControl1.ActivePage:=CmdLineParamsTabSheet;
CmdLineParamsTabSheet.Caption:=lisCommandLineParameters; CmdLineParamsTabSheet.Caption:=lisCommandLineParameters;
RelativePathsCheckBox.Caption:=lisShowRelativePaths; RelativePathsCheckBox.Caption:=lisShowRelativePaths;
RelativePathsCheckBox.Checked:=not MiscellaneousOptions.ShowCompOptFullFilenames;
InheritedParamsTabSheet.Caption:=lisInheritedParameters; InheritedParamsTabSheet.Caption:=lisInheritedParameters;
InhTreeView.Images := IDEImages.Images_16; InhTreeView.Images := IDEImages.Images_16;
@ -178,6 +180,13 @@ begin
CloseButton.Caption:=lisBtnClose; CloseButton.Caption:=lisBtnClose;
end; end;
procedure TShowCompilerOptionsDlg.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
MiscellaneousOptions.ShowCompOptFullFilenames:=not RelativePathsCheckBox.Checked;
MiscellaneousOptions.Save;
end;
procedure TShowCompilerOptionsDlg.FormDestroy(Sender: TObject); procedure TShowCompilerOptionsDlg.FormDestroy(Sender: TObject);
begin begin
ClearInheritedTree; ClearInheritedTree;
@ -197,6 +206,7 @@ var
Flags: TCompilerCmdLineOptions; Flags: TCompilerCmdLineOptions;
CurOptions: String; CurOptions: String;
begin begin
if CompilerOpts=nil then exit;
Flags:=CompilerOpts.DefaultMakeOptionsFlags; Flags:=CompilerOpts.DefaultMakeOptionsFlags;
if not RelativePathsCheckBox.Checked then if not RelativePathsCheckBox.Checked then
Include(Flags,ccloAbsolutePaths); Include(Flags,ccloAbsolutePaths);
@ -283,6 +293,7 @@ var
end; end;
begin begin
if CompilerOpts=nil then exit;
OptionsList := nil; OptionsList := nil;
//debugln(['TCompilerInheritedOptionsFrame.UpdateInheritedTree START CompilerOpts=',DbgSName(CompilerOpts)]); //debugln(['TCompilerInheritedOptionsFrame.UpdateInheritedTree START CompilerOpts=',DbgSName(CompilerOpts)]);
CompilerOpts.GetInheritedCompilerOptions(OptionsList); CompilerOpts.GetInheritedCompilerOptions(OptionsList);