mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 04:40:54 +02:00
IDE: build IDE: allow any case for TargetOS/CPU in dialog
git-svn-id: trunk@27919 -
This commit is contained in:
parent
da5dc49510
commit
e9f5492669
@ -262,10 +262,10 @@ begin
|
||||
Tool.CmdLineParams:='cleanlaz';
|
||||
// append target OS
|
||||
if Options.TargetOS<>'' then
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.TargetOS;
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.FPCTargetOS;
|
||||
// append target CPU
|
||||
if Options.TargetCPU<>'' then
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' CPU_TARGET='+Options.TargetCPU;
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' CPU_TARGET='+Options.FPCTargetCPU;
|
||||
Result:=ExternalTools.Run(Tool,Macros);
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
@ -329,10 +329,10 @@ begin
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' -w';
|
||||
// append target OS
|
||||
if Options.TargetOS<>'' then
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.TargetOS;
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.FPCTargetOS;
|
||||
// append target CPU
|
||||
if Options.TargetCPU<>'' then
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' CPU_TARGET='+Options.TargetCPU;
|
||||
Tool.CmdLineParams:=Tool.CmdLineParams+' CPU_TARGET='+Options.FPCTargetCPU;
|
||||
// run
|
||||
Result:=ExternalTools.Run(Tool,Macros);
|
||||
if Result<>mrOk then exit;
|
||||
@ -454,8 +454,8 @@ begin
|
||||
NewTargetDirectory:='';
|
||||
DefaultTargetOS:=GetDefaultTargetOS;
|
||||
DefaultTargetCPU:=GetDefaultTargetCPU;
|
||||
NewTargetOS:=Options.TargetOS;
|
||||
NewTargetCPU:=Options.TargetCPU;
|
||||
NewTargetOS:=Options.FPCTargetOS;
|
||||
NewTargetCPU:=Options.FPCTargetCPU;
|
||||
if NewTargetOS='' then NewTargetOS:=DefaultTargetOS;
|
||||
if NewTargetCPU='' then NewTargetCPU:=DefaultTargetCPU;
|
||||
CrossCompiling:=(CompareText(NewTargetOS,DefaultTargetOS)<>0) or (CompareText(NewTargetCPU,DefaultTargetCPU)<>0);
|
||||
@ -489,8 +489,8 @@ begin
|
||||
NewTargetDirectory:=AppendPathDelim(GetPrimaryConfigPath)+'bin'
|
||||
+PathDelim+NewTargetOS+'-'+NewTargetCPU;
|
||||
Macros.SubstituteStr(NewUnitDirectory);
|
||||
debugln('CreateBuildLazarusOptions Options.TargetOS=',Options.TargetOS,' Options.TargetCPU=',
|
||||
Options.TargetCPU,' DefaultOS=',DefaultTargetOS,' DefaultCPU=',DefaultTargetCPU);
|
||||
debugln('CreateBuildLazarusOptions Options.TargetOS=',Options.FPCTargetOS,' Options.TargetCPU=',
|
||||
Options.FPCTargetCPU,' DefaultOS=',DefaultTargetOS,' DefaultCPU=',DefaultTargetCPU);
|
||||
Result:=ForceDirectoryInteractive(NewTargetDirectory,[]);
|
||||
if Result<>mrOk then exit;
|
||||
end else begin
|
||||
@ -962,7 +962,7 @@ begin
|
||||
try
|
||||
DirDialog.Options:=DirDialog.Options+[ofPathMustExist];
|
||||
DirDialog.Title:=lisLazBuildABOChooseOutputDir+'(lazarus'+
|
||||
GetExecutableExt(Profiles.Current.TargetOS)+')';
|
||||
GetExecutableExt(Profiles.Current.FPCTargetOS)+')';
|
||||
if DirDialog.Execute then begin
|
||||
AFilename:=CleanAndExpandDirectory(DirDialog.Filename);
|
||||
TargetDirectoryComboBox.AddHistoryItem(AFilename,10,true,true);
|
||||
@ -1005,9 +1005,9 @@ begin
|
||||
AProfile.UpdateRevisionInc :=UpdateRevisionIncCheckBox.Checked;
|
||||
AProfile.RestartAfterBuild :=RestartAfterBuildCheckBox.Checked;
|
||||
AProfile.ConfirmBuild :=ConfirmBuildCheckBox.Checked;
|
||||
AProfile.TargetOS :=GetFPCTargetOS(TargetOSComboBox.Text);
|
||||
AProfile.TargetOS :=TargetOSComboBox.Text;
|
||||
AProfile.TargetDirectory :=TargetDirectoryComboBox.Text;
|
||||
AProfile.TargetCPU :=GetFPCTargetCPU(TargetCPUComboBox.Text);
|
||||
AProfile.TargetCPU :=TargetCPUComboBox.Text;
|
||||
end;
|
||||
|
||||
procedure TConfigureBuildLazarusDlg.UpdateProfileNamesUI;
|
||||
|
@ -135,6 +135,8 @@ type
|
||||
procedure Assign(Source: TBuildLazarusProfile; ACopyName: Boolean=True);
|
||||
procedure Load(XMLConfig: TXMLConfig; const Path: string);
|
||||
procedure Save(XMLConfig: TXMLConfig; const Path: string);
|
||||
function FPCTargetOS: string;
|
||||
function FPCTargetCPU: string;
|
||||
public
|
||||
property Name: string read fName;
|
||||
property CleanAll: boolean read fCleanAll write fCleanAll;
|
||||
@ -385,14 +387,14 @@ procedure TBuildLazarusProfile.SetTargetCPU(const AValue: string);
|
||||
begin
|
||||
if FTargetCPU=AValue then exit;
|
||||
FTargetCPU:=AValue;
|
||||
fOwnerCnt.Globals.TargetCPU:=TargetCPU;
|
||||
fOwnerCnt.Globals.TargetCPU:=FPCTargetCPU;
|
||||
end;
|
||||
|
||||
procedure TBuildLazarusProfile.SetTargetOS(const AValue: string);
|
||||
begin
|
||||
if fTargetOS=AValue then exit;
|
||||
fTargetOS:=AValue;
|
||||
fOwnerCnt.Globals.TargetOS:=TargetOS;
|
||||
fOwnerCnt.Globals.TargetOS:=FPCTargetOS;
|
||||
end;
|
||||
|
||||
function TBuildLazarusProfile.GetTargetPlatform: TLCLPlatform;
|
||||
@ -439,8 +441,8 @@ begin
|
||||
MakeModeNames[fMakeModeDefs[i].DefaultMakeMode]));
|
||||
FCleanAll :=XMLConfig.GetValue(Path+'CleanAll/Value',false);
|
||||
FExtraOptions :=XMLConfig.GetValue(Path+'ExtraOptions/Value','');
|
||||
TargetOS :=GetFPCTargetOS(XMLConfig.GetValue(Path+'TargetOS/Value',''));
|
||||
TargetCPU :=GetFPCTargetCPU(XMLConfig.GetValue(Path+'TargetCPU/Value',''));
|
||||
TargetOS :=XMLConfig.GetValue(Path+'TargetOS/Value','');
|
||||
TargetCPU :=XMLConfig.GetValue(Path+'TargetCPU/Value','');
|
||||
LCLPlatformStr :=XMLConfig.GetValue(Path+'LCLPlatform/Value','');
|
||||
if LCLPlatformStr='' then
|
||||
fTargetPlatform :=GetDefaultLCLWidgetType
|
||||
@ -500,6 +502,16 @@ begin
|
||||
fMakeModes[i]:=Source.MakeModes[i];
|
||||
end;
|
||||
|
||||
function TBuildLazarusProfile.FPCTargetOS: string;
|
||||
begin
|
||||
Result:=GetFPCTargetOS(TargetOS);
|
||||
end;
|
||||
|
||||
function TBuildLazarusProfile.FPCTargetCPU: string;
|
||||
begin
|
||||
Result:=GetFPCTargetCPU(TargetCPU);
|
||||
end;
|
||||
|
||||
|
||||
{ TBuildLazarusProfiles }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user