From fa67338e6495bf2382331ac72f15acb5fdbdfadd Mon Sep 17 00:00:00 2001 From: joost Date: Sun, 3 Jan 2016 18:57:39 +0000 Subject: [PATCH] * Added the option to use packages from external sources by setting the packagename to and the DownloadURL git-svn-id: trunk@32838 - --- packages/fppkg/src/pkgcommands.pp | 10 ++++++---- packages/fppkg/src/pkgglobals.pp | 1 + packages/fppkg/src/pkghandler.pp | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/fppkg/src/pkgcommands.pp b/packages/fppkg/src/pkgcommands.pp index e8384ce51d..93d55712da 100644 --- a/packages/fppkg/src/pkgcommands.pp +++ b/packages/fppkg/src/pkgcommands.pp @@ -319,7 +319,7 @@ begin begin // For local files we need the information inside the zip to get the // dependencies - if (PackageName=CmdLinePackageName) then + if (PackageName=CmdLinePackageName) or (PackageName=URLPackageName) then begin ExecuteAction(PackageName,'unzip'); ExecuteAction(PackageName,'installdependencies'); @@ -347,7 +347,7 @@ begin begin // For local files we need the information inside the zip to get the // dependencies - if (PackageName=CmdLinePackageName) then + if (PackageName=CmdLinePackageName) or (PackageName=URLPackageName) then begin ExecuteAction(PackageName,'unzip'); ExecuteAction(PackageName,'installdependencies'); @@ -436,7 +436,8 @@ begin begin ExecuteAction(PackageName,'build'); ExecuteAction(PackageName,'fpmakeinstall'); - if (PackageName=CmdLinePackageName) or (PackageName=CurrentDirPackageName) then + if (PackageName=CmdLinePackageName) or (PackageName=CurrentDirPackageName) or + (PackageName=URLPackageName) then begin // Load package name from manifest if not FileExists(ManifestFileName) then @@ -496,7 +497,8 @@ begin Error(SErrNoPackageSpecified); ManifestPackages:=nil; // Load dependencies for local packages - if (PackageName=CmdLinePackageName) or (PackageName=CurrentDirPackageName) then + if (PackageName=CmdLinePackageName) or (PackageName=CurrentDirPackageName) or + (PackageName=URLPackageName) then begin ExecuteAction(PackageName,'fpmakemanifest'); ManifestPackages:=TFPPackages.Create(TFPPackage); diff --git a/packages/fppkg/src/pkgglobals.pp b/packages/fppkg/src/pkgglobals.pp index 6058de4d0e..a551f0c7d7 100644 --- a/packages/fppkg/src/pkgglobals.pp +++ b/packages/fppkg/src/pkgglobals.pp @@ -34,6 +34,7 @@ Type Const CmdLinePackageName=''; CurrentDirPackageName=''; + URLPackageName=''; // Dependencies for compiling the fpmkunit unit FPMKUnitDepDefaultCount=5; diff --git a/packages/fppkg/src/pkghandler.pp b/packages/fppkg/src/pkghandler.pp index 783d831d45..14c36e9857 100644 --- a/packages/fppkg/src/pkghandler.pp +++ b/packages/fppkg/src/pkghandler.pp @@ -137,7 +137,7 @@ begin else Result:=CurrentDir; end - else if APackage.Name=CmdLinePackageName then + else if (APackage.Name=CmdLinePackageName) or (APackage.Name=URLPackageName) then Result:=GlobalOptions.BuildDir+ChangeFileExt(ExtractFileName(APackage.LocalFileName),'') else if (APackage.RecompileBroken) and (APackage.SourcePath<>'') then Result:=APackage.SourcePath