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