mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-17 03:49:30 +01:00
IDE: removed obsolete package.autocreated
git-svn-id: trunk@41276 -
This commit is contained in:
parent
ddad97db02
commit
35e4dd7196
@ -4161,7 +4161,6 @@ resourcestring
|
|||||||
lisCurrentState = 'Current state: ';
|
lisCurrentState = 'Current state: ';
|
||||||
lisInstalled = 'installed';
|
lisInstalled = 'installed';
|
||||||
lisNotInstalled = 'not installed';
|
lisNotInstalled = 'not installed';
|
||||||
lisOIPThisPackageWasAutomaticallyCreated = '%sThis package was automatically created';
|
|
||||||
lisOIPThisPackageIsInstalledButTheLpkFileWasNotFound = '%sThis package is '
|
lisOIPThisPackageIsInstalledButTheLpkFileWasNotFound = '%sThis package is '
|
||||||
+'installed, but the lpk file was not found';
|
+'installed, but the lpk file was not found';
|
||||||
lisOIPDescriptionDescription = '%sDescription: %s';
|
lisOIPDescriptionDescription = '%sDescription: %s';
|
||||||
@ -4321,7 +4320,6 @@ resourcestring
|
|||||||
lisPckShowUnneededDependencies = 'Show unneeded dependencies';
|
lisPckShowUnneededDependencies = 'Show unneeded dependencies';
|
||||||
lisPckExplPackageNotFound = 'Package %s not found';
|
lisPckExplPackageNotFound = 'Package %s not found';
|
||||||
lisPckExplState = '%sState: ';
|
lisPckExplState = '%sState: ';
|
||||||
lisPckExplAutoCreated = 'AutoCreated';
|
|
||||||
lisPckExplInstalled = 'Installed';
|
lisPckExplInstalled = 'Installed';
|
||||||
lisLpkIsMissing = 'lpk is missing';
|
lisLpkIsMissing = 'lpk is missing';
|
||||||
lisPckExplInstallOnNextStart = 'Install on next start';
|
lisPckExplInstallOnNextStart = 'Install on next start';
|
||||||
|
|||||||
@ -107,8 +107,6 @@ begin
|
|||||||
if Assigned(LI) then begin
|
if Assigned(LI) then begin
|
||||||
CurPkg:=TLazPackage(LI.Data);
|
CurPkg:=TLazPackage(LI.Data);
|
||||||
HintStr:=Format(lisOIPFilename, [CurPkg.Filename]);
|
HintStr:=Format(lisOIPFilename, [CurPkg.Filename]);
|
||||||
if CurPkg.AutoCreated then
|
|
||||||
HintStr:=Format(lisOIPThisPackageWasAutomaticallyCreated,[HintStr+LineEnding]);
|
|
||||||
if CurPkg.Missing then
|
if CurPkg.Missing then
|
||||||
HintStr:=Format(lisOIPThisPackageIsInstalledButTheLpkFileWasNotFound,[HintStr+LineEnding]);
|
HintStr:=Format(lisOIPThisPackageIsInstalledButTheLpkFileWasNotFound,[HintStr+LineEnding]);
|
||||||
HintStr:=Format(lisOIPDescriptionDescription, [HintStr+LineEnding,
|
HintStr:=Format(lisOIPDescriptionDescription, [HintStr+LineEnding,
|
||||||
|
|||||||
@ -561,7 +561,6 @@ type
|
|||||||
private
|
private
|
||||||
FAddToProjectUsesSection: boolean;
|
FAddToProjectUsesSection: boolean;
|
||||||
FAuthor: string;
|
FAuthor: string;
|
||||||
FAutoCreated: boolean;
|
|
||||||
FAutoUpdate: TPackageUpdatePolicy;
|
FAutoUpdate: TPackageUpdatePolicy;
|
||||||
FFPDocPackageName: string;
|
FFPDocPackageName: string;
|
||||||
FOptionsBackup: TLazPackage;
|
FOptionsBackup: TLazPackage;
|
||||||
@ -616,7 +615,6 @@ type
|
|||||||
function GetFiles(Index: integer): TPkgFile;
|
function GetFiles(Index: integer): TPkgFile;
|
||||||
procedure SetAddToProjectUsesSection(const AValue: boolean);
|
procedure SetAddToProjectUsesSection(const AValue: boolean);
|
||||||
procedure SetAuthor(const AValue: string);
|
procedure SetAuthor(const AValue: string);
|
||||||
procedure SetAutoCreated(const AValue: boolean);
|
|
||||||
procedure SetAutoIncrementVersionOnBuild(const AValue: boolean);
|
procedure SetAutoIncrementVersionOnBuild(const AValue: boolean);
|
||||||
procedure SetAutoUpdate(const AValue: TPackageUpdatePolicy);
|
procedure SetAutoUpdate(const AValue: TPackageUpdatePolicy);
|
||||||
procedure SetDescription(const AValue: string);
|
procedure SetDescription(const AValue: string);
|
||||||
@ -777,7 +775,6 @@ type
|
|||||||
property AddToProjectUsesSection: boolean read FAddToProjectUsesSection
|
property AddToProjectUsesSection: boolean read FAddToProjectUsesSection
|
||||||
write SetAddToProjectUsesSection;
|
write SetAddToProjectUsesSection;
|
||||||
property Author: string read FAuthor write SetAuthor;
|
property Author: string read FAuthor write SetAuthor;
|
||||||
property AutoCreated: boolean read FAutoCreated write SetAutoCreated; // do not save
|
|
||||||
property AutoIncrementVersionOnBuild: boolean
|
property AutoIncrementVersionOnBuild: boolean
|
||||||
read GetAutoIncrementVersionOnBuild
|
read GetAutoIncrementVersionOnBuild
|
||||||
write SetAutoIncrementVersionOnBuild;
|
write SetAutoIncrementVersionOnBuild;
|
||||||
@ -2343,16 +2340,6 @@ begin
|
|||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazPackage.SetAutoCreated(const AValue: boolean);
|
|
||||||
begin
|
|
||||||
if FAutoCreated=AValue then exit;
|
|
||||||
FAutoCreated:=AValue;
|
|
||||||
if AutoCreated then begin
|
|
||||||
UserReadOnly:=true;
|
|
||||||
Missing:=true;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TLazPackage.SetAutoIncrementVersionOnBuild(const AValue: boolean);
|
procedure TLazPackage.SetAutoIncrementVersionOnBuild(const AValue: boolean);
|
||||||
begin
|
begin
|
||||||
if AutoIncrementVersionOnBuild=AValue then exit;
|
if AutoIncrementVersionOnBuild=AValue then exit;
|
||||||
@ -2367,8 +2354,6 @@ procedure TLazPackage.SetAutoInstall(AValue: TPackageInstallType);
|
|||||||
begin
|
begin
|
||||||
if FAutoInstall=AValue then exit;
|
if FAutoInstall=AValue then exit;
|
||||||
FAutoInstall:=AValue;
|
FAutoInstall:=AValue;
|
||||||
if AutoCreated and (FAutoInstall<>pitStatic) then
|
|
||||||
DumpStack;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazPackage.SetAutoUpdate(const AValue: TPackageUpdatePolicy);
|
procedure TLazPackage.SetAutoUpdate(const AValue: TPackageUpdatePolicy);
|
||||||
@ -3746,7 +3731,7 @@ end;
|
|||||||
|
|
||||||
function TLazPackage.NeedsDefineTemplates: boolean;
|
function TLazPackage.NeedsDefineTemplates: boolean;
|
||||||
begin
|
begin
|
||||||
if IsVirtual or AutoCreated or (lpfDestroying in Flags) or (Name='') then
|
if IsVirtual or (lpfDestroying in Flags) or (Name='') then
|
||||||
Result:=false
|
Result:=false
|
||||||
else
|
else
|
||||||
Result:=true;
|
Result:=true;
|
||||||
|
|||||||
@ -687,11 +687,11 @@ begin
|
|||||||
|
|
||||||
// under section PkgEditMenuSectionSave
|
// under section PkgEditMenuSectionSave
|
||||||
SetItem(PkgEditMenuSave,@SaveBitBtnClick,true,SaveBitBtn.Enabled);
|
SetItem(PkgEditMenuSave,@SaveBitBtnClick,true,SaveBitBtn.Enabled);
|
||||||
SetItem(PkgEditMenuSaveAs,@SaveAsClick,true,not LazPackage.AutoCreated);
|
SetItem(PkgEditMenuSaveAs,@SaveAsClick,true,true);
|
||||||
SetItem(PkgEditMenuRevert,@RevertClick,true,
|
SetItem(PkgEditMenuRevert,@RevertClick,true,
|
||||||
(not LazPackage.IsVirtual) and FileExistsUTF8(LazPackage.Filename));
|
(not LazPackage.IsVirtual) and FileExistsUTF8(LazPackage.Filename));
|
||||||
SetItem(PkgEditMenuPublish,@PublishClick,true,
|
SetItem(PkgEditMenuPublish,@PublishClick,true,
|
||||||
(not LazPackage.AutoCreated) and LazPackage.HasDirectory);
|
(not LazPackage.Missing) and LazPackage.HasDirectory);
|
||||||
|
|
||||||
// under section PkgEditMenuSectionCompile
|
// under section PkgEditMenuSectionCompile
|
||||||
SetItem(PkgEditMenuCompile,@CompileBitBtnClick,true,CompileBitBtn.Enabled);
|
SetItem(PkgEditMenuCompile,@CompileBitBtnClick,true,CompileBitBtn.Enabled);
|
||||||
@ -2436,7 +2436,7 @@ end;
|
|||||||
|
|
||||||
function TPackageEditors.ShouldNotBeInstalled(APackage: TLazPackage): boolean;
|
function TPackageEditors.ShouldNotBeInstalled(APackage: TLazPackage): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=APackage.AutoCreated
|
Result:=APackage.Missing
|
||||||
or ((APackage.FindUnitWithRegister=nil) and (APackage.Provides.Count=0));
|
or ((APackage.FindUnitWithRegister=nil) and (APackage.Provides.Count=0));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1503,9 +1503,10 @@ function TLazPackageGraph.CreateDefaultPackage: TLazPackage;
|
|||||||
begin
|
begin
|
||||||
Result:=TLazPackage.Create;
|
Result:=TLazPackage.Create;
|
||||||
with Result do begin
|
with Result do begin
|
||||||
AutoCreated:=true;
|
Missing:=true;
|
||||||
|
UserReadOnly:=true;
|
||||||
Name:='DefaultPackage';
|
Name:='DefaultPackage';
|
||||||
Filename:=SetDirSeparators('$(LazarusDir)/components/custom/');
|
Filename:=SetDirSeparators('$(LazarusDir)/components/custom/customdummy.lpk');
|
||||||
Version.SetValues(1,0,1,1);
|
Version.SetValues(1,0,1,1);
|
||||||
Author:='Anonymous';
|
Author:='Anonymous';
|
||||||
AutoInstall:=pitStatic;
|
AutoInstall:=pitStatic;
|
||||||
@ -1517,7 +1518,7 @@ begin
|
|||||||
Translated:=SystemLanguageID1;
|
Translated:=SystemLanguageID1;
|
||||||
|
|
||||||
// add unit paths
|
// add unit paths
|
||||||
UsageOptions.UnitPath:=SetDirSeparators('$(LazarusDir)/components/custom');
|
UsageOptions.UnitPath:=SetDirSeparators('$(PkgOutDir)');
|
||||||
|
|
||||||
// add requirements
|
// add requirements
|
||||||
AddRequiredDependency(LCLPackage.CreateDependencyWithOwner(Result));
|
AddRequiredDependency(LCLPackage.CreateDependencyWithOwner(Result));
|
||||||
@ -5046,7 +5047,7 @@ begin
|
|||||||
with BrokenPackage do begin
|
with BrokenPackage do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Missing:=true;
|
Missing:=true;
|
||||||
AutoCreated:=true;
|
UserReadOnly:=true;
|
||||||
Name:=Dependency.PackageName;
|
Name:=Dependency.PackageName;
|
||||||
Filename:='';
|
Filename:='';
|
||||||
Version.SetValues(0,0,0,0);
|
Version.SetValues(0,0,0,0);
|
||||||
|
|||||||
@ -542,8 +542,6 @@ begin
|
|||||||
InfoStr:=Format(lisOIPFilename, [Pkg.Filename]);
|
InfoStr:=Format(lisOIPFilename, [Pkg.Filename]);
|
||||||
// state
|
// state
|
||||||
InfoStr:=Format(lisPckExplState, [InfoStr+LineEnding]);
|
InfoStr:=Format(lisPckExplState, [InfoStr+LineEnding]);
|
||||||
if Pkg.AutoCreated then
|
|
||||||
AddState(lisPckExplAutoCreated);
|
|
||||||
if Pkg.Missing then
|
if Pkg.Missing then
|
||||||
AddState(lisLpkIsMissing);
|
AddState(lisLpkIsMissing);
|
||||||
if Pkg.Installed<>pitNope then
|
if Pkg.Installed<>pitNope then
|
||||||
|
|||||||
@ -1392,9 +1392,8 @@ begin
|
|||||||
Dependency:=PackageGraph.FirstAutoInstallDependency;
|
Dependency:=PackageGraph.FirstAutoInstallDependency;
|
||||||
while Dependency<>nil do begin
|
while Dependency<>nil do begin
|
||||||
if (Dependency.LoadPackageResult=lprSuccess)
|
if (Dependency.LoadPackageResult=lprSuccess)
|
||||||
and (not Dependency.RequiredPackage.AutoCreated)
|
|
||||||
and (not PackageGraph.IsStaticBasePackage(Dependency.PackageName))
|
|
||||||
and (not Dependency.RequiredPackage.Missing)
|
and (not Dependency.RequiredPackage.Missing)
|
||||||
|
and (not PackageGraph.IsStaticBasePackage(Dependency.PackageName))
|
||||||
and (not (Dependency.RequiredPackage.PackageType in [lptRunTime,lptRunTimeOnly]))
|
and (not (Dependency.RequiredPackage.PackageType in [lptRunTime,lptRunTimeOnly]))
|
||||||
then begin
|
then begin
|
||||||
if sl.IndexOf(Dependency.PackageName)<0 then begin
|
if sl.IndexOf(Dependency.PackageName)<0 then begin
|
||||||
@ -4024,7 +4023,7 @@ begin
|
|||||||
// try save all modified packages
|
// try save all modified packages
|
||||||
for i:=0 to PkgList.Count-1 do begin
|
for i:=0 to PkgList.Count-1 do begin
|
||||||
APackage:=TLazPackage(PkgList[i]);
|
APackage:=TLazPackage(PkgList[i]);
|
||||||
if (not APackage.AutoCreated)
|
if (not APackage.UserReadOnly)
|
||||||
and (APackage.IsVirtual or APackage.Modified) then begin
|
and (APackage.IsVirtual or APackage.Modified) then begin
|
||||||
SaveFlags:=[];
|
SaveFlags:=[];
|
||||||
if DoSavePackage(APackage,SaveFlags)<>mrOk then exit;
|
if DoSavePackage(APackage,SaveFlags)<>mrOk then exit;
|
||||||
@ -4664,7 +4663,7 @@ begin
|
|||||||
Project1.ReaddRemovedDependency(ADependency);
|
Project1.ReaddRemovedDependency(ADependency);
|
||||||
PackageGraph.OpenDependency(ADependency,false);
|
PackageGraph.OpenDependency(ADependency,false);
|
||||||
if (ADependency.RequiredPackage<>nil)
|
if (ADependency.RequiredPackage<>nil)
|
||||||
and (not ADependency.RequiredPackage.AutoCreated) then begin
|
and (not ADependency.RequiredPackage.Missing) then begin
|
||||||
AddUnitToProjectMainUsesSection(Project1,ADependency.PackageName,'');
|
AddUnitToProjectMainUsesSection(Project1,ADependency.PackageName,'');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user