IDE: use a new options frame in project options for config and target. Reorganize other options, too.

git-svn-id: trunk@42037 -
This commit is contained in:
juha 2013-07-09 18:40:09 +00:00
parent a3561b7294
commit 7978db505c
17 changed files with 394 additions and 935 deletions

View File

@ -145,7 +145,6 @@ type
procedure SetShowTriedFiles(const AValue: Boolean);
procedure SetShowUsedFiles(const AValue: Boolean);
procedure SetShowWarn(const AValue: Boolean);
procedure SetSmallerCode(const AValue: boolean);
procedure SetSmartLinkUnit(const AValue: Boolean);
procedure SetRelocatableUnit(const AValue: Boolean);
procedure SetStackChecks(const AValue: Boolean);
@ -154,13 +153,14 @@ type
procedure SetStripSymbols(const AValue: Boolean);
procedure SetSyntaxMode(const AValue: string);
procedure SetTargetFilenameAppplyConventions(const AValue: boolean);
procedure SetUncertainOpt(const AValue: Boolean);
procedure SetUseAnsiStr(const AValue: Boolean);
procedure SetUseExternalDbgSyms(const AValue: Boolean);
procedure SetUseHeaptrc(const AValue: Boolean);
procedure SetUseLineInfoUnit(const AValue: Boolean);
procedure SetUseValgrind(const AValue: Boolean);
procedure SetVarsInReg(const AValue: Boolean);
//procedure SetUncertainOpt(const AValue: Boolean);
//procedure SetVarsInReg(const AValue: Boolean);
//procedure SetSmallerCode(const AValue: boolean);
procedure SetVerifyObjMethodCall(const AValue: boolean);
procedure SetWin32GraphicApp(const AValue: boolean);
procedure SetWriteFPCLogo(const AValue: Boolean);
@ -201,13 +201,13 @@ type
fHeapSize: LongInt;
fStackSize: LongInt;
fVerifyObjMethodCall: boolean;
FSmallerCode: boolean;
fTargetProc: string;
fTargetCPU: string;
fVarsInReg: Boolean;
fUncertainOpt: Boolean;
fOptLevel: Integer;
fTargetOS: String;
fTargetCPU: string;
fTargetProc: string;
fOptLevel: Integer;
//fVarsInReg: Boolean;
//fUncertainOpt: Boolean;
//FSmallerCode: boolean;
// Linking:
fGenDebugInfo: Boolean;
@ -360,13 +360,13 @@ type
property StackSize: Integer read fStackSize write SetStackSize;
property VerifyObjMethodCall: boolean read FVerifyObjMethodCall
write SetVerifyObjMethodCall;
property SmallerCode: boolean read FSmallerCode write SetSmallerCode;
property TargetOS: string read fTargetOS write SetTargetOS;
property TargetCPU: string read fTargetCPU write SetTargetCPU; // general type
property TargetProcessor: String read fTargetProc write SetTargetProc; // specific
property TargetOS: string read fTargetOS write SetTargetOS;
property VariablesInRegisters: Boolean read fVarsInReg write SetVarsInReg;
property UncertainOptimizations: Boolean read fUncertainOpt write SetUncertainOpt;
property OptimizationLevel: Integer read fOptLevel write SetOptLevel;
//property VariablesInRegisters: Boolean read fVarsInReg write SetVarsInReg;
//property UncertainOptimizations: Boolean read fUncertainOpt write SetUncertainOpt;
//property SmallerCode: boolean read FSmallerCode write SetSmallerCode;
// linking:
property GenerateDebugInfo: Boolean read fGenDebugInfo write SetGenDebugInfo;
@ -599,14 +599,14 @@ begin
fShowWarn:=AValue;
IncreaseChangeStamp;
end;
{
procedure TLazCompilerOptions.SetSmallerCode(const AValue: boolean);
begin
if FSmallerCode=AValue then exit;
FSmallerCode:=AValue;
IncreaseChangeStamp;
end;
}
procedure TLazCompilerOptions.SetSmartLinkUnit(const AValue: Boolean);
begin
if fSmartLinkUnit=AValue then exit;
@ -801,14 +801,14 @@ begin
FTargetFilenameAppplyConventions:=AValue;
IncreaseChangeStamp;
end;
{
procedure TLazCompilerOptions.SetUncertainOpt(const AValue: Boolean);
begin
if fUncertainOpt=AValue then exit;
fUncertainOpt:=AValue;
IncreaseChangeStamp;
end;
}
procedure TLazCompilerOptions.SetUseAnsiStr(const AValue: Boolean);
begin
if fUseAnsiStr=AValue then exit;
@ -843,14 +843,14 @@ begin
fUseValgrind:=AValue;
IncreaseChangeStamp;
end;
{
procedure TLazCompilerOptions.SetVarsInReg(const AValue: Boolean);
begin
if fVarsInReg=AValue then exit;
fVarsInReg:=AValue;
IncreaseChangeStamp;
end;
}
procedure TLazCompilerOptions.SetVerifyObjMethodCall(const AValue: boolean);
begin
if FVerifyObjMethodCall=AValue then exit;

View File

@ -292,6 +292,7 @@ const
GroupCompiler = 100200;
CompilerOptionsBuildModes = 0100;
CompilerOptionsSearchPaths = 0200;
CompilerOptionsConfigTarget = 0250;
CompilerOptionsParsing = 0300;
CompilerOptionsCodeGeneration = 0400;
CompilerOptionsLinking = 0500;

View File

