diff --git a/ide/lazarus.pp b/ide/lazarus.pp index a00774393c..f02b8887fc 100644 --- a/ide/lazarus.pp +++ b/ide/lazarus.pp @@ -85,6 +85,8 @@ begin // When quick rebuilding the IDE, FPC rebuilds only the lazarus.pp, so any // flag that should work with quick build must be set here. KeepInstalledPackages:={$IFDEF BigIDE}True{$ELSE}False{$ENDIF}; + + // end of build flags LazarusRevisionStr:=RevisionStr; Application.Title:='Lazarus'; diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 8c39ad7607..fd93587eec 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -1178,6 +1178,19 @@ begin end; begin + // When quick rebuilding lazbuild, FPC rebuilds only the lazbuild.lpr, so any + // flag that should work with quick build must be set here. + + {$IFDEF BuildWidgetSetWin32} Result:=lpWin32; {$ENDIF} + {$IFDEF BuildWidgetSetWinCE} Result:=lpWinCE; {$ENDIF} + {$IFDEF BuildWidgetSetGTK} Result:=lpGtk; {$ENDIF} + {$IFDEF BuildWidgetSetGTK2} Result:=lpGtk2; {$ENDIF} + {$IFDEF BuildWidgetSetQT} Result:=lpQT; {$ENDIF} + {$IFDEF BuildWidgetSetFPGui} Result:=lpfpGUI; {$ENDIF} + {$IFDEF BuildWidgetSetCarbon} Result:=lpCarbon; {$ENDIF} + {$IFDEF BuildWidgetSetCocoa} Result:=lpCocoa; {$ENDIF} + {$IFDEF BuildWidgetSetNoGui} Result:=lpNoGUI; {$ENDIF} + // free LCL application FreeAndNil(Forms.Application); // start our own application diff --git a/ide/lazconf.pp b/ide/lazconf.pp index d934cae433..dfcb7c2582 100644 --- a/ide/lazconf.pp +++ b/ide/lazconf.pp @@ -135,6 +135,19 @@ const const ExitCodeRestartLazarus = 99; +var + // set by lazbuild.lpr and used by GetDefaultLCLWidgetType + BuildLCLWidgetType: TLCLPlatform = + {$IFDEF MSWindows}{$DEFINE WidgetSetDefined} + lpWin32; + {$ENDIF} + {$IFDEF darwin}{$DEFINE WidgetSetDefined} + lpCarbon; + {$ENDIF} + {$IFNDEF WidgetSetDefined} + lpGtk2; + {$ENDIF} + implementation {$I lazconf.inc} @@ -196,19 +209,10 @@ end; function GetDefaultLCLWidgetType: TLCLPlatform; begin - if WidgetSet<>nil then + if (WidgetSet<>nil) and (WidgetSet.LCLPlatform<>lpNoGUI) then Result:=WidgetSet.LCLPlatform - else begin - {$IFDEF MSWindows}{$DEFINE WidgetSetDefined} - Result:= lpWin32; - {$ENDIF} - {$IFDEF darwin}{$DEFINE WidgetSetDefined} - Result:= lpCarbon; - {$ENDIF} - {$IFNDEF WidgetSetDefined} - Result:= lpGtk2; - {$ENDIF} - end; + else + Result:=BuildLCLWidgetType; end; function DirNameToLCLPlatform(const ADirName: string): TLCLPlatform;