mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 09:50:18 +02:00
* Replaced global variable for field
git-svn-id: trunk@35378 -
This commit is contained in:
parent
11493de99b
commit
addb92e62b
@ -141,7 +141,7 @@ var
|
|||||||
P: TFPPackage;
|
P: TFPPackage;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
P := GFPpkg.FPMakeRepoFindPackage(APackageName, pkgpkInstalled);
|
P := PackageManager.FPMakeRepoFindPackage(APackageName, pkgpkInstalled);
|
||||||
if Assigned(P) then
|
if Assigned(P) then
|
||||||
begin
|
begin
|
||||||
AUnitDir := P.PackagesStructure.GetUnitDirectory(P);
|
AUnitDir := P.PackagesStructure.GetUnitDirectory(P);
|
||||||
@ -166,7 +166,7 @@ Var
|
|||||||
HaveFpmake : boolean;
|
HaveFpmake : boolean;
|
||||||
P : TFPPackage;
|
P : TFPPackage;
|
||||||
begin
|
begin
|
||||||
P:=GFPpkg.PackageByName(PackageName, pkgpkAvailable);
|
P:=PackageManager.PackageByName(PackageName, pkgpkAvailable);
|
||||||
NeedFPMKUnitSource:=false;
|
NeedFPMKUnitSource:=false;
|
||||||
OOptions:='';
|
OOptions:='';
|
||||||
SetCurrentDir(PackageManager.PackageBuildPath(P));
|
SetCurrentDir(PackageManager.PackageBuildPath(P));
|
||||||
@ -237,9 +237,9 @@ begin
|
|||||||
CreateFPMKUnitSource(TempBuildDir+PathDelim+'fpmkunit.pp');
|
CreateFPMKUnitSource(TempBuildDir+PathDelim+'fpmkunit.pp');
|
||||||
end;
|
end;
|
||||||
// Call compiler
|
// Call compiler
|
||||||
If ExecuteProcess(GFPpkg.FPMakeCompilerOptions.Compiler,OOptions+' '+FPmakeSrc)<>0 then
|
If ExecuteProcess(PackageManager.FPMakeCompilerOptions.Compiler,OOptions+' '+FPmakeSrc)<>0 then
|
||||||
begin
|
begin
|
||||||
if not GFPpkg.Options.CommandLineSection.RecoveryMode then
|
if not PackageManager.Options.CommandLineSection.RecoveryMode then
|
||||||
Error(SErrCompileFailureFPMakeTryRecovery)
|
Error(SErrCompileFailureFPMakeTryRecovery)
|
||||||
else
|
else
|
||||||
Error(SErrCompileFailureFPMake);
|
Error(SErrCompileFailureFPMake);
|
||||||
@ -317,7 +317,7 @@ begin
|
|||||||
if (command<>'archive') and (command<>'manifest') and
|
if (command<>'archive') and (command<>'manifest') and
|
||||||
(not(PackageManager.CompilerOptions.CompilerOS in P.OSes) or
|
(not(PackageManager.CompilerOptions.CompilerOS in P.OSes) or
|
||||||
not(PackageManager.CompilerOptions.CompilerCPU in P.CPUs)) then
|
not(PackageManager.CompilerOptions.CompilerCPU in P.CPUs)) then
|
||||||
Error(SErrPackageDoesNotSupportTarget,[P.Name,MakeTargetString(PackageManager.CompilerOptions.CompilerCPU,GFPpkg.CompilerOptions.CompilerOS)]);
|
Error(SErrPackageDoesNotSupportTarget,[P.Name,MakeTargetString(PackageManager.CompilerOptions.CompilerCPU,PackageManager.CompilerOptions.CompilerOS)]);
|
||||||
end;
|
end;
|
||||||
{ Maybe compile fpmake executable? }
|
{ Maybe compile fpmake executable? }
|
||||||
ExecuteAction(PackageName,'compilefpmake');
|
ExecuteAction(PackageName,'compilefpmake');
|
||||||
@ -335,7 +335,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if PackageManager.CompilerOptions.HasOptions then
|
if PackageManager.CompilerOptions.HasOptions then
|
||||||
AddOption('--options='+GFPpkg.CompilerOptions.Options.DelimitedText);
|
AddOption('--options='+PackageManager.CompilerOptions.Options.DelimitedText);
|
||||||
|
|
||||||
if PackageManager.Options.GlobalSection.CustomFPMakeOptions<>'' then
|
if PackageManager.Options.GlobalSection.CustomFPMakeOptions<>'' then
|
||||||
begin
|
begin
|
||||||
@ -345,9 +345,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
AddOption('--nofpccfg');
|
AddOption('--nofpccfg');
|
||||||
AddOption('--compiler='+GFPpkg.CompilerOptions.Compiler);
|
AddOption('--compiler='+PackageManager.CompilerOptions.Compiler);
|
||||||
AddOption('--cpu='+CPUToString(GFPpkg.CompilerOptions.CompilerCPU));
|
AddOption('--cpu='+CPUToString(PackageManager.CompilerOptions.CompilerCPU));
|
||||||
AddOption('--os='+OSToString(GFPpkg.CompilerOptions.CompilerOS));
|
AddOption('--os='+OSToString(PackageManager.CompilerOptions.CompilerOS));
|
||||||
|
|
||||||
// While scanning a source-repository it could be necessary to create manifest
|
// While scanning a source-repository it could be necessary to create manifest
|
||||||
// files. At this moment the InstallRepo could not be initialized yet. And the
|
// files. At this moment the InstallRepo could not be initialized yet. And the
|
||||||
@ -437,15 +437,15 @@ var
|
|||||||
StoredGlobalPrefix: string;
|
StoredGlobalPrefix: string;
|
||||||
begin
|
begin
|
||||||
// In most (all?) cases we do not want a prefix in the archive.
|
// In most (all?) cases we do not want a prefix in the archive.
|
||||||
StoredGlobalPrefix := GFPpkg.CompilerOptions.GlobalPrefix;
|
StoredGlobalPrefix := PackageManager.CompilerOptions.GlobalPrefix;
|
||||||
StoredLocalPrefix := GFPpkg.CompilerOptions.LocalPrefix;
|
StoredLocalPrefix := PackageManager.CompilerOptions.LocalPrefix;
|
||||||
GFPpkg.CompilerOptions.GlobalPrefix := '';
|
PackageManager.CompilerOptions.GlobalPrefix := '';
|
||||||
GFPpkg.CompilerOptions.LocalPrefix := '';
|
PackageManager.CompilerOptions.LocalPrefix := '';
|
||||||
try
|
try
|
||||||
RunFPMake('archive');
|
RunFPMake('archive');
|
||||||
finally
|
finally
|
||||||
GFPpkg.CompilerOptions.GlobalPrefix := StoredGlobalPrefix;
|
PackageManager.CompilerOptions.GlobalPrefix := StoredGlobalPrefix;
|
||||||
GFPpkg.CompilerOptions.LocalPrefix := StoredLocalPrefix;
|
PackageManager.CompilerOptions.LocalPrefix := StoredLocalPrefix;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user