@ -1373,7 +1373,7 @@ var
Result:=SwitchPathDelims(SearchPath,PathDelimChange);
Result:=MinimizeSearchPath(Result);
end;
{
procedure ReadSmaller;
begin
if FileVersion<2 then begin
@ -1385,7 +1385,7 @@ var
end else
SmallerCode:=aXMLConfig.GetValue(p+'SmallerCode/Value',false);
end;
}
procedure ReadSmartLinkUnit;
begin
if FileVersion<3 then
@ -1471,7 +1471,6 @@ begin
HeapSize := aXMLConfig.GetValue(p+'HeapSize/Value', 0);
StackSize := aXMLConfig.GetValue(p+'StackSize/Value', 0);
VerifyObjMethodCall := aXMLConfig.GetValue(p+'VerifyObjMethodCallValidity/Value', false);
ReadSmaller;
if FileVersion<7 then begin
i:=aXMLConfig.GetValue(p+'TargetProcessor/Value', 0);
case i of
@ -1483,9 +1482,10 @@ begin
TargetProcessor := aXMLConfig.GetValue(p+'TargetProcessor/Value', '');
TargetCPU := aXMLConfig.GetValue(p+'TargetCPU/Value', '');
TargetOS := aXMLConfig.GetValue(p+'TargetOS/Value', '');
VariablesInRegisters := aXMLConfig.GetValue(p+'Optimizations/VariablesInRegisters/Value', false);
UncertainOptimizations := aXMLConfig.GetValue(p+'Optimizations/UncertainOptimizations/Value', false);
OptimizationLevel := aXMLConfig.GetValue(p+'Optimizations/OptimizationLevel/Value', 1);
//VariablesInRegisters := aXMLConfig.GetValue(p+'Optimizations/VariablesInRegisters/Value', false);
//UncertainOptimizations := aXMLConfig.GetValue(p+'Optimizations/UncertainOptimizations/Value', false);
//ReadSmaller;
{ Linking }
p:=Path+'Linking/';
@ -1695,13 +1695,13 @@ begin
aXMLConfig.SetDeleteValue(p+'HeapSize/Value', HeapSize,0);
aXMLConfig.SetDeleteValue(p+'StackSize/Value', StackSize,0);
aXMLConfig.SetDeleteValue(p+'VerifyObjMethodCallValidity/Value', VerifyObjMethodCall,false);
aXMLConfig.SetDeleteValue(p+'SmallerCode/Value', SmallerCode, false);
aXMLConfig.SetDeleteValue(p+'TargetProcessor/Value', TargetProcessor,'');
aXMLConfig.SetDeleteValue(p+'TargetCPU/Value', TargetCPU,'');
aXMLConfig.SetDeleteValue(p+'TargetOS/Value', TargetOS,'');
aXMLConfig.SetDeleteValue(p+'Optimizations/VariablesInRegisters/Value', VariablesInRegisters,false);
aXMLConfig.SetDeleteValue(p+'Optimizations/UncertainOptimizations/Value', UncertainOptimizations,false);
aXMLConfig.SetDeleteValue(p+'Optimizations/OptimizationLevel/Value', OptimizationLevel,1);
//aXMLConfig.SetDeleteValue(p+'Optimizations/VariablesInRegisters/Value', VariablesInRegisters,false);
//aXMLConfig.SetDeleteValue(p+'Optimizations/UncertainOptimizations/Value', UncertainOptimizations,false);
//aXMLConfig.SetDeleteValue(p+'SmallerCode/Value', SmallerCode, false);
{ Linking }
p:=Path+'Linking/';
@ -2742,8 +2742,8 @@ begin
{ Optimizations }
OptimizeSwitches:='';
if SmallerCode then
OptimizeSwitches := OptimizeSwitches + 's';
//if SmallerCode then
// OptimizeSwitches := OptimizeSwitches + 's';
{ OptimizationLevel 1 = Level 1 2 = Level 2 3 = Level 3 }
case (OptimizationLevel) of
1: OptimizeSwitches := OptimizeSwitches + '1';
@ -2754,12 +2754,11 @@ begin
switches := switches + ' -O'+OptimizeSwitches;
// uncertain
if (UncertainOptimizations) then
Switches := Switches + ' -OoUNCERTAIN';
//if (UncertainOptimizations) then
// Switches := Switches + ' -OoUNCERTAIN';
// registers
if (VariablesInRegisters) then
Switches := Switches + ' -OoREGVAR';
//if (VariablesInRegisters) then
// Switches := Switches + ' -OoREGVAR';
{ Target OS }
if (CurTargetOS<>'')
@ -3176,13 +3175,13 @@ begin
fStackChecks := false;
fHeapSize := 0;
fStackSize := 0;
FSmallerCode := false;
fTargetProc := '';
fTargetCPU := '';
fVarsInReg := false;
fUncertainOpt := false;
fOptLevel := 1;
fTargetOS := '';
fTargetCPU := '';
fTargetProc := '';
fOptLevel := 1;
//fVarsInReg := false;
//fUncertainOpt := false;
//FSmallerCode := false;
// linking
fGenDebugInfo := True;
@ -3292,13 +3291,13 @@ begin
fHeapSize := CompOpts.fHeapSize;
fStackSize := CompOpts.fStackSize;
fEmulatedFloatOpcodes := CompOpts.fEmulatedFloatOpcodes;
FSmallerCode := CompOpts.FSmallerCode;
fTargetProc := CompOpts.fTargetProc;
fTargetCPU := CompOpts.fTargetCPU;
fVarsInReg := CompOpts.fVarsInReg;
fUncertainOpt := CompOpts.fUncertainOpt;
fOptLevel := CompOpts.fOptLevel;
fTargetOS := CompOpts.fTargetOS;
fTargetCPU := CompOpts.fTargetCPU;
fTargetProc := CompOpts.fTargetProc;
fOptLevel := CompOpts.fOptLevel;
//fVarsInReg := CompOpts.fVarsInReg;
//fUncertainOpt := CompOpts.fUncertainOpt;
//FSmallerCode := CompOpts.FSmallerCode;
// Linking
fGenDebugInfo := CompOpts.fGenDebugInfo;
@ -3446,13 +3445,13 @@ begin
if Done(Tool.AddDiff('HeapSize',fHeapSize,CompOpts.fHeapSize)) then exit;
if Done(Tool.AddDiff('StackSize',fStackSize,CompOpts.fStackSize)) then exit;
if Done(Tool.AddDiff('EmulatedFloatOpcodes',fEmulatedFloatOpcodes,CompOpts.fEmulatedFloatOpcodes)) then exit;
if Done(Tool.AddDiff('SmallerCode',FSmallerCode,CompOpts.FSmallerCode)) then exit;
if Done(Tool.AddDiff('TargetProc',fTargetProc,CompOpts.fTargetProc)) then exit;
if Done(Tool.AddDiff('TargetCPU',fTargetCPU,CompOpts.fTargetCPU)) then exit;
if Done(Tool.AddDiff('VarsInReg',fVarsInReg,CompOpts.fVarsInReg)) then exit;
if Done(Tool.AddDiff('UncertainOpt',fUncertainOpt,CompOpts.fUncertainOpt)) then exit;
if Done(Tool.AddDiff('OptLevel',fOptLevel,CompOpts.fOptLevel)) then exit;
if Done(Tool.AddDiff('TargetOS',fTargetOS,CompOpts.fTargetOS)) then exit;
if Done(Tool.AddDiff('TargetCPU',fTargetCPU,CompOpts.fTargetCPU)) then exit;
if Done(Tool.AddDiff('TargetProc',fTargetProc,CompOpts.fTargetProc)) then exit;
if Done(Tool.AddDiff('OptLevel',fOptLevel,CompOpts.fOptLevel)) then exit;
//if Done(Tool.AddDiff('VarsInReg',fVarsInReg,CompOpts.fVarsInReg)) then exit;
//if Done(Tool.AddDiff('UncertainOpt',fUncertainOpt,CompOpts.fUncertainOpt)) then exit;
//if Done(Tool.AddDiff('SmallerCode',FSmallerCode,CompOpts.FSmallerCode)) then exit;
// linking
if Tool<>nil then Tool.Path:='Linking';

View File

@ -197,6 +197,7 @@ begin
P.Sources.AddSrc('frames/compiler_buildmacro_options.pas');
P.Sources.AddSrc('frames/compiler_codegen_options.pas');
P.Sources.AddSrc('frames/compiler_compilation_options.pas');
P.Sources.AddSrc('frames/compiler_config_target.pas');
P.Sources.AddSrc('frames/compiler_linking_options.pas');
P.Sources.AddSrc('frames/compiler_messages_options.pas');
P.Sources.AddSrc('frames/compiler_other_options.pas');

View File

