mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 16:09:41 +02:00
implemented two step compiling of IDE, needed for designtime packages
git-svn-id: trunk@4291 -
This commit is contained in:
parent
793a75ec15
commit
a1157665d0
@ -37,7 +37,8 @@ type
|
|||||||
protected
|
protected
|
||||||
function GetPropertyEditorHook: TPropertyEditorHook; virtual; abstract;
|
function GetPropertyEditorHook: TPropertyEditorHook; virtual; abstract;
|
||||||
public
|
public
|
||||||
function CreateUniqueComponentName(const AClassName: string): string; virtual; abstract;
|
function CreateUniqueComponentName(const AClassName: string
|
||||||
|
): string; virtual; abstract;
|
||||||
property PropertyEditorHook: TPropertyEditorHook read GetPropertyEditorHook;
|
property PropertyEditorHook: TPropertyEditorHook read GetPropertyEditorHook;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ type
|
|||||||
TLCLPlatforms = set of TLCLPlatform;
|
TLCLPlatforms = set of TLCLPlatform;
|
||||||
|
|
||||||
TBuildLazarusFlag = (
|
TBuildLazarusFlag = (
|
||||||
blfWithoutIDE,
|
blfWithoutLinkingIDE,
|
||||||
blfOnlyIDE,
|
blfOnlyIDE,
|
||||||
blfQuick,
|
blfQuick,
|
||||||
blfWithStaticPackages,
|
blfWithStaticPackages,
|
||||||
@ -321,8 +321,6 @@ begin
|
|||||||
CurMakeMode:=mmCleanBuild
|
CurMakeMode:=mmCleanBuild
|
||||||
else
|
else
|
||||||
CurMakeMode:=mmNone;
|
CurMakeMode:=mmNone;
|
||||||
if (blfWithoutIDE in Flags) and (CurItem=Options.ItemIDE) then
|
|
||||||
CurMakeMode:=mmNone;
|
|
||||||
if (blfQuick in Flags) and (CurMakeMode=mmCleanBuild) then
|
if (blfQuick in Flags) and (CurMakeMode=mmCleanBuild) then
|
||||||
CurMakeMode:=mmBuild;
|
CurMakeMode:=mmBuild;
|
||||||
if CurMakeMode=mmNone then continue;
|
if CurMakeMode=mmNone then continue;
|
||||||
@ -371,6 +369,13 @@ function CreateBuildLazarusOptions(Options: TBuildLazarusOptions;
|
|||||||
System.Delete(Result,StartPos,p-StartPos+3);
|
System.Delete(Result,StartPos,p-StartPos+3);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure AppendExtraOption(const AddOption: string);
|
||||||
|
begin
|
||||||
|
if AddOption='' then exit;
|
||||||
|
if ExtraOptions<>'' then ExtraOptions:=ExtraOptions+' ';
|
||||||
|
ExtraOptions:=ExtraOptions+AddOption;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
CurItem: TBuildLazarusItem;
|
CurItem: TBuildLazarusItem;
|
||||||
@ -378,15 +383,6 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
CurItem:=Options.Items[ItemIndex];
|
CurItem:=Options.Items[ItemIndex];
|
||||||
// check for special IDE config file
|
|
||||||
if CurItem=Options.ItemIDE then begin
|
|
||||||
MakeIDECfgFilename:=GetMakeIDEConfigFilename;
|
|
||||||
if (blfUseMakeIDECfg in Flags) and (CurItem=Options.ItemIDE)
|
|
||||||
and (FileExists(MakeIDECfgFilename)) then begin
|
|
||||||
ExtraOptions:='@'+MakeIDECfgFilename;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// create extra options
|
// create extra options
|
||||||
ExtraOptions:=Options.ExtraOptions;
|
ExtraOptions:=Options.ExtraOptions;
|
||||||
@ -395,11 +391,20 @@ begin
|
|||||||
// remove profiler option for JIT form
|
// remove profiler option for JIT form
|
||||||
ExtraOptions:=RemoveProfilerOption(ExtraOptions);
|
ExtraOptions:=RemoveProfilerOption(ExtraOptions);
|
||||||
end else if CurItem=Options.ItemIDE then begin
|
end else if CurItem=Options.ItemIDE then begin
|
||||||
// add package options for IDE
|
// check for special IDE config file
|
||||||
if PackageOptions<>'' then begin
|
if (blfUseMakeIDECfg in Flags) then begin
|
||||||
if ExtraOptions<>'' then ExtraOptions:=ExtraOptions+' ';
|
MakeIDECfgFilename:=GetMakeIDEConfigFilename;
|
||||||
ExtraOptions:=ExtraOptions+PackageOptions;
|
if (FileExists(MakeIDECfgFilename)) then begin
|
||||||
|
ExtraOptions:='@'+MakeIDECfgFilename;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
// check if linking should be skipped
|
||||||
|
if blfWithoutLinkingIDE in Flags then begin
|
||||||
|
AppendExtraOption('-Cn');
|
||||||
|
end;
|
||||||
|
// add package options for IDE
|
||||||
|
AppendExtraOption(PackageOptions);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user