mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 22:19:21 +02:00
ide: compiler options frames - support TBaseCompilerOptions instead of TProjectCompilerOptions
git-svn-id: trunk@23340 -
This commit is contained in:
parent
658f3137f0
commit
8cfb4412a9
@ -197,7 +197,7 @@ procedure TCompilerCodegenOptionsFrame.ReadSettings(AOptions: TAbstractIDEOption
|
|||||||
var
|
var
|
||||||
i: longint;
|
i: longint;
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
chkSmartLinkUnit.Checked := SmartLinkUnit;
|
chkSmartLinkUnit.Checked := SmartLinkUnit;
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ var
|
|||||||
NewTargetOS: string;
|
NewTargetOS: string;
|
||||||
NewTargetCPU: string;
|
NewTargetCPU: string;
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
SmartLinkUnit := chkSmartLinkUnit.Checked;
|
SmartLinkUnit := chkSmartLinkUnit.Checked;
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ end;
|
|||||||
|
|
||||||
class function TCompilerCodegenOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TCompilerCodegenOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -77,7 +77,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerLinkingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerLinkingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
chkDebugGDB.Checked := GenerateDebugInfo;
|
chkDebugGDB.Checked := GenerateDebugInfo;
|
||||||
chkUseLineInfoUnit.Checked := UseLineInfoUnit;
|
chkUseLineInfoUnit.Checked := UseLineInfoUnit;
|
||||||
@ -102,7 +102,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
GenerateDebugInfo := chkDebugGDB.Checked;
|
GenerateDebugInfo := chkDebugGDB.Checked;
|
||||||
UseLineInfoUnit := chkUseLineInfoUnit.Checked;
|
UseLineInfoUnit := chkUseLineInfoUnit.Checked;
|
||||||
@ -122,7 +122,7 @@ end;
|
|||||||
|
|
||||||
class function TCompilerLinkingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TCompilerLinkingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -150,7 +150,7 @@ procedure TCompilerMessagesOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptio
|
|||||||
begin
|
begin
|
||||||
chkUseMsgFile.OnChange := nil;
|
chkUseMsgFile.OnChange := nil;
|
||||||
try
|
try
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
chkUseMsgFile.Checked := UseMsgFile;
|
chkUseMsgFile.Checked := UseMsgFile;
|
||||||
editMsgFileName.Caption := MsgFileName;
|
editMsgFileName.Caption := MsgFileName;
|
||||||
@ -164,7 +164,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerMessagesOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerMessagesOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
UseMsgFile := chkUseMsgFile.Checked;
|
UseMsgFile := chkUseMsgFile.Checked;
|
||||||
MsgFileName := editMsgFileName.Caption;
|
MsgFileName := editMsgFileName.Caption;
|
||||||
@ -174,7 +174,7 @@ end;
|
|||||||
|
|
||||||
class function TCompilerMessagesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TCompilerMessagesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -34,6 +34,7 @@ inherited CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'chkCustomConfigFile'
|
Caption = 'chkCustomConfigFile'
|
||||||
|
OnClick = chkCustomConfigFileClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object edtConfigPath: TEdit
|
object edtConfigPath: TEdit
|
||||||
|
@ -11,13 +11,13 @@ LazarusResources.Add('TCompilerOtherOptionsFrame','FORMDATA',[
|
|||||||
+'Spacing.Around'#2#6#7'Caption'#6#13'chkConfigFile'#8'TabOrder'#2#0#0#0#9'TC'
|
+'Spacing.Around'#2#6#7'Caption'#6#13'chkConfigFile'#8'TabOrder'#2#0#0#0#9'TC'
|
||||||
+'heckBox'#19'chkCustomConfigFile'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#29#5'W'
|
+'heckBox'#19'chkCustomConfigFile'#4'Left'#2#6#6'Height'#2#17#3'Top'#2#29#5'W'
|
||||||
+'idth'#3#25#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6
|
+'idth'#3#25#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6
|
||||||
+#19'chkCustomConfigFile'#8'TabOrder'#2#1#0#0#5'TEdit'#13'edtConfigPath'#4'Le'
|
+#19'chkCustomConfigFile'#7'OnClick'#7#24'chkCustomConfigFileClick'#8'TabOrde'
|
||||||
+'ft'#2#6#6'Height'#2#21#3'Top'#2'4'#5'Width'#3#25#2#5'Align'#7#5'alTop'#20'B'
|
+'r'#2#1#0#0#5'TEdit'#13'edtConfigPath'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'4'
|
||||||
+'orderSpacing.Around'#2#6#8'TabOrder'#2#2#4'Text'#6#13'edtConfigPath'#0#0#0
|
+#5'Width'#3#25#2#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#8'TabOrder'
|
||||||
+#242#2#1#9'TGroupBox'#16'grpCustomOptions'#4'Left'#2#0#6'Height'#3#127#1#3'T'
|
+#2#2#4'Text'#6#13'edtConfigPath'#0#0#0#242#2#1#9'TGroupBox'#16'grpCustomOpti'
|
||||||
+'op'#2'g'#5'Width'#3')'#2#5'Align'#7#8'alClient'#17'BorderSpacing.Top'#2#6#7
|
+'ons'#4'Left'#2#0#6'Height'#3#127#1#3'Top'#2'g'#5'Width'#3')'#2#5'Align'#7#8
|
||||||
+'Caption'#6#16'grpCustomOptions'#12'ClientHeight'#3'm'#1#11'ClientWidth'#3'%'
|
+'alClient'#17'BorderSpacing.Top'#2#6#7'Caption'#6#16'grpCustomOptions'#12'Cl'
|
||||||
+#2#8'TabOrder'#2#1#0#5'TMemo'#16'memCustomOptions'#4'Left'#2#6#6'Height'#3'a'
|
+'ientHeight'#3'm'#1#11'ClientWidth'#3'%'#2#8'TabOrder'#2#1#0#5'TMemo'#16'mem'
|
||||||
+#1#3'Top'#2#6#5'Width'#3#25#2#5'Align'#7#8'alClient'#20'BorderSpacing.Around'
|
+'CustomOptions'#4'Left'#2#6#6'Height'#3'a'#1#3'Top'#2#6#5'Width'#3#25#2#5'Al'
|
||||||
+#2#6#8'TabOrder'#2#0#0#0#0#0
|
+'ign'#7#8'alClient'#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -19,8 +19,9 @@ type
|
|||||||
grpConfigFile: TGroupBox;
|
grpConfigFile: TGroupBox;
|
||||||
grpCustomOptions: TGroupBox;
|
grpCustomOptions: TGroupBox;
|
||||||
memCustomOptions: TMemo;
|
memCustomOptions: TMemo;
|
||||||
|
procedure chkCustomConfigFileClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FOptions: TProjectCompilerOptions;
|
FOptions: TBaseCompilerOptions;
|
||||||
public
|
public
|
||||||
function Check: Boolean; override;
|
function Check: Boolean; override;
|
||||||
function GetTitle: string; override;
|
function GetTitle: string; override;
|
||||||
@ -34,6 +35,11 @@ implementation
|
|||||||
|
|
||||||
{ TCompilerOtherOptionsFrame }
|
{ TCompilerOtherOptionsFrame }
|
||||||
|
|
||||||
|
procedure TCompilerOtherOptionsFrame.chkCustomConfigFileClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
edtConfigPath.Enabled := chkCustomConfigFile.Checked;
|
||||||
|
end;
|
||||||
|
|
||||||
function TCompilerOtherOptionsFrame.Check: Boolean;
|
function TCompilerOtherOptionsFrame.Check: Boolean;
|
||||||
var
|
var
|
||||||
NewDontUseConfigFile: Boolean;
|
NewDontUseConfigFile: Boolean;
|
||||||
@ -86,7 +92,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerOtherOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerOtherOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
FOptions := AOptions as TProjectCompilerOptions;
|
FOptions := AOptions as TBaseCompilerOptions;
|
||||||
with FOptions do
|
with FOptions do
|
||||||
begin
|
begin
|
||||||
chkConfigFile.Checked := not DontUseConfigFile;
|
chkConfigFile.Checked := not DontUseConfigFile;
|
||||||
@ -99,7 +105,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerOtherOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerOtherOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
DontUseConfigFile := not chkConfigFile.Checked;
|
DontUseConfigFile := not chkConfigFile.Checked;
|
||||||
CustomConfigFile := chkCustomConfigFile.Checked;
|
CustomConfigFile := chkCustomConfigFile.Checked;
|
||||||
@ -110,7 +116,7 @@ end;
|
|||||||
|
|
||||||
class function TCompilerOtherOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TCompilerOtherOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -113,7 +113,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerParsingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerParsingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
if (AssemblerStyle in [1,2,3]) then
|
if (AssemblerStyle in [1,2,3]) then
|
||||||
grpAsmStyle.ItemIndex := AssemblerStyle
|
grpAsmStyle.ItemIndex := AssemblerStyle
|
||||||
@ -138,7 +138,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerParsingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerParsingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
AssemblerStyle := grpAsmStyle.ItemIndex;
|
AssemblerStyle := grpAsmStyle.ItemIndex;
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ end;
|
|||||||
|
|
||||||
class function TCompilerParsingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TCompilerParsingOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -30,7 +30,7 @@ type
|
|||||||
LCLWidgetTypeComboBox: TComboBox;
|
LCLWidgetTypeComboBox: TComboBox;
|
||||||
LCLWidgetTypeLabel: TLabel;
|
LCLWidgetTypeLabel: TLabel;
|
||||||
private
|
private
|
||||||
FCompilerOpts: TProjectCompilerOptions;
|
FCompilerOpts: TBaseCompilerOptions;
|
||||||
OtherUnitsPathEditBtn: TPathEditorButton;
|
OtherUnitsPathEditBtn: TPathEditorButton;
|
||||||
IncludeFilesPathEditBtn: TPathEditorButton;
|
IncludeFilesPathEditBtn: TPathEditorButton;
|
||||||
OtherSourcesPathEditBtn: TPathEditorButton;
|
OtherSourcesPathEditBtn: TPathEditorButton;
|
||||||
@ -462,7 +462,7 @@ procedure TCompilerPathOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
|||||||
var
|
var
|
||||||
LCLPlatform: TLCLPlatform;
|
LCLPlatform: TLCLPlatform;
|
||||||
begin
|
begin
|
||||||
FCompilerOpts := AOptions as TProjectCompilerOptions;
|
FCompilerOpts := AOptions as TBaseCompilerOptions;
|
||||||
with FCompilerOpts do
|
with FCompilerOpts do
|
||||||
begin
|
begin
|
||||||
edtOtherUnits.Text := OtherUnitFiles;
|
edtOtherUnits.Text := OtherUnitFiles;
|
||||||
@ -484,7 +484,7 @@ procedure TCompilerPathOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions)
|
|||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions do
|
with AOptions as TBaseCompilerOptions do
|
||||||
begin
|
begin
|
||||||
OtherUnitFiles := edtOtherUnits.Text;
|
OtherUnitFiles := edtOtherUnits.Text;
|
||||||
IncludePath := edtIncludeFiles.Text;
|
IncludePath := edtIncludeFiles.Text;
|
||||||
@ -503,7 +503,7 @@ end;
|
|||||||
|
|
||||||
class function TCompilerPathOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TCompilerPathOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -69,7 +69,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerVerbosityOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerVerbosityOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions, grpVerbosity do
|
with AOptions as TBaseCompilerOptions, grpVerbosity do
|
||||||
begin
|
begin
|
||||||
Checked[0] := ShowErrors;
|
Checked[0] := ShowErrors;
|
||||||
Checked[1] := ShowHintsForSenderNotUsed;
|
Checked[1] := ShowHintsForSenderNotUsed;
|
||||||
@ -98,7 +98,7 @@ end;
|
|||||||
|
|
||||||
procedure TCompilerVerbosityOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompilerVerbosityOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProjectCompilerOptions, grpVerbosity do
|
with AOptions as TBaseCompilerOptions, grpVerbosity do
|
||||||
begin
|
begin
|
||||||
ShowErrors := Checked[0];
|
ShowErrors := Checked[0];
|
||||||
ShowHintsForSenderNotUsed := Checked[1];
|
ShowHintsForSenderNotUsed := Checked[1];
|
||||||
@ -124,10 +124,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TCompilerVerbosityOptionsFrame.SupportedOptionsClass:
|
class function TCompilerVerbosityOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
TAbstractIDEOptionsClass;
|
|
||||||
begin
|
begin
|
||||||
Result := TProjectCompilerOptions;
|
Result := TBaseCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
Loading…
Reference in New Issue
Block a user