@ -9,28 +9,28 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
DesignLeft = 290
DesignTop = 90
object grpUnitStyle: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideLeft.Control = grpChecks
AnchorSideTop.Control = grpChecks
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = grpHeapStackSize
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 78
Top = 163
Width = 137
Height = 87
Top = 171
Width = 160
Anchors = [akTop, akLeft, akBottom]
AutoSize = True
BorderSpacing.Top = 6
BorderSpacing.Top = 11
Caption = 'grpUnitStyle'
ClientHeight = 62
ClientWidth = 133
TabOrder = 2
ClientHeight = 68
ClientWidth = 156
TabOrder = 1
object chkSmartLinkUnit: TCheckBox
Left = 6
Height = 21
Top = 6
Width = 121
Width = 144
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkSmartLinkUnit'
@ -40,7 +40,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 33
Width = 121
Width = 144
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkRelocatableUnit'
@ -51,23 +51,24 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 157
Height = 160
Top = 0
Width = 160
Width = 184
AutoSize = True
Caption = 'grpChecks'
ChildSizing.TopBottomSpacing = 6
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 141
ClientWidth = 156
ClientWidth = 180
TabOrder = 0
object chkChecksIO: TCheckBox
Left = 6
Height = 21
Top = 6
Width = 144
Width = 168
BorderSpacing.Around = 6
Caption = 'chkChecksIO'
TabOrder = 0
@ -76,7 +77,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 33
Width = 144
Width = 168
BorderSpacing.Around = 6
Caption = 'chkChecksRange'
TabOrder = 1
@ -85,7 +86,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 60
Width = 144
Width = 168
BorderSpacing.Around = 6
Caption = 'chkChecksOverflow'
TabOrder = 2
@ -94,7 +95,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 87
Width = 144
Width = 168
BorderSpacing.Around = 6
Caption = 'chkChecksStack'
TabOrder = 3
@ -103,7 +104,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 114
Width = 144
Width = 168
Caption = 'chkVerifyObjMethodCall'
TabOrder = 4
end
@ -111,34 +112,34 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
object grpHeapStackSize: TGroupBox
AnchorSideLeft.Control = grpUnitStyle
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpTargetPlatform
AnchorSideTop.Control = grpChecks
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 143
Height = 78
Top = 163
Width = 458
Left = 167
Height = 87
Top = 171
Width = 434
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Left = 7
BorderSpacing.Top = 11
Caption = 'grpHeapStackSize'
ChildSizing.TopBottomSpacing = 6
ClientHeight = 62
ClientWidth = 454
TabOrder = 3
ClientHeight = 68
ClientWidth = 430
TabOrder = 2
object edtHeapSize: TEdit
AnchorSideLeft.Control = lbHeapSize
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpHeapStackSize
AnchorSideRight.Control = grpHeapStackSize
AnchorSideRight.Side = asrBottom
Left = 74
Height = 22
Left = 86
Height = 25
Top = 6
Width = 374
Width = 338
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Around = 6
@ -151,8 +152,8 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 10
Width = 56
Top = 11
Width = 68
BorderSpacing.Around = 6
Caption = 'lbHeapSize'
ParentColor = False
@ -164,10 +165,10 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpHeapStackSize
AnchorSideRight.Side = asrBottom
Left = 76
Height = 22
Top = 34
Width = 372
Left = 88
Height = 25
Top = 37
Width = 336
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Around = 6
@ -180,147 +181,39 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 38
Width = 58
Top = 42
Width = 70
BorderSpacing.Around = 6
Caption = 'lbStackSize'
ParentColor = False
end
end
object grpTargetPlatform: TGroupBox
object grpOptimizations: TGroupBox
AnchorSideLeft.Control = grpChecks
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
AnchorSideTop.Control = grpChecks
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = grpChecks
AnchorSideBottom.Side = asrBottom
Left = 166
Height = 157
Left = 191
Height = 160
Top = 0
Width = 435
Width = 410
Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 6
Caption = 'grpTargetPlatform'
ClientHeight = 141
ClientWidth = 431
TabOrder = 1
object lblTargetOS: TLabel
AnchorSideLeft.Control = grpTargetPlatform
AnchorSideTop.Control = TargetOSComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 12
Width = 60
BorderSpacing.Around = 6
Caption = 'lblTargetOS'
ParentColor = False
end
object lblTargetCPU: TLabel
AnchorSideLeft.Control = grpTargetPlatform
AnchorSideTop.Control = TargetCPUComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 44
Width = 67
BorderSpacing.Around = 6
Caption = 'lblTargetCPU'
ParentColor = False
end
object lblTargetProcessorProc: TLabel
AnchorSideLeft.Control = grpTargetPlatform
AnchorSideTop.Control = TargetProcessorProcComboBox
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 76
Width = 115
BorderSpacing.Around = 6
Caption = 'lblTargetProcessorProc'
ParentColor = False
end
object TargetOSComboBox: TComboBox
AnchorSideLeft.Control = lblTargetOS
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpTargetPlatform
AnchorSideRight.Control = grpTargetPlatform
AnchorSideRight.Side = asrBottom
Left = 78
Height = 26
Top = 6
Width = 347
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Around = 6
ItemHeight = 0
Style = csDropDownList
TabOrder = 0
end
object TargetCPUComboBox: TComboBox
AnchorSideLeft.Control = lblTargetCPU
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = TargetOSComboBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpTargetPlatform
AnchorSideRight.Side = asrBottom
Left = 85
Height = 26
Top = 38
Width = 340
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Around = 6
ItemHeight = 0
Style = csDropDownList
TabOrder = 1
end
object TargetProcessorProcComboBox: TComboBox
AnchorSideLeft.Control = lblTargetProcessorProc
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = TargetCPUComboBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpTargetPlatform
AnchorSideRight.Side = asrBottom
Left = 133
Height = 26
Top = 70
Width = 292
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Around = 6
ItemHeight = 0
Style = csDropDownList
TabOrder = 2
end
end
object grpOptimizations: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpHeapStackSize
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 276
Top = 247
Width = 601
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6
BorderSpacing.Left = 7
Caption = 'grpOptimizations'
ClientHeight = 260
ClientWidth = 597
TabOrder = 4
ClientHeight = 141
ClientWidth = 406
TabOrder = 3
object radOptLevelNone: TRadioButton
AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = grpOptimizations
Left = 6
Height = 21
Top = 6
Width = 111
Width = 130
BorderSpacing.Around = 6
Caption = 'radOptLevelNone'
Checked = True
@ -334,7 +227,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 33
Width = 91
Width = 105
BorderSpacing.Around = 6
Caption = 'radOptLevel1'
TabOrder = 1
@ -346,7 +239,7 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 60
Width = 91
Width = 105
BorderSpacing.Around = 6
Caption = 'radOptLevel2'
TabOrder = 2
@ -358,66 +251,75 @@ object CompilerCodegenOptionsFrame: TCompilerCodegenOptionsFrame
Left = 6
Height = 21
Top = 87
Width = 91
Width = 105
BorderSpacing.Around = 6
Caption = 'radOptLevel3'
TabOrder = 3
end
object chkOptVarsInReg: TCheckBox
AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom
end
object grpLinking: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpUnitStyle
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 137
Top = 269
Width = 601
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 11
Caption = 'grpLinking'
ClientHeight = 118
ClientWidth = 597
TabOrder = 4
object chkLinkSmart: TCheckBox
Left = 6
Height = 21
Top = 123
Width = 110
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
Caption = 'chkOptVarsInReg'
TabOrder = 4
end
object chkOptUncertain: TCheckBox
AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = chkOptVarsInReg
AnchorSideTop.Side = asrBottom
Left = 6
Height = 21
Top = 150
Width = 109
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
Caption = 'chkOptUncertain'
TabOrder = 5
end
object chkOptSmaller: TCheckBox
AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = chkOptUncertain
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 21
Top = 177
Width = 97
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
Caption = 'chkOptSmaller'
TabOrder = 6
end
object Bevel1: TBevel
AnchorSideLeft.Control = grpOptimizations
AnchorSideTop.Control = radOptLevel3
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpOptimizations
AnchorSideRight.Side = asrBottom
Left = 6
Height = 3
Top = 114
Top = 6
Width = 585
Anchors = [akTop, akLeft, akRight]
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkLinkSmart'
TabOrder = 0
end
object chkWin32GraphicApp: TCheckBox
Left = 6
Height = 21
Top = 33
Width = 585
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkWin32GraphicApp'
TabOrder = 1
end
object chkOptionsLinkOpt: TCheckBox
Left = 6
Height = 21
Top = 60
Width = 585
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkOptionsLinkOpt'
TabOrder = 2
end
object edtOptionsLinkOpt: TEdit
AnchorSideLeft.Control = chkOptionsLinkOpt
AnchorSideTop.Control = chkOptionsLinkOpt
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpLinking
AnchorSideRight.Side = asrBottom
Left = 25
Height = 25
Top = 87
Width = 566
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 19
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
TabOrder = 3
Text = 'edtOptionsLinkOpt'
end
end
end

View File

