diff --git a/buildpackages.task b/buildpackages.task index 4d86581f..1266cb7e 100644 --- a/buildpackages.task +++ b/buildpackages.task @@ -72,7 +72,7 @@ using System.Diagnostics; File.Copy(@"postgresql-$(libpqVersion)" + @"\src\interfaces\libpq\libpq-events.h", package_root + @"\include\libpq-events.h"); File.Copy(@"postgresql-$(libpqVersion)" + @"\src\interfaces\libpq\libpq-fe.h", package_root + @"\include\libpq-fe.h"); - ZipFile.CreateFromDirectory(@"$(BaseDir)out\packages\" + package + @"-headers\", @"$(BaseDir)out\" + package + @"-headers.zip".ToLower(), CompressionLevel.Optimal, false); + ZipFile.CreateFromDirectory(@"$(BaseDir)out\packages\" + package + @"-headers\", @"$(BaseDir)out\" + package + @"_$(libpqBuildNumber)" + @"-headers.zip".ToLower(), CompressionLevel.Optimal, false); } package_root = @"$(BaseDir)out\packages\libpq-$(libpqVersion)-binaries-$(Platform)-$(Configuration)\" + package; @@ -91,7 +91,7 @@ using System.Diagnostics; } } - ZipFile.CreateFromDirectory(@"$(BaseDir)out\packages\" + package + @"-binaries-$(Platform)-$(Configuration)\", @"$(BaseDir)out\"+ package + @"-binaries-$(Platform)-$(Configuration).zip".ToLower(), CompressionLevel.Optimal, false); + ZipFile.CreateFromDirectory(@"$(BaseDir)out\packages\" + package + @"-binaries-$(Platform)-$(Configuration)\", @"$(BaseDir)out\"+ package + @"_$(libpqBuildNumber)" + @"-binaries-$(Platform)-$(Configuration).zip".ToLower(), CompressionLevel.Optimal, false); } return true; diff --git a/downloadpackage.task b/downloadpackage.task index 9da401c4..5dff4f7b 100644 --- a/downloadpackage.task +++ b/downloadpackage.task @@ -97,6 +97,22 @@ using System.Diagnostics; string urifilename = Path.GetFileName(uri.LocalPath); string output = Path.Combine(outputfolder ?? librarypath, (outputfilename ?? urifilename)); + string cachedir = Environment.GetEnvironmentVariable("FreeSWITCHBuildCachePath") ?? ""; + string cached_file = cachedir != "" ? Path.Combine(cachedir, (outputfilename ?? urifilename)) : ""; + + if (cached_file != "" && File.Exists(cached_file)) { + Log.LogMessage(MessageImportance.High, + "Found package in cache \"" + cached_file + "\"."); + + if (File.Exists(output)) + { + Log.LogMessage(MessageImportance.High, + "Deleting previously downloaded file " + output + " for package \"" + package + "\"."); + File.Delete(output); + } + + File.Copy(cached_file, output); + } else //if (!File.Exists(output)) // Uncomment to skip download if exists { var syncObject = new State diff --git a/libpq-version.props b/libpq-version.props index da5a14c4..fd2fb20a 100644 --- a/libpq-version.props +++ b/libpq-version.props @@ -5,6 +5,7 @@ 10.23 + 1 $(BaseDir)postgresql-$(libpqVersion)\ diff --git a/openssl-version.props b/openssl-version.props index fe464fa8..fb238408 100644 --- a/openssl-version.props +++ b/openssl-version.props @@ -4,7 +4,7 @@ - 1.1.1t + 3.4.0 $(BaseDir)openssl-$(OpenSSLVersion)