mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 10:59:14 +02:00
IDE/lazbuild: build IDE: fixed passing options twice, order: packages, profile, target
git-svn-id: trunk@48443 -
This commit is contained in:
parent
ba549190fe
commit
2dc3f24423
@ -418,6 +418,7 @@ begin
|
|||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
fProfile:=Profile;
|
fProfile:=Profile;
|
||||||
if CalcTargets(Flags)<>mrOk then exit;
|
if CalcTargets(Flags)<>mrOk then exit;
|
||||||
|
debugln(['TLazarusBuilder.MakeLazarus AAA1 ',fExtraOptions]);
|
||||||
|
|
||||||
if LazarusIDE<>nil then
|
if LazarusIDE<>nil then
|
||||||
LazarusIDE.MainBarSubTitle:=Profile.Name;
|
LazarusIDE.MainBarSubTitle:=Profile.Name;
|
||||||
@ -570,16 +571,20 @@ begin
|
|||||||
fOutputDirRedirected:=False;
|
fOutputDirRedirected:=False;
|
||||||
fUpdateRevInc:=fProfile.UpdateRevisionInc;
|
fUpdateRevInc:=fProfile.UpdateRevisionInc;
|
||||||
|
|
||||||
// create extra options
|
fExtraOptions:='';
|
||||||
fExtraOptions:=fProfile.ExtraOptions;
|
|
||||||
|
|
||||||
// check for special IDE config file
|
// check for special IDE config file
|
||||||
//DebugLn(['CreateIDEMakeOptions blfUseMakeIDECfg=',blfUseMakeIDECfg in FLags,' ExtraOptions="',fExtraOptions,'" ',fPackageOptions]);
|
//DebugLn(['CreateIDEMakeOptions blfUseMakeIDECfg=',blfUseMakeIDECfg in FLags,' ExtraOptions="',fExtraOptions,'" ',fPackageOptions]);
|
||||||
if (blfUseMakeIDECfg in Flags) then
|
if (blfUseMakeIDECfg in Flags) then
|
||||||
SpecialIdeConfig
|
begin
|
||||||
else if not (blfUseMakeIDECfg in Flags) then
|
SpecialIdeConfig;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
AppendExtraOption(fPackageOptions,false);
|
AppendExtraOption(fPackageOptions,false);
|
||||||
|
|
||||||
|
// write full file names and message ids
|
||||||
|
AppendExtraOption('-vbq');
|
||||||
|
|
||||||
{$IFDEF Windows}
|
{$IFDEF Windows}
|
||||||
if (fProfile.TargetPlatform=lpWin32)
|
if (fProfile.TargetPlatform=lpWin32)
|
||||||
and (Win32MajorVersion <=4)
|
and (Win32MajorVersion <=4)
|
||||||
@ -587,6 +592,9 @@ begin
|
|||||||
AppendExtraOption('-dWIN9XPLATFORM');
|
AppendExtraOption('-dWIN9XPLATFORM');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
AppendExtraOption(fProfile.ExtraOptions,false);
|
||||||
|
end;
|
||||||
|
|
||||||
// set target filename and target directory:
|
// set target filename and target directory:
|
||||||
// 1. the user has set a target directory
|
// 1. the user has set a target directory
|
||||||
// 2. For crosscompiling the IDE needs a different directory
|
// 2. For crosscompiling the IDE needs a different directory
|
||||||
@ -614,11 +622,6 @@ begin
|
|||||||
if fTargetCPU='' then fTargetCPU:=fCompilerTargetCPU;
|
if fTargetCPU='' then fTargetCPU:=fCompilerTargetCPU;
|
||||||
LazDir:=EnvironmentOptions.GetParsedLazarusDirectory;
|
LazDir:=EnvironmentOptions.GetParsedLazarusDirectory;
|
||||||
|
|
||||||
if fTargetOS<>fCompilerTargetOS then
|
|
||||||
AppendExtraOption('-T'+fTargetOS);
|
|
||||||
if fTargetCPU<>fCompilerTargetCPU then
|
|
||||||
AppendExtraOption('-P'+fTargetCPU);
|
|
||||||
|
|
||||||
//DebugLn(['CalcTargets NewTargetOS=',fTargetOS,' NewTargetCPU=',fTargetCPU]);
|
//DebugLn(['CalcTargets NewTargetOS=',fTargetOS,' NewTargetCPU=',fTargetCPU]);
|
||||||
if (fProfile.TargetDirectory<>'') then begin
|
if (fProfile.TargetDirectory<>'') then begin
|
||||||
// Case 1. the user has set a target directory
|
// Case 1. the user has set a target directory
|
||||||
@ -699,8 +702,13 @@ begin
|
|||||||
fOutputDirRedirected:=CompareFilenames(ChompPathDelim(LazDir),
|
fOutputDirRedirected:=CompareFilenames(ChompPathDelim(LazDir),
|
||||||
ChompPathDelim(fTargetDir))<>0;
|
ChompPathDelim(fTargetDir))<>0;
|
||||||
|
|
||||||
// write full file names and message ids
|
// append target options
|
||||||
AppendExtraOption('-vbq');
|
if not (blfUseMakeIDECfg in Flags) then
|
||||||
|
begin
|
||||||
|
if fTargetOS<>fCompilerTargetOS then
|
||||||
|
AppendExtraOption('-T'+fTargetOS);
|
||||||
|
if fTargetCPU<>fCompilerTargetCPU then
|
||||||
|
AppendExtraOption('-P'+fTargetCPU);
|
||||||
|
|
||||||
if fUnitOutDir<>'' then
|
if fUnitOutDir<>'' then
|
||||||
// FPC interpretes '\ ' as an escape for a space in a path on Windows,
|
// FPC interpretes '\ ' as an escape for a space in a path on Windows,
|
||||||
@ -719,6 +727,7 @@ begin
|
|||||||
DefaultTargetFilename:='lazarus'+GetExecutableExt(fTargetOS);
|
DefaultTargetFilename:='lazarus'+GetExecutableExt(fTargetOS);
|
||||||
if CreateRelativePath(fTargetFilename,fTargetDir) <> DefaultTargetFilename then
|
if CreateRelativePath(fTargetFilename,fTargetDir) <> DefaultTargetFilename then
|
||||||
AppendExtraOption('-o'+fTargetFilename);
|
AppendExtraOption('-o'+fTargetFilename);
|
||||||
|
end;
|
||||||
|
|
||||||
//DebugLn(['CreateIDEMakeOptions ',MMDef.Name,' ',fExtraOptions]);
|
//DebugLn(['CreateIDEMakeOptions ',MMDef.Name,' ',fExtraOptions]);
|
||||||
end;
|
end;
|
||||||
@ -907,7 +916,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
fProfile:=Profile;
|
fProfile:=Profile;
|
||||||
if CalcTargets(Flags)<>mrOk then exit;
|
if CalcTargets(Flags-[blfUseMakeIDECfg])<>mrOk then exit;
|
||||||
|
|
||||||
Result:=PrepareTargetDir(Flags);
|
Result:=PrepareTargetDir(Flags);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
|
@ -7395,7 +7395,7 @@ begin
|
|||||||
// save extra options
|
// save extra options
|
||||||
IDEBuildFlags:=Flags;
|
IDEBuildFlags:=Flags;
|
||||||
Result:=fBuilder.SaveIDEMakeOptions(BuildLazProfiles.Current,
|
Result:=fBuilder.SaveIDEMakeOptions(BuildLazProfiles.Current,
|
||||||
IDEBuildFlags-[blfUseMakeIDECfg,blfDontClean]+[blfBackupOldExe]);
|
IDEBuildFlags-[blfDontClean]+[blfBackupOldExe]);
|
||||||
if Result<>mrOk then begin
|
if Result<>mrOk then begin
|
||||||
DebugLn('TMainIDE.DoBuildLazarus: Save IDEMake options failed.');
|
DebugLn('TMainIDE.DoBuildLazarus: Save IDEMake options failed.');
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user