@ -15,36 +15,30 @@ type
{ TCompilerCodegenOptionsFrame }
TCompilerCodegenOptionsFrame = class(TAbstractIDEOptionsEditor)
Bevel1:TBevel;
chkChecksIO: TCheckBox;
chkChecksOverflow: TCheckBox;
chkChecksRange: TCheckBox;
chkChecksStack: TCheckBox;
chkOptSmaller: TCheckBox;
chkOptUncertain: TCheckBox;
chkOptVarsInReg: TCheckBox;
chkLinkSmart: TCheckBox;
chkOptionsLinkOpt: TCheckBox;
chkSmartLinkUnit: TCheckBox;
chkRelocatableUnit: TCheckBox;
chkVerifyObjMethodCall: TCheckBox;
chkWin32GraphicApp: TCheckBox;
edtHeapSize: TEdit;
edtOptionsLinkOpt: TEdit;
edtStackSize: TEdit;
grpLinking: TGroupBox;
grpChecks: TGroupBox;
grpHeapStackSize: TGroupBox;
grpOptimizations: TGroupBox;
grpUnitStyle: TGroupBox;
grpTargetPlatform: TGroupBox;
lbHeapSize: TLabel;
lbStackSize: TLabel;
lblTargetCPU: TLabel;
lblTargetOS: TLabel;
lblTargetProcessorProc: TLabel;
radOptLevel1: TRadioButton;
radOptLevel2: TRadioButton;
radOptLevel3: TRadioButton;
radOptLevelNone: TRadioButton;
TargetCPUComboBox: TComboBox;
TargetOSComboBox: TComboBox;
TargetProcessorProcComboBox: TComboBox;
private
fIsPackage: boolean;
public
@ -59,58 +53,11 @@ implementation
{$R *.lfm}
function CaptionToOS(const OS: string): string;
begin
Result:=LowerCase(OS);
end;
function CaptionToCPU(const CPU: string): string;
begin
Result:=LowerCase(CPU);
end;
function ProcessorToCaption(const Processor: string): string;
begin
if SysUtils.CompareText(Processor, '80386') = 0 then
Result := '386/486 (-Op80386)'
else if SysUtils.CompareText(Processor, 'pentium') = 0 then
Result := 'Pentium/Pentium MMX (-OpPENTIUM)'
else if SysUtils.CompareText(Processor, 'pentium2') = 0 then
Result := 'Pentium Pro/Pentium II/C6x86/K6 (-OpPENTIUM2)'
else if SysUtils.CompareText(Processor, 'pentium3') = 0 then
Result := 'Pentium III (-OpPENTIUM3)'
else if SysUtils.CompareText(Processor, 'pentium4') = 0 then
Result := 'Pentium IV (-OpPENTIUM4)'
else if SysUtils.CompareText(Processor, 'pentiumm') = 0 then
Result := 'Pentium M (-OpPENTIUMM)'
else
Result := '(' + lisDefault + ')';
end;
function CaptionToProcessor(const Caption: string): string;
begin
if System.Pos('-Op80386', Caption) > 0 then
Result := '80386'
else if System.Pos('-OpPENTIUMM', Caption) > 0 then
Result := 'pentiumm'
else if System.Pos('-OpPENTIUM4', Caption) > 0 then
Result := 'pentium4'
else if System.Pos('-OpPENTIUM3', Caption) > 0 then
Result := 'pentium3'
else if System.Pos('-OpPENTIUM2', Caption) > 0 then
Result := 'pentium2'
else if System.Pos('-OpPENTIUM', Caption) > 0 then
Result := 'pentium'
else
Result := '';
end;
{ TCompilerCodegenOptionsFrame }
function TCompilerCodegenOptionsFrame.GetTitle: string;
begin
Result := dlgCodeGeneration;
Result := dlgCompilationAndLinking;
end;
procedure TCompilerCodegenOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
@ -132,101 +79,20 @@ begin
edtHeapSize.Text := '';
edtStackSize.Text := '';
grpTargetPlatform.Caption := dlgTargetPlatform;
lblTargetOS.Caption := dlgTargetOS + ' (-T)';
with TargetOSComboBox do
begin
with Items do
begin
Add('(' + lisDefault + ')');
Add('Darwin');
Add('FreeBSD');
Add('Linux');
Add('NetBSD');
Add('OpenBSD');
Add('Solaris');
Add('Win32');
Add('Win64');
Add('WinCE');
Add('aix');
Add('amiga');
Add('android');
Add('atari');
Add('beos');
Add('embedded');
Add('emx');
Add('gba');
Add('go32v2');
Add('haiku');
Add('iphonesim');
Add('java');
Add('macos');
Add('morphos');
Add('nds');
Add('netware');
Add('netwlibc');
Add('os2');
Add('palmos');
Add('qnx');
Add('symbian');
Add('watcom');
Add('wdosx');
end;
ItemIndex := 0;
end;
lblTargetCPU.Caption := dlgTargetCPUFamily + ' (-P)';
with TargetCPUComboBox do
begin
with Items do
begin
Add('(' + lisDefault + ')');
Add('arm');
Add('i386');
Add('m68k');
Add('powerpc');
Add('sparc');
Add('x86_64');
Add('mipsel');
Add('mips');
Add('jvm');
end;
ItemIndex := 0;
end;
lblTargetProcessorProc.Caption := dlgTargetProc;
with TargetProcessorProcComboBox do
begin
with Items do
begin
Clear;
Add(ProcessorToCaption(''));
Add(ProcessorToCaption('80386'));
Add(ProcessorToCaption('Pentium'));
Add(ProcessorToCaption('Pentium2'));
Add(ProcessorToCaption('Pentium3'));
Add(ProcessorToCaption('Pentium4'));
Add(ProcessorToCaption('PentiumM'));
end;
ItemIndex := 0;
end;
grpOptimizations.Caption := dlgOptimiz;
radOptLevelNone.Caption := dlgLevelNoneOpt + ' (none)';
grpOptimizations.Caption := dlgOptimizationLevels;
radOptLevelNone.Caption := dlgLevelNoneOpt;
radOptLevel1.Caption := dlgLevel1Opt + ' (-O1)';
radOptLevel2.Caption := dlgLevel2Opt + ' (-O2)';
radOptLevel3.Caption := dlgLevel3Opt + ' (-O3)';
chkOptVarsInReg.Caption := dlgCOKeepVarsReg + ' (-OoREGVAR)';
chkOptUncertain.Caption := dlgUncertOpt + ' (-OoUNCERTAIN)';
chkOptSmaller.Caption := lisSmallerRatherThanFaster + ' (-Os)';
grpLinking.Caption := dlgCOLinking;
chkLinkSmart.Caption := dlgLinkSmart + ' (-XX)';
chkWin32GraphicApp.Caption := dlgWin32GUIApp + ' (-WG)';
chkOptionsLinkOpt.Caption := dlgPassOptsLinker;
edtOptionsLinkOpt.Text := '';
end;
procedure TCompilerCodegenOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
var
i: longint;
begin
fIsPackage:=AOptions is TPkgCompilerOptions;
with AOptions as TBaseCompilerOptions do
@ -244,32 +110,9 @@ begin
edtHeapSize.Text := IntToStr(HeapSize);
edtStackSize.Text := IntToStr(StackSize);
if fIsPackage then begin
grpTargetPlatform.Visible:=false;
TargetOSComboBox.ItemIndex := 0;
TargetOSComboBox.Text := 'default';
TargetCPUComboBox.ItemIndex := 0;
TargetCPUComboBox.Text := 'default';
TargetProcessorProcComboBox.Text := 'default';
end else begin
grpTargetPlatform.Visible:=true;
i := TargetOSComboBox.Items.IndexOf(TargetOS);
if i < 0 then
i := 0; // 0 is default
TargetOSComboBox.ItemIndex := i;
TargetOSComboBox.Text := TargetOS;
i := TargetCPUComboBox.Items.IndexOf(TargetCPU);
if i < 0 then
i := 0; // 0 is default
TargetCPUComboBox.ItemIndex := i;
TargetCPUComboBox.Text := TargetCPU;
TargetProcessorProcComboBox.Text := ProcessorToCaption(TargetProcessor);
end;
chkOptVarsInReg.Checked := VariablesInRegisters;
chkOptUncertain.Checked := UncertainOptimizations;
chkOptSmaller.Checked := SmallerCode;
//chkOptVarsInReg.Checked := VariablesInRegisters;
//chkOptUncertain.Checked := UncertainOptimizations;
//chkOptSmaller.Checked := SmallerCode;
case OptimizationLevel of
1: radOptLevel1.Checked := True;
@ -278,14 +121,20 @@ begin
else
radOptLevelNone.Checked := True;
end;
grpLinking.Enabled := NeedsLinkerOpts;
chkLinkSmart.Checked := LinkSmart;
//chkLinkSmart.Enabled := NeedsLinkerOpts;
chkWin32GraphicApp.Checked := Win32GraphicApp;
//chkWin32GraphicApp.Enabled := NeedsLinkerOpts;
chkOptionsLinkOpt.Checked := PassLinkerOptions;
edtOptionsLinkOpt.Text := LinkerOptions;
//chkOptionsLinkOpt.Enabled := NeedsLinkerOpts;
end;
end;
procedure TCompilerCodegenOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
var
hs, code: integer;
NewTargetOS: string;
NewTargetCPU: string;
begin
with AOptions as TBaseCompilerOptions do
begin
@ -310,24 +159,9 @@ begin
else
StackSize := hs;
if not fIsPackage then
begin
NewTargetOS := TargetOSComboBox.Text;
if TargetOSComboBox.Items.IndexOf(NewTargetOS) <= 0 then
NewTargetOS := '';
TargetOS := CaptionToOS(NewTargetOS);
NewTargetCPU := TargetCPUComboBox.Text;
if TargetCPUComboBox.Items.IndexOf(NewTargetCPU) <= 0 then
NewTargetCPU := '';
TargetCPU := CaptionToCPU(NewTargetCPU);
TargetProcessor := CaptionToProcessor(TargetProcessorProcComboBox.Text);
end;
VariablesInRegisters := chkOptVarsInReg.Checked;
UncertainOptimizations := chkOptUncertain.Checked;
SmallerCode := chkOptSmaller.Checked;
//VariablesInRegisters := chkOptVarsInReg.Checked;
//UncertainOptimizations := chkOptUncertain.Checked;
//SmallerCode := chkOptSmaller.Checked;
if (radOptLevel1.Checked) then
OptimizationLevel := 1
@ -339,6 +173,11 @@ begin
OptimizationLevel := 3
else
OptimizationLevel := 0;
Win32GraphicApp := chkWin32GraphicApp.Checked;
LinkSmart := chkLinkSmart.Checked;
PassLinkerOptions := chkOptionsLinkOpt.Checked;
LinkerOptions := edtOptionsLinkOpt.Text;
end;
end;

View File

