From: Mike McLaughlin Date: Wed, 17 Jan 2024 01:41:35 +0000 (-0800) Subject: Fix some packaging issues (#4465) X-Git-Tag: accepted/tizen/unified/20241231.014852~40^2~231 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17b9f21b18982e3d860ac7e9635e3da3dc89973a;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Fix some packaging issues (#4465) Change SOS installer to copy subdirectories --- diff --git a/src/SOS/SOS.InstallHelper/InstallHelper.cs b/src/SOS/SOS.InstallHelper/InstallHelper.cs index 8073a9ced..ed72e4b8c 100644 --- a/src/SOS/SOS.InstallHelper/InstallHelper.cs +++ b/src/SOS/SOS.InstallHelper/InstallHelper.cs @@ -110,23 +110,11 @@ namespace SOS // Copy native SOS files WriteLine($"Copying files from {SOSNativeSourcePath}"); - RetryOperation("Problem installing native SOS binaries", () => { - foreach (string file in Directory.EnumerateFiles(SOSNativeSourcePath)) - { - string destinationFile = Path.Combine(InstallLocation, Path.GetFileName(file)); - File.Copy(file, destinationFile, overwrite: true); - } - }); + RetryOperation("Problem installing native SOS binaries", () => CopyFiles(SOSNativeSourcePath, InstallLocation)); // Copy managed SOS files WriteLine($"Copying files from {SOSManagedSourcePath}"); - RetryOperation("Problem installing managed SOS binaries", () => { - foreach (string file in Directory.EnumerateFiles(SOSManagedSourcePath)) - { - string destinationFile = Path.Combine(InstallLocation, Path.GetFileName(file)); - File.Copy(file, destinationFile, overwrite: true); - } - }); + RetryOperation("Problem installing managed SOS binaries", () => CopyFiles(SOSManagedSourcePath, InstallLocation)); // Configure lldb if (LLDBInitFile != null) @@ -356,6 +344,21 @@ namespace SOS return $"{os}-{architectureString}"; } + private static void CopyFiles(string sourcePath, string destinationPath) + { + foreach (string path in Directory.EnumerateDirectories(sourcePath)) + { + string directory = Path.Combine(destinationPath, Path.GetFileName(path)); + Directory.CreateDirectory(directory); + CopyFiles(path, directory); + } + foreach (string file in Directory.EnumerateFiles(sourcePath)) + { + string destinationFile = Path.Combine(destinationPath, Path.GetFileName(file)); + File.Copy(file, destinationFile, overwrite: true); + } + } + private void WriteLine(string format, params object[] args) { m_writeLine?.Invoke(string.Format(format, args)); diff --git a/src/SOS/SOS.InstallHelper/SOS.InstallHelper.csproj b/src/SOS/SOS.InstallHelper/SOS.InstallHelper.csproj index 9f007f064..315833e65 100644 --- a/src/SOS/SOS.InstallHelper/SOS.InstallHelper.csproj +++ b/src/SOS/SOS.InstallHelper/SOS.InstallHelper.csproj @@ -3,7 +3,7 @@ netstandard2.0 SOS.InstallHelper ;1591;1701 - false + true Diagnostic SOS Install Helper $(Description) SOS diff --git a/src/SOS/SOS.Package/SOS.Package.csproj b/src/SOS/SOS.Package/SOS.Package.csproj index 8ae407ed7..5fe7727d8 100644 --- a/src/SOS/SOS.Package/SOS.Package.csproj +++ b/src/SOS/SOS.Package/SOS.Package.csproj @@ -10,7 +10,7 @@ false tools $(ArtifactsPackagesDir)\GalleryManifest.xml - GenerateGalleryZip;GenerateSymbolsZip + GenerateGalleryManifest true false @@ -77,93 +77,4 @@ - - - $(ArtifactsBinDir)\gallery - $(GalleryDir)\$(FileVersion) - - - - - $(GalleryDir) - - - - $(GallerySubDir)\win-x64 - - - $(GallerySubDir)\win-x64 - - - $(GallerySubDir)\win-x64 - - - - $(GallerySubDir)\win-x86 - - - $(GallerySubDir)\win-x86 - - - $(GallerySubDir)\win-x86 - - - - $(GallerySubDir)\win-arm - - - $(GallerySubDir)\win-arm - - - $(GallerySubDir)\win-arm - - - - $(GallerySubDir)\win-arm64 - - - $(GallerySubDir)\win-arm64 - - - $(GallerySubDir)\win-arm64 - - - - - - - - - - - $(ArtifactsBinDir)\symbols - - - - - $(SymbolsDir) - - - - $(SymbolsDir)\win-x64 - - - - $(SymbolsDir)\win-x86 - - - - $(SymbolsDir)\win-arm - - - - $(SymbolsDir)\win-arm64 - - - - - - - - diff --git a/src/SOS/SOS.Package/SOS.Symbol.Package.csproj b/src/SOS/SOS.Package/SOS.Symbol.Package.csproj index 83cd791cf..59adf253d 100644 --- a/src/SOS/SOS.Package/SOS.Symbol.Package.csproj +++ b/src/SOS/SOS.Package/SOS.Symbol.Package.csproj @@ -15,7 +15,7 @@ - $(SOSPackagePathPrefix) + $(SOSPackagePathPrefix)/lib