mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:59:11 +02:00
IDE build configs are now saved on every install/uninstall
git-svn-id: trunk@5099 -
This commit is contained in:
parent
471cc8711a
commit
da43837f6c
36
ide/main.pp
36
ide/main.pp
@ -546,6 +546,7 @@ type
|
|||||||
// external tools
|
// external tools
|
||||||
function PrepareForCompile: TModalResult; override;
|
function PrepareForCompile: TModalResult; override;
|
||||||
function DoRunExternalTool(Index: integer): TModalResult;
|
function DoRunExternalTool(Index: integer): TModalResult;
|
||||||
|
function DoSaveBuildIDEConfigs(Flags: TBuildLazarusFlags): TModalResult; override;
|
||||||
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; override;
|
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; override;
|
||||||
function DoExecuteCompilationTool(Tool: TCompilationTool;
|
function DoExecuteCompilationTool(Tool: TCompilationTool;
|
||||||
const WorkingDir, ToolTitle: string
|
const WorkingDir, ToolTitle: string
|
||||||
@ -6005,6 +6006,38 @@ begin
|
|||||||
DoCheckFilesOnDisk;
|
DoCheckFilesOnDisk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMainIDE.DoSaveBuildIDEConfigs(Flags: TBuildLazarusFlags
|
||||||
|
): TModalResult;
|
||||||
|
var
|
||||||
|
PkgOptions: string;
|
||||||
|
InheritedOptionStrings: TInheritedCompOptsStrings;
|
||||||
|
FPCVersion, FPCRelease, FPCPatch: integer;
|
||||||
|
IDEBuildFlags: TBuildLazarusFlags;
|
||||||
|
begin
|
||||||
|
// create uses section addition for lazarus.pp
|
||||||
|
Result:=PkgBoss.DoSaveAutoInstallConfig;
|
||||||
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
|
// prepare static auto install packages
|
||||||
|
PkgOptions:='';
|
||||||
|
if (blfWithStaticPackages in Flags)
|
||||||
|
or MiscellaneousOptions.BuildLazOpts.WithStaticPackages then begin
|
||||||
|
// create inherited compiler options
|
||||||
|
PkgOptions:=PkgBoss.DoGetIDEInstallPackageOptions(InheritedOptionStrings);
|
||||||
|
|
||||||
|
// check ambigious units
|
||||||
|
CodeToolBoss.GetFPCVersionForDirectory(
|
||||||
|
EnvironmentOptions.LazarusDirectory,
|
||||||
|
FPCVersion,FPCRelease,FPCPatch);
|
||||||
|
end;
|
||||||
|
|
||||||
|
// save extra options
|
||||||
|
IDEBuildFlags:=Flags+[blfOnlyIDE];
|
||||||
|
Result:=SaveIDEMakeOptions(MiscellaneousOptions.BuildLazOpts,
|
||||||
|
MacroList,PkgOptions,IDEBuildFlags);
|
||||||
|
if Result<>mrOk then exit;
|
||||||
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult;
|
function TMainIDE.DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult;
|
||||||
var
|
var
|
||||||
PkgOptions: string;
|
PkgOptions: string;
|
||||||
@ -10268,6 +10301,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.703 2004/01/24 16:09:10 mattias
|
||||||
|
IDE build configs are now saved on every install/uninstall
|
||||||
|
|
||||||
Revision 1.702 2004/01/22 15:24:17 mattias
|
Revision 1.702 2004/01/22 15:24:17 mattias
|
||||||
view multiple forms now open all designer forms
|
view multiple forms now open all designer forms
|
||||||
|
|
||||||
|
@ -410,6 +410,7 @@ type
|
|||||||
function DoImExportCompilerOptions(Sender: TObject): TModalResult; virtual; abstract;
|
function DoImExportCompilerOptions(Sender: TObject): TModalResult; virtual; abstract;
|
||||||
|
|
||||||
function PrepareForCompile: TModalResult; virtual; abstract;
|
function PrepareForCompile: TModalResult; virtual; abstract;
|
||||||
|
function DoSaveBuildIDEConfigs(Flags: TBuildLazarusFlags): TModalResult; virtual; abstract;
|
||||||
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; virtual; abstract;
|
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; virtual; abstract;
|
||||||
function DoExecuteCompilationTool(Tool: TCompilationTool;
|
function DoExecuteCompilationTool(Tool: TCompilationTool;
|
||||||
const WorkingDir, ToolTitle: string
|
const WorkingDir, ToolTitle: string
|
||||||
|
@ -2409,6 +2409,7 @@ var
|
|||||||
s: String;
|
s: String;
|
||||||
NeedSaving: Boolean;
|
NeedSaving: Boolean;
|
||||||
RequiredPackage: TLazPackage;
|
RequiredPackage: TLazPackage;
|
||||||
|
BuildIDEFlags: TBuildLazarusFlags;
|
||||||
begin
|
begin
|
||||||
PackageGraph.BeginUpdate(true);
|
PackageGraph.BeginUpdate(true);
|
||||||
PkgList:=nil;
|
PkgList:=nil;
|
||||||
@ -2443,7 +2444,8 @@ begin
|
|||||||
if RequiredPackage.AutoInstall<>pitNope then
|
if RequiredPackage.AutoInstall<>pitNope then
|
||||||
PkgList.Delete(i);
|
PkgList.Delete(i);
|
||||||
end;
|
end;
|
||||||
// now PkgList contains only the required packages that are added to the
|
|
||||||
|
// now PkgList contains only the required packages that were added to the
|
||||||
// list of installation packages
|
// list of installation packages
|
||||||
if PkgList.Count>0 then begin
|
if PkgList.Count>0 then begin
|
||||||
s:='';
|
s:='';
|
||||||
@ -2474,6 +2476,11 @@ begin
|
|||||||
if NeedSaving then
|
if NeedSaving then
|
||||||
SaveAutoInstallDependencies(true);
|
SaveAutoInstallDependencies(true);
|
||||||
|
|
||||||
|
// save IDE build configs, so user can build IDE on command line
|
||||||
|
BuildIDEFlags:=[blfWithStaticPackages,blfQuick,blfOnlyIDE];
|
||||||
|
Result:=MainIDE.DoSaveBuildIDEConfigs(BuildIDEFlags);
|
||||||
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
// ask user to rebuilt Lazarus now
|
// ask user to rebuilt Lazarus now
|
||||||
Result:=MessageDlg(lisPkgMangRebuildLazarus,
|
Result:=MessageDlg(lisPkgMangRebuildLazarus,
|
||||||
Format(lisPkgMangThePackageWasMarkedForInstallationCurrentlyLazarus, [
|
Format(lisPkgMangThePackageWasMarkedForInstallationCurrentlyLazarus, [
|
||||||
@ -2485,7 +2492,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// rebuild Lazarus
|
// rebuild Lazarus
|
||||||
Result:=MainIDE.DoBuildLazarus([blfWithStaticPackages,blfQuick,blfOnlyIDE]);
|
Result:=MainIDE.DoBuildLazarus(BuildIDEFlags);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
@ -2500,6 +2507,7 @@ var
|
|||||||
DependencyPath: TList;
|
DependencyPath: TList;
|
||||||
ParentPackage: TLazPackage;
|
ParentPackage: TLazPackage;
|
||||||
Dependency: TPkgDependency;
|
Dependency: TPkgDependency;
|
||||||
|
BuildIDEFlags: TBuildLazarusFlags;
|
||||||
begin
|
begin
|
||||||
if (APackage.Installed=pitNope) and (APackage.AutoInstall=pitNope) then exit;
|
if (APackage.Installed=pitNope) and (APackage.AutoInstall=pitNope) then exit;
|
||||||
|
|
||||||
@ -2541,6 +2549,11 @@ begin
|
|||||||
SaveAutoInstallDependencies(true);
|
SaveAutoInstallDependencies(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// save IDE build configs, so user can build IDE on command line
|
||||||
|
BuildIDEFlags:=[blfWithStaticPackages,blfQuick,blfOnlyIDE];
|
||||||
|
Result:=MainIDE.DoSaveBuildIDEConfigs(BuildIDEFlags);
|
||||||
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
// ask user to rebuilt Lazarus now
|
// ask user to rebuilt Lazarus now
|
||||||
Result:=MessageDlg(lisPkgMangRebuildLazarus,
|
Result:=MessageDlg(lisPkgMangRebuildLazarus,
|
||||||
Format(lisPkgMangThePackageWasMarkedCurrentlyLazarus, ['"',
|
Format(lisPkgMangThePackageWasMarkedCurrentlyLazarus, ['"',
|
||||||
@ -2552,7 +2565,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// rebuild Lazarus
|
// rebuild Lazarus
|
||||||
Result:=MainIDE.DoBuildLazarus([blfWithStaticPackages,blfOnlyIDE,blfQuick]);
|
Result:=MainIDE.DoBuildLazarus(BuildIDEFlags);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
@ -2692,7 +2705,7 @@ begin
|
|||||||
MainIDE.MacroList.SubstituteStr(TargetDir);
|
MainIDE.MacroList.SubstituteStr(TargetDir);
|
||||||
// ToDo write a function in lazconf for this
|
// ToDo write a function in lazconf for this
|
||||||
//if TargetDir<>'' then
|
//if TargetDir<>'' then
|
||||||
AddOption('-FE'+TargetDir);}
|
AddOption('-FE'+TargetFilename);}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPkgManager.DoPublishPackage(APackage: TLazPackage;
|
function TPkgManager.DoPublishPackage(APackage: TLazPackage;
|
||||||
|
Loading…
Reference in New Issue
Block a user