@ -14,7 +14,7 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
Left = 0
Height = 21
Top = 0
Width = 117
Width = 139
Caption = 'chkCreateMakefile'
TabOrder = 0
end
@ -25,14 +25,14 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 104
Top = 220
Height = 110
Top = 232
Width = 599
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'ExecuteAfterGroupBox'
ClientHeight = 88
ClientHeight = 91
ClientWidth = 595
TabOrder = 3
object lblRunIfExecAfter: TLabel
@ -41,7 +41,7 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
Left = 6
Height = 15
Top = 6
Width = 88
Width = 103
BorderSpacing.Around = 6
Caption = 'lblRunIfExecAfter'
ParentColor = False
@ -52,8 +52,8 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 37
Width = 143
Top = 38
Width = 175
BorderSpacing.Around = 6
Caption = 'ExecuteAfterCommandLabel'
ParentColor = False
@ -62,10 +62,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = lblRunIfExecAfter
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 124
Left = 139
Height = 21
Top = 6
Width = 129
Width = 154
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecAfterCompile'
@ -75,10 +75,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecAfterCompile
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 283
Left = 323
Height = 21
Top = 6
Width = 114
Width = 135
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecAfterBuild'
@ -88,10 +88,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecAfterBuild
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterGroupBox
Left = 427
Left = 488
Height = 21
Top = 6
Width = 108
Width = 128
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecAfterRun'
@ -104,10 +104,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ExecuteAfterGroupBox
AnchorSideRight.Side = asrBottom
Left = 167
Height = 22
Left = 199
Height = 25
Top = 33
Width = 422
Width = 390
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Around = 6
@ -119,10 +119,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterCommandEdit
AnchorSideTop.Side = asrBottom
Left = 347
Left = 414
Height = 21
Top = 61
Width = 181
Top = 64
Width = 218
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteAfterScanFPCCheckBox'
@ -133,10 +133,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterCommandEdit
AnchorSideTop.Side = asrBottom
Left = 129
Left = 156
Height = 21
Top = 61
Width = 188
Top = 64
Width = 228
BorderSpacing.Around = 6
Caption = 'ExecuteAfterScanMakeCheckBox'
TabOrder = 4
@ -146,10 +146,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteAfterCommandEdit
AnchorSideTop.Side = asrBottom
Left = 558
Left = 662
Height = 21
Top = 61
Width = 178
Top = 64
Width = 211
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteAfterShowAllCheckBox'
@ -161,8 +161,8 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 64
Width = 117
Top = 67
Width = 144
BorderSpacing.Left = 6
Caption = 'ExecuteAfterScanLabel'
ParentColor = False
@ -175,14 +175,14 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 77
Top = 137
Height = 83
Top = 143
Width = 599
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'grpCompiler'
ClientHeight = 61
ClientHeight = 64
ClientWidth = 595
TabOrder = 2
object lblRunIfCompiler: TLabel
@ -191,7 +191,7 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
Left = 6
Height = 15
Top = 6
Width = 83
Width = 98
BorderSpacing.Around = 6
Caption = 'lblRunIfCompiler'
ParentColor = False
@ -202,8 +202,8 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 37
Width = 57
Top = 38
Width = 68
BorderSpacing.Around = 6
Caption = 'lblCompiler'
ParentColor = False
@ -212,10 +212,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = lblRunIfCompiler
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpCompiler
Left = 119
Left = 134
Height = 21
Top = 6
Width = 124
Width = 149
BorderSpacing.Left = 30
BorderSpacing.Top = 6
Caption = 'chkCompilerCompile'
@ -225,10 +225,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkCompilerCompile
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpCompiler
Left = 273
Left = 313
Height = 21
Top = 6
Width = 109
Width = 130
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkCompilerBuild'
@ -238,10 +238,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkCompilerBuild
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpCompiler
Left = 412
Left = 473
Height = 21
Top = 6
Width = 103
Width = 123
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkCompilerRun'
@ -254,10 +254,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpCompiler
AnchorSideRight.Side = asrBottom
Left = 81
Height = 22
Left = 92
Height = 25
Top = 33
Width = 508
Width = 497
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Around = 6
@ -272,14 +272,14 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 104
Height = 110
Top = 27
Width = 599
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'ExecuteBeforeGroupBox'
ClientHeight = 88
ClientHeight = 91
ClientWidth = 595
TabOrder = 1
object lblRunIfExecBefore: TLabel
@ -288,7 +288,7 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
Left = 6
Height = 15
Top = 6
Width = 95
Width = 114
BorderSpacing.Around = 6
Caption = 'lblRunIfExecBefore'
ParentColor = False
@ -299,8 +299,8 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 37
Width = 150
Top = 38
Width = 186
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeCommandLabel'
ParentColor = False
@ -309,10 +309,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = lblRunIfExecBefore
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 131
Left = 150
Height = 21
Top = 6
Width = 136
Width = 165
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecBeforeCompile'
@ -322,10 +322,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecBeforeCompile
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 297
Left = 345
Height = 21
Top = 6
Width = 121
Width = 146
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecBeforeBuild'
@ -335,10 +335,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Control = chkExecBeforeBuild
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeGroupBox
Left = 448
Left = 521
Height = 21
Top = 6
Width = 115
Width = 139
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'chkExecBeforeRun'
@ -351,10 +351,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ExecuteBeforeGroupBox
AnchorSideRight.Side = asrBottom
Left = 174
Height = 22
Left = 210
Height = 25
Top = 33
Width = 415
Width = 379
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Around = 6
@ -366,10 +366,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeCommandEdit
AnchorSideTop.Side = asrBottom
Left = 361
Left = 436
Height = 21
Top = 61
Width = 188
Top = 64
Width = 229
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeScanFPCCheckBox'
@ -380,10 +380,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeCommandEdit
AnchorSideTop.Side = asrBottom
Left = 136
Left = 167
Height = 21
Top = 61
Width = 195
Top = 64
Width = 239
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeScanMakeCheckBox'
TabOrder = 4
@ -393,10 +393,10 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ExecuteBeforeCommandEdit
AnchorSideTop.Side = asrBottom
Left = 579
Left = 695
Height = 21
Top = 61
Width = 185
Top = 64
Width = 222
BorderSpacing.Left = 24
BorderSpacing.Around = 6
Caption = 'ExecuteBeforeShowAllCheckBox'
@ -408,8 +408,8 @@ object CompilerCompilationOptionsFrame: TCompilerCompilationOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 64
Width = 124
Top = 67
Width = 155
BorderSpacing.Left = 6
Caption = 'ExecuteBeforeScanLabel'
ParentColor = False

View File

@ -61,11 +61,10 @@ implementation
function TCompilerCompilationOptionsFrame.GetTitle: string;
begin
Result := dlgCOCompilation;
Result := dlgCOCompilerCommands;
end;
procedure TCompilerCompilationOptionsFrame.Setup(
ADialog: TAbstractOptionsEditorDialog);
procedure TCompilerCompilationOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
chkCreateMakefile.Caption := dlgCOCreateMakefile;

View File

@ -6,8 +6,8 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
ClientHeight = 552
ClientWidth = 701
TabOrder = 0
DesignLeft = 346
DesignTop = 181
DesignLeft = 394
DesignTop = 135
object chkDebugGDB: TCheckBox
Left = 6
Height = 21
@ -19,125 +19,31 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
OnChange = chkDebugGDBChange
TabOrder = 0
end
object grpLinkLibraries: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpDebug2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 49
Top = 283
Width = 701
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'grpLinkLibraries'
ClientHeight = 33
ClientWidth = 697
TabOrder = 3
object chkLinkSmart: TCheckBox
Left = 6
Height = 21
Top = 6
Width = 685
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkLinkSmart'
TabOrder = 0
end
end
object TargetSpecificsGrpBox: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpLinkLibraries
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 49
Top = 338
Width = 701
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'TargetSpecificsGrpBox'
ClientHeight = 33
ClientWidth = 697
TabOrder = 4
object chkWin32GraphicApp: TCheckBox
Left = 6
Height = 21
Top = 6
Width = 685
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkWin32GraphicApp'
TabOrder = 0
end
end
object grpOptions: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = TargetSpecificsGrpBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 77
Top = 393
Width = 701
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'grpOptions'
ClientHeight = 61
ClientWidth = 697
TabOrder = 5
object chkOptionsLinkOpt: TCheckBox
Left = 6
Height = 21
Top = 6
Width = 685
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkOptionsLinkOpt'
TabOrder = 0
end
object edtOptionsLinkOpt: TEdit
Left = 6
Height = 22
Top = 33
Width = 685
Align = alTop
BorderSpacing.Around = 6
TabOrder = 1
Text = 'edtOptionsLinkOpt'
end
end
object grpDebugging: TGroupBox
object grpInfoForGDB: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = chkDebugGDB
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 135
Height = 137
Top = 33
Width = 701
Anchors = [akTop, akLeft, akRight]
AutoSize = True
Caption = 'grpDebugging'
ClientHeight = 119
Caption = 'grpInfoForGDB'
ClientHeight = 118
ClientWidth = 697
TabOrder = 1
object chkUseLineInfoUnit: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideLeft.Control = grpInfoForGDB
AnchorSideTop.Control = dropDbgSymbolType
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Control = grpInfoForGDB
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
Top = 38
Top = 37
Width = 685
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
@ -145,14 +51,14 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
TabOrder = 1
end
object chkUseValgrind: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideLeft.Control = grpInfoForGDB
AnchorSideTop.Control = chkUseLineInfoUnit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Control = grpInfoForGDB
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
Top = 65
Top = 64
Width = 685
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
@ -160,14 +66,14 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
TabOrder = 2
end
object chkUseExternalDbgSyms: TCheckBox
AnchorSideLeft.Control = grpDebugging
AnchorSideLeft.Control = grpInfoForGDB
AnchorSideTop.Control = chkUseValgrind
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Control = grpInfoForGDB
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
Top = 92
Top = 91
Width = 685
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
@ -178,12 +84,12 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
AnchorSideLeft.Control = lblDbgSymbolType
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblEmpty
AnchorSideRight.Control = grpDebugging
AnchorSideRight.Control = grpInfoForGDB
AnchorSideRight.Side = asrBottom
Left = 102
Height = 26
Left = 122
Height = 25
Top = 6
Width = 589
Width = 569
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 0
@ -191,13 +97,13 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
TabOrder = 0
end
object lblDbgSymbolType: TLabel
AnchorSideLeft.Control = grpDebugging
AnchorSideLeft.Control = grpInfoForGDB
AnchorSideTop.Control = dropDbgSymbolType
AnchorSideTop.Side = asrCenter
Left = 6
Height = 15
Top = 12
Width = 90
Top = 11
Width = 110
BorderSpacing.Around = 6
Caption = 'lblDbgSymbolType'
ParentColor = False
@ -211,20 +117,20 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
ParentColor = False
end
end
object grpDebug2: TGroupBox
object grpOtherDebuggingInfo: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpDebugging
AnchorSideTop.Control = grpInfoForGDB
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 103
Top = 174
Height = 106
Top = 175
Width = 701
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
Caption = 'grpDebug2'
BorderSpacing.Top = 5
Caption = 'grpOtherDebuggingInfo'
ClientHeight = 87
ClientWidth = 697
TabOrder = 2
@ -241,7 +147,7 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
object chkGenGProfCode: TCheckBox
AnchorSideTop.Control = chkUseHeaptrc
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebug2
AnchorSideRight.Control = grpOtherDebuggingInfo
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
@ -255,7 +161,7 @@ object CompilerLinkingOptionsFrame: TCompilerLinkingOptionsFrame
object chkSymbolsStrip: TCheckBox
AnchorSideTop.Control = chkGenGProfCode
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grpDebug2
AnchorSideRight.Control = grpOtherDebuggingInfo
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21

