mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 22:36:17 +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
|
||||
function PrepareForCompile: TModalResult; override;
|
||||
function DoRunExternalTool(Index: integer): TModalResult;
|
||||
function DoSaveBuildIDEConfigs(Flags: TBuildLazarusFlags): TModalResult; override;
|
||||
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; override;
|
||||
function DoExecuteCompilationTool(Tool: TCompilationTool;
|
||||
const WorkingDir, ToolTitle: string
|
||||
@ -6005,6 +6006,38 @@ begin
|
||||
DoCheckFilesOnDisk;
|
||||
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;
|
||||
var
|
||||
PkgOptions: string;
|
||||
@ -10268,6 +10301,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$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
|
||||
view multiple forms now open all designer forms
|
||||
|
||||
|
@ -410,6 +410,7 @@ type
|
||||
function DoImExportCompilerOptions(Sender: TObject): TModalResult; virtual; abstract;
|
||||
|
||||
function PrepareForCompile: TModalResult; virtual; abstract;
|
||||
function DoSaveBuildIDEConfigs(Flags: TBuildLazarusFlags): TModalResult; virtual; abstract;
|
||||
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; virtual; abstract;
|
||||
function DoExecuteCompilationTool(Tool: TCompilationTool;
|
||||
const WorkingDir, ToolTitle: string
|
||||
|
@ -2409,6 +2409,7 @@ var
|
||||
s: String;
|
||||
NeedSaving: Boolean;
|
||||
RequiredPackage: TLazPackage;
|
||||
BuildIDEFlags: TBuildLazarusFlags;
|
||||
begin
|
||||
PackageGraph.BeginUpdate(true);
|
||||
PkgList:=nil;
|
||||
@ -2443,7 +2444,8 @@ begin
|
||||
if RequiredPackage.AutoInstall<>pitNope then
|
||||
PkgList.Delete(i);
|
||||
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
|
||||
if PkgList.Count>0 then begin
|
||||
s:='';
|
||||
@ -2474,6 +2476,11 @@ begin
|
||||
if NeedSaving then
|
||||
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
|
||||
Result:=MessageDlg(lisPkgMangRebuildLazarus,
|
||||
Format(lisPkgMangThePackageWasMarkedForInstallationCurrentlyLazarus, [
|
||||
@ -2485,7 +2492,7 @@ begin
|
||||
end;
|
||||
|
||||
// rebuild Lazarus
|
||||
Result:=MainIDE.DoBuildLazarus([blfWithStaticPackages,blfQuick,blfOnlyIDE]);
|
||||
Result:=MainIDE.DoBuildLazarus(BuildIDEFlags);
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
finally
|
||||
@ -2500,6 +2507,7 @@ var
|
||||
DependencyPath: TList;
|
||||
ParentPackage: TLazPackage;
|
||||
Dependency: TPkgDependency;
|
||||
BuildIDEFlags: TBuildLazarusFlags;
|
||||
begin
|
||||
if (APackage.Installed=pitNope) and (APackage.AutoInstall=pitNope) then exit;
|
||||
|
||||
@ -2541,6 +2549,11 @@ begin
|
||||
SaveAutoInstallDependencies(true);
|
||||
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
|
||||
Result:=MessageDlg(lisPkgMangRebuildLazarus,
|
||||
Format(lisPkgMangThePackageWasMarkedCurrentlyLazarus, ['"',
|
||||
@ -2552,7 +2565,7 @@ begin
|
||||
end;
|
||||
|
||||
// rebuild Lazarus
|
||||
Result:=MainIDE.DoBuildLazarus([blfWithStaticPackages,blfOnlyIDE,blfQuick]);
|
||||
Result:=MainIDE.DoBuildLazarus(BuildIDEFlags);
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
finally
|
||||
@ -2692,7 +2705,7 @@ begin
|
||||
MainIDE.MacroList.SubstituteStr(TargetDir);
|
||||
// ToDo write a function in lazconf for this
|
||||
//if TargetDir<>'' then
|
||||
AddOption('-FE'+TargetDir);}
|
||||
AddOption('-FE'+TargetFilename);}
|
||||
end;
|
||||
|
||||
function TPkgManager.DoPublishPackage(APackage: TLazPackage;
|
||||
|
Loading…
Reference in New Issue
Block a user