View File

@ -15,23 +15,16 @@ type
TCompilerLinkingOptionsFrame = class(TAbstractIDEOptionsEditor)
chkDebugGDB: TCheckBox;
chkGenGProfCode: TCheckBox;
chkLinkSmart: TCheckBox;
chkOptionsLinkOpt: TCheckBox;
chkSymbolsStrip: TCheckBox;
chkUseExternalDbgSyms: TCheckBox;
chkUseHeaptrc: TCheckBox;
chkUseLineInfoUnit: TCheckBox;
chkUseValgrind: TCheckBox;
chkWin32GraphicApp: TCheckBox;
dropDbgSymbolType: TComboBox;
edtOptionsLinkOpt: TEdit;
grpDebug2: TGroupBox;
grpDebugging: TGroupBox;
grpLinkLibraries: TGroupBox;
grpOptions: TGroupBox;
grpOtherDebuggingInfo: TGroupBox;
grpInfoForGDB: TGroupBox;
lblEmpty: TLabel;
lblDbgSymbolType: TLabel;
TargetSpecificsGrpBox: TGroupBox;
procedure chkDebugGDBChange(Sender: TObject);
public
function GetTitle: string; override;
@ -78,24 +71,19 @@ end;
procedure TCompilerLinkingOptionsFrame.chkDebugGDBChange(Sender: TObject);
begin
grpDebugging.Enabled := chkDebugGDB.Checked;
grpInfoForGDB.Enabled := chkDebugGDB.Checked;
end;
function TCompilerLinkingOptionsFrame.GetTitle: string;
begin
Result := dlgCOLinking;
Result := dlgCODebugging;
end;
procedure TCompilerLinkingOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
// Setup the Linking Tab
with grpDebugging do
begin
AutoSize := True;
Caption := dlgCODebugging;
end;
grpDebug2.Caption := dlgCODebugging2;
grpInfoForGDB.Caption := dlgCOInfoForGDB;
grpOtherDebuggingInfo.Caption := dlgCOOtherDebuggingInfo;
chkDebugGDB.Caption := dlgCOGDB;
lblDbgSymbolType.Caption := dlgCOSymbolType;
@ -112,16 +100,6 @@ begin
chkGenGProfCode.Caption := dlgGPROF + ' (-pg)';
chkSymbolsStrip.Caption := dlgCOStrip + ' (-Xs)';
chkUseExternalDbgSyms.Caption := dlgExtSymb + ' (-Xg)';
grpLinkLibraries.Caption := dlgLinkLibraries;
chkLinkSmart.Caption := dlgLinkSmart + ' (-XX)';
TargetSpecificsGrpBox.Caption := lisCOTargetOSSpecificOptions;
chkWin32GraphicApp.Caption := dlgWin32GUIApp + ' (-WG)';
grpOptions.Caption := dlgCOOpts + ' (-k)';
chkOptionsLinkOpt.Caption := dlgPassOptsLinker;
edtOptionsLinkOpt.Text := '';
end;
procedure TCompilerLinkingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
@ -137,18 +115,8 @@ begin
chkSymbolsStrip.Checked := StripSymbols;
chkSymbolsStrip.Enabled := NeedsLinkerOpts;
chkUseExternalDbgSyms.Checked := UseExternalDbgSyms;
chkLinkSmart.Checked := LinkSmart;
grpLinkLibraries.Enabled := NeedsLinkerOpts;
chkOptionsLinkOpt.Checked := PassLinkerOptions;
edtOptionsLinkOpt.Text := LinkerOptions;
chkWin32GraphicApp.Checked := Win32GraphicApp;
chkWin32GraphicApp.Enabled := NeedsLinkerOpts;
grpOptions.Enabled := NeedsLinkerOpts;
end;
grpDebugging.Enabled := chkDebugGDB.Checked;
grpInfoForGDB.Enabled := chkDebugGDB.Checked;
end;
procedure TCompilerLinkingOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
@ -163,11 +131,6 @@ begin
GenGProfCode := chkGenGProfCode.Checked;
StripSymbols := chkSymbolsStrip.Checked;
UseExternalDbgSyms := chkUseExternalDbgSyms.Checked;
PassLinkerOptions := chkOptionsLinkOpt.Checked;
LinkerOptions := edtOptionsLinkOpt.Text;
Win32GraphicApp := chkWin32GraphicApp.Checked;
LinkSmart := chkLinkSmart.Checked;
end;
end;

View File

@ -8,63 +8,20 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
TabOrder = 0
DesignLeft = 434
DesignTop = 276
object grpConfigFile: TGroupBox
Left = 0
Height = 114
Top = 0
Width = 594
Align = alTop
AutoSize = True
Caption = 'grpConfigFile'
ClientHeight = 97
ClientWidth = 590
TabOrder = 0
object chkConfigFile: TCheckBox
Left = 6
Height = 24
Top = 6
Width = 578
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkConfigFile'
TabOrder = 0
end
object chkCustomConfigFile: TCheckBox
Left = 6
Height = 24
Top = 36
Width = 578
Align = alTop
BorderSpacing.Around = 6
Caption = 'chkCustomConfigFile'
OnClick = chkCustomConfigFileClick
TabOrder = 1
end
object edtConfigPath: TEdit
Left = 6
Height = 25
Top = 66
Width = 578
Align = alTop
BorderSpacing.Around = 6
TabOrder = 2
Text = 'edtConfigPath'
end
end
object grpCustomOptions: TGroupBox
Left = 0
Height = 170
Top = 120
Height = 77
Top = 158
Width = 594
Align = alTop
Align = alBottom
BorderSpacing.Top = 6
Caption = 'grpCustomOptions'
ClientHeight = 153
ClientHeight = 58
ClientWidth = 590
TabOrder = 1
TabOrder = 0
object memCustomOptions: TMemo
Left = 6
Height = 141
Height = 46
Top = 6
Width = 578
Align = alClient
@ -76,17 +33,18 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
end
object ConditionalsGroupBox: TGroupBox
Left = 0
Height = 151
Top = 295
Height = 206
Top = 240
Width = 594
Align = alClient
Align = alBottom
Anchors = [akTop, akLeft, akRight]
Caption = 'ConditionalsGroupBox'
ClientHeight = 134
ClientHeight = 187
ClientWidth = 590
TabOrder = 2
TabOrder = 1
inline CondSynEdit: TSynEdit
Left = 0
Height = 115
Height = 167
Top = 0
Width = 590
Align = alClient
@ -725,8 +683,8 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
end
object CondStatusbar: TStatusBar
Left = 0
Height = 19
Top = 115
Height = 20
Top = 167
Width = 590
Panels = <
item
@ -745,9 +703,28 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
Cursor = crVSplit
Left = 0
Height = 5
Top = 290
Top = 235
Width = 594
Align = alTop
ResizeAnchor = akTop
Align = alBottom
ResizeAnchor = akBottom
end
object AllOptionsScrollBox: TScrollBox
Left = 0
Height = 147
Top = 0
Width = 594
HorzScrollBar.Page = 590
VertScrollBar.Page = 143
Align = alClient
TabOrder = 3
end
object CustomSplitter: TSplitter
Cursor = crVSplit
Left = 0
Height = 5
Top = 147
Width = 594
Align = alBottom
ResizeAnchor = akBottom
end
end

View File

@ -44,17 +44,14 @@ type
{ TCompilerOtherOptionsFrame }
TCompilerOtherOptionsFrame = class(TAbstractIDEOptionsEditor)
chkConfigFile: TCheckBox;
chkCustomConfigFile: TCheckBox;
ConditionalsSplitter: TSplitter;
edtConfigPath: TEdit;
grpConfigFile: TGroupBox;
grpCustomOptions: TGroupBox;
memCustomOptions: TMemo;
ConditionalsGroupBox: TGroupBox;
CondStatusbar: TStatusBar;
CondSynEdit: TSynEdit;
procedure chkCustomConfigFileClick(Sender: TObject);
AllOptionsScrollBox: TScrollBox;
CustomSplitter: TSplitter;
procedure CondSynEditChange(Sender: TObject);
procedure CondSynEditKeyPress(Sender: TObject; var Key: char);
procedure CondSynEditProcessUserCommand(Sender: TObject;
@ -116,11 +113,6 @@ implementation
{ TCompilerOtherOptionsFrame }
procedure TCompilerOtherOptionsFrame.chkCustomConfigFileClick(Sender: TObject);
begin
edtConfigPath.Enabled := chkCustomConfigFile.Checked;
end;
procedure TCompilerOtherOptionsFrame.CondSynEditChange(Sender: TObject);
begin
UpdateStatusBar;
@ -614,40 +606,7 @@ begin
end;
function TCompilerOtherOptionsFrame.Check: Boolean;
var
NewDontUseConfigFile: Boolean;
NewCustomConfigFile: Boolean;
NewConfigFilePath: String;
AdditionalConfig: String;
begin
//debugln(['TCompilerOtherOptionsFrame.ReadSettings ',dbgs(Pointer(FCompOptions)),' ',FCompOptions=Project1.CompilerOptions]);
NewDontUseConfigFile := not chkConfigFile.Checked;
NewCustomConfigFile := chkCustomConfigFile.Checked;
NewConfigFilePath := edtConfigPath.Text;
if ((NewDontUseConfigFile <> CompOptions.DontUseConfigFile) or
(NewCustomConfigFile <> CompOptions.CustomConfigFile) or
(NewConfigFilePath <> CompOptions.ConfigFilePath)) and (not NewDontUseConfigFile) and
NewCustomConfigFile then
begin
// config file options changed
// and both additional and standard config files are used
AdditionalConfig := ExtractFilename(edtConfigPath.Text);
if (CompareFileNames(AdditionalConfig, 'fpc.cfg') = 0) or
(CompareFileNames(AdditionalConfig, 'ppc386.cfg') = 0) then
begin
if IDEMessageDialog(lisCOAmbiguousAdditionalCompilerConfigFile,
Format(lisCOClickOKIfAreSureToDoThat,
[BreakString(lisCOWarningTheAdditionalCompilerConfigFileHasTheSameNa,
60, 0), LineEnding+LineEnding]), mtWarning, [mbOK, mbCancel]) <> mrOk then
begin
Result := False;
exit;
end;
end;
end;
Result := True;
end;
@ -658,10 +617,6 @@ end;
procedure TCompilerOtherOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
grpConfigFile.Caption := dlgConfigFiles;
chkConfigFile.Caption := dlgUseFpcCfg + ' (If not checked: -n)';
chkCustomConfigFile.Caption := dlgUseCustomConfig + ' (@)';
edtConfigPath.Text := '';
grpCustomOptions.Caption := lisCustomOptions2;
memCustomOptions.Hint:=lisCustomOptHint;
end;
@ -674,14 +629,7 @@ begin
FIsPackage:=CompOptions is TPkgCompilerOptions;
//debugln(['TCompilerOtherOptionsFrame.ReadSettings ',dbgs(Pointer(FCompOptions)),' ',FCompOptions=Project1.CompilerOptions]);
with CompOptions do
begin
chkConfigFile.Checked := not DontUseConfigFile;
chkCustomConfigFile.Checked := CustomConfigFile;
edtConfigPath.Enabled := chkCustomConfigFile.Checked;
edtConfigPath.Text := ConfigFilePath;
memCustomOptions.Text := CustomOptions;
end;
memCustomOptions.Text := CompOptions.CustomOptions;
Vars:=GetBuildMacroValues(CompOptions,false);
if Vars<>nil then
@ -705,16 +653,11 @@ var
CurOptions: TBaseCompilerOptions;
begin
//debugln(['TCompilerOtherOptionsFrame.WriteSettings ',DbgSName(AOptions)]);
CurOptions:=AOptions as TBaseCompilerOptions;
CurOptions := AOptions as TBaseCompilerOptions;
with CurOptions do
begin
DontUseConfigFile := not chkConfigFile.Checked;
CustomConfigFile := chkCustomConfigFile.Checked;
ConfigFilePath := edtConfigPath.Text;
CustomOptions := memCustomOptions.Text;
Conditionals:=CondSynEdit.Lines.Text;
Conditionals := CondSynEdit.Lines.Text;
end;
end;

View File

@ -2,52 +2,20 @@ object CompilerParsingOptionsFrame: TCompilerParsingOptionsFrame
Left = 0
Height = 410
Top = 0
Width = 580
Width = 584
ClientHeight = 410
ClientWidth = 580
ClientWidth = 584
TabOrder = 0
DesignLeft = 360
DesignTop = 210
object grpSyntaxMode: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 54
Top = 0
Width = 580
Anchors = [akTop, akLeft, akRight]
AutoSize = True
Caption = 'grpSyntaxMode'
ClientHeight = 38
ClientWidth = 576
TabOrder = 0
object cmbSyntaxMode: TComboBox
AnchorSideRight.Control = grpSyntaxMode
AnchorSideRight.Side = asrBottom
Left = 6
Height = 26
Top = 6
Width = 564
Align = alLeft
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
ItemHeight = 0
Style = csDropDownList
TabOrder = 0
end
end
object grpAsmStyle: TRadioGroup
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpSyntaxOptions
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 4
Top = 324
Width = 580
Height = 57
Top = 269
Width = 584
Anchors = [akTop, akLeft, akRight]
AutoFill = True
AutoSize = True
@ -62,21 +30,18 @@ object CompilerParsingOptionsFrame: TCompilerParsingOptionsFrame
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
Columns = 3
TabOrder = 2
TabOrder = 1
end
object grpSyntaxOptions: TCheckGroup
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpSyntaxMode
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 258
Top = 60
Width = 580
Top = 5
Width = 584
Anchors = [akTop, akLeft, akRight]
AutoFill = True
BorderSpacing.Top = 6
BorderSpacing.Top = 5
Caption = 'grpSyntaxOptions'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
@ -86,6 +51,6 @@ object CompilerParsingOptionsFrame: TCompilerParsingOptionsFrame
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
TabOrder = 1
TabOrder = 0
end
end

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, IDEOptionsIntf, Project, CompilerOptions, LinkScanner,
StdCtrls, ExtCtrls, IDEOptionsIntf, Project, CompilerOptions, //LinkScanner,
LazarusIDEStrConsts;
type
@ -14,9 +14,7 @@ type
{ TCompilerParsingOptionsFrame }
TCompilerParsingOptionsFrame = class(TAbstractIDEOptionsEditor)
cmbSyntaxMode: TComboBox;
grpAsmStyle: TRadioGroup;
grpSyntaxMode: TGroupBox;
grpSyntaxOptions: TCheckGroup;
public
function GetTitle: string; override;
@ -30,36 +28,6 @@ implementation
{$R *.lfm}
function SyntaxModeToCaption(const Mode: string): string;
begin
if SysUtils.CompareText(Mode, 'ObjFPC') = 0 then
Result := lisObjectPascalDefault + ' (-Mobjfpc)'
else if SysUtils.CompareText(Mode, 'Delphi') = 0 then
Result := lisDelphi + ' (-Mdelphi)'
else if SysUtils.CompareText(Mode, 'tp') = 0 then
Result := lisTurboPascal + ' (-Mtp)'
else if SysUtils.CompareText(Mode, 'fpc') = 0 then
Result := lisFreePascal + ' (-Mfpc)'
else if SysUtils.CompareText(Mode, 'macpas') = 0 then
Result := lisMacPascal + ' (-Mmacpas)'
else
Result := '';
end;
function CaptionToSyntaxMode(const Caption: string): string;
begin
if System.Pos('-Mdelphi', Caption) > 0 then
Result := 'Delphi'
else if System.Pos('-Mtp', Caption) > 0 then
Result := 'tp'
else if System.Pos('-Mmacpas', Caption) > 0 then
Result := 'macpas'
else if System.Pos('-Mfpc', Caption) > 0 then
Result := 'fpc'
else
Result := 'ObjFPC';
end;
{ TCompilerParsingOptionsFrame }
function TCompilerParsingOptionsFrame.GetTitle: string;
@ -68,9 +36,6 @@ begin
end;
procedure TCompilerParsingOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
var
m: TCompilerMode;
s: string;
begin
with grpAsmStyle do
begin
@ -100,17 +65,6 @@ begin
Items.Add(dlgStaticKeyword + ' (-St)');
Items.Add(dlgCOAnsiStr + ' (-Sh, {$H+})');
end;
grpSyntaxMode.Caption := lisSyntaxMode + ' (-M, {$MODE})';
cmbSyntaxMode.Items.BeginUpdate;
cmbSyntaxMode.Items.Clear;
for m := Low(TCompilerMode) to High(TCompilerMode) do
begin
s := SyntaxModeToCaption(CompilerModeNames[m]);
if s <> '' then
cmbSyntaxMode.Items.Add(s);
end;
cmbSyntaxMode.Items.EndUpdate;
end;
procedure TCompilerParsingOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
@ -133,8 +87,6 @@ begin
Checked[6] := StaticKeyword;
Checked[7] := UseAnsiStrings;
end;
cmbSyntaxMode.Text := SyntaxModeToCaption(SyntaxMode);
end;
end;
@ -155,8 +107,6 @@ begin
StaticKeyword := Checked[6];
UseAnsiStrings := Checked[7];
end;
SyntaxMode := CaptionToSyntaxMode(cmbSyntaxMode.Text);
end;
end;

View File

@ -66,7 +66,7 @@
<PackageName Value="SynEdit"/>
</Item7>
</RequiredPackages>
<Units Count="101">
<Units Count="102">
<Unit0>
<Filename Value="lazarus.pp"/>
<IsPartOfProject Value="True"/>
@ -490,6 +490,7 @@
<Filename Value="frames/compiler_parsing_options.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CompilerParsingOptionsFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="compiler_parsing_options"/>
</Unit60>
@ -497,6 +498,7 @@
<Filename Value="frames/compiler_codegen_options.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CompilerCodegenOptionsFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="compiler_codegen_options"/>
</Unit61>
@ -504,6 +506,7 @@
<Filename Value="frames/compiler_linking_options.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CompilerLinkingOptionsFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="compiler_linking_options"/>
</Unit62>
@ -533,6 +536,7 @@
<Filename Value="frames/compiler_compilation_options.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CompilerCompilationOptionsFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="compiler_compilation_options"/>
</Unit66>
@ -765,6 +769,14 @@
<ResourceBaseClass Value="Frame"/>
<UnitName Value="Compiler_ModeMatrix"/>
</Unit100>
<Unit101>
<Filename Value="frames/compiler_config_target.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CompilerConfigTargetFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="compiler_config_target"/>
</Unit101>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -1985,21 +1985,23 @@ resourcestring
lisErrorInTheDebuggerPathAddition = 'Error in the "Debugger path addition":';
lisIWonderHowYouDidThatErrorInThe = 'I wonder how you did that. Error in the %s:';
lisValue3 = 'Value: ';
dlgConfigAndTarget = 'Config and Target';
dlgCOParsing = 'Parsing';
dlgCodeGeneration = 'Code Generation';
dlgCompilationAndLinking = 'Compilation and Linking';
dlgCOLinking = 'Linking';
dlgCODebugging = 'Debugging';
dlgCOVerbosity = 'Verbosity';
dlgCOCfgCmpMessages = 'Messages';
lisChooseAnFPCMessageFile = 'Choose an FPC message file';
lisFPCMessageFile = 'FPC message file';
dlgCOOther = 'Other';
dlgCOInherited = 'Inherited';
dlgCOCompilation = 'Compilation';
dlgCOCompilerCommands = 'Compiler Commands';
lisBrowseForCompiler = 'Browse for Compiler (%s)';
lisUnitOutputDirectory = 'Unit Output directory';
lisSelectANode = 'Select a node';
dlgShowCompilerOptions = 'Show compiler options';
dlgCOOpts = 'Options: ';
//dlgCOOpts = 'Options: ';
dlgCOAsmStyle = 'Assembler style:';
lisNoCompilerOptionsInherited = 'No compiler options inherited.';
lisExcludedAtRunTime = '%s excluded at run time';
@ -2038,17 +2040,18 @@ resourcestring
dlgCOSmaller = 'Smaller code';
dlgTargetProc = 'Target processor';
dlgTargetPlatform = 'Target platform';
dlgOptimiz = 'Optimizations';
dlgCOKeepVarsReg = 'Keep certain variables in registers';
dlgUncertOpt = 'Uncertain optimizations';
dlgLevelNoneOpt = 'Level 0 (no extra optimizations)';
dlgLevel1Opt = 'Level 1 (quick and debugger friendly)';
dlgLevel2Opt = 'Level 2 (Level 1 + quick optimizations)';
dlgLevel3Opt = 'Level 3 (Level 2 + slow optimizations)';
dlgOptimizationLevels = 'Optimization levels';
//dlgCOKeepVarsReg = 'Keep certain variables in registers';
//dlgUncertOpt = 'Uncertain optimizations';
//lisSmallerRatherThanFaster = 'smaller rather than faster';
dlgLevelNoneOpt = '0 (no optimization)';
dlgLevel1Opt = '1 (quick, debugger friendly)';
dlgLevel2Opt = '2 (quick optimizations)';
dlgLevel3Opt = '3 (slow optimizations)';
dlgTargetOS = 'Target OS';
dlgTargetCPUFamily = 'Target CPU family';
dlgCODebugging = 'Debugging info';
dlgCODebugging2 = 'Debugging';
dlgCOInfoForGDB = 'Info for GDB';
dlgCOOtherDebuggingInfo = 'Other debugging info';
dlgCOGDB = 'Generate debugging info for GDB (slower / increases exe-size)';
dlgCOSymbolType = 'Choose type of debug info';
dlgCOSymbolTypeAuto = 'Automatic';
@ -2063,10 +2066,10 @@ resourcestring
dlgGPROF = 'Generate code for gprof';
dlgCOStrip = 'Strip symbols from executable';
dlgExtSymb = 'Use external gdb debug symbols file';
dlgLinkLibraries = 'Link style';
//dlgLinkLibraries = 'Link style';
dlgLinkSmart = 'Link smart';
dlgPassOptsLinker = 'Pass options to linker (delimiter is space)';
lisCOTargetOSSpecificOptions = 'Target OS specific options';
dlgPassOptsLinker = 'Pass options to linker with "-k", delimiter is space';
//lisCOTargetOSSpecificOptions = 'Target OS specific options';
dlgWin32GUIApp = 'Win32 gui application';
dlgVerbosity = 'Verbosity during compilation:';
dlgCOShowErr = 'Show errors';
@ -5031,7 +5034,6 @@ resourcestring
lisTurboPascal = 'Turbo Pascal';
lisMacPascal = 'Mac Pascal';
lisFreePascal = 'Free Pascal';
lisSmallerRatherThanFaster = 'smaller rather than faster';
lisVerifyMethodCalls = 'Verify method calls';
lisToggleShowingFilenamesWithFullPathOrWithRelativePa = 'Toggle showing '
+'filenames with full path or with relative path';

View File

@ -129,10 +129,10 @@ uses
project_save_options, project_versioninfo_options, project_i18n_options,
project_misc_options,
// project compiler option frames
compiler_path_options, compiler_parsing_options, compiler_codegen_options,
compiler_linking_options, compiler_verbosity_options, compiler_messages_options,
Compiler_Other_Options, compiler_compilation_options, compiler_buildmacro_options,
Compiler_ModeMatrix,
compiler_path_options, compiler_config_target, compiler_parsing_options,
compiler_codegen_options, compiler_linking_options, compiler_verbosity_options,
compiler_messages_options, Compiler_Other_Options, compiler_compilation_options,
compiler_buildmacro_options, Compiler_ModeMatrix,
// package option frames
package_usage_options, package_description_options, package_integration_options,
package_provides_options, package_i18n_options,