Skip to content

Commit

Permalink
Native Windows Symbols + HarfBuzzSharp.NativeAssets.* (#1797)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Collins <[email protected]>
  • Loading branch information
mattleibow and pjcollins authored Sep 17, 2021
1 parent 789cb44 commit 68e80fa
Show file tree
Hide file tree
Showing 21 changed files with 642 additions and 67 deletions.
9 changes: 9 additions & 0 deletions VERSIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,17 @@ SkiaSharp.Views.Maui.Controls.Compatibility nuget 2.88.0
SkiaSharp.HarfBuzz nuget 2.88.0
SkiaSharp.Vulkan.SharpVk nuget 2.88.0
HarfBuzzSharp nuget 2.8.2
HarfBuzzSharp.NativeAssets.Android nuget 2.8.2
HarfBuzzSharp.NativeAssets.iOS nuget 2.8.2
HarfBuzzSharp.NativeAssets.Linux nuget 2.8.2
HarfBuzzSharp.NativeAssets.MacCatalyst nuget 2.8.2
HarfBuzzSharp.NativeAssets.macOS nuget 2.8.2
HarfBuzzSharp.NativeAssets.Tizen nuget 2.8.2
HarfBuzzSharp.NativeAssets.tvOS nuget 2.8.2
HarfBuzzSharp.NativeAssets.UWP nuget 2.8.2
HarfBuzzSharp.NativeAssets.watchOS nuget 2.8.2
HarfBuzzSharp.NativeAssets.WebAssembly nuget 2.8.2
HarfBuzzSharp.NativeAssets.Win32 nuget 2.8.2

# nuget replacement versions
Xamarin.Forms nuget 4.8.0.1821
Expand Down
26 changes: 25 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,17 @@ var TRACKED_NUGETS = new Dictionary<string, Version> {
{ "SkiaSharp.Views.Maui.Controls", new Version (1, 57, 0) },
{ "SkiaSharp.Views.Maui.Controls.Compatibility", new Version (1, 57, 0) },
{ "HarfBuzzSharp", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.Android", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.iOS", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.Linux", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.MacCatalyst", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.macOS", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.Tizen", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.tvOS", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.UWP", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.watchOS", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.WebAssembly", new Version (1, 0, 0) },
{ "HarfBuzzSharp.NativeAssets.Win32", new Version (1, 0, 0) },
{ "SkiaSharp.HarfBuzz", new Version (1, 57, 0) },
{ "SkiaSharp.Vulkan.SharpVk", new Version (1, 57, 0) },
};
Expand Down Expand Up @@ -704,11 +713,24 @@ Task ("nuget-normal")
CopyFile ("./External-Dependency-Info.txt", $"{outDir}/THIRD-PARTY-NOTICES.txt");
}

EnsureDirectoryExists ($"{OUTPUT_NUGETS_PATH}");
DeleteFiles ($"{OUTPUT_NUGETS_PATH}/*.nupkg");
foreach (var nuspec in GetFiles ("./output/*/nuget/*.nuspec")) {
PackageNuGet (nuspec, OUTPUT_NUGETS_PATH);

string symbolsFormat = null;
// *.NativeAssets.* are special as they contain just native code
if (nuspec.FullPath.Contains(".NativeAssets."))
symbolsFormat = "symbols.nupkg";

PackageNuGet (nuspec, OUTPUT_NUGETS_PATH, symbolsFormat: symbolsFormat);
}

// copy & move symbols to a special location to avoid signing
EnsureDirectoryExists ($"{OUTPUT_SYMBOLS_NUGETS_PATH}");
DeleteFiles ($"{OUTPUT_SYMBOLS_NUGETS_PATH}/*.nupkg");
MoveFiles ($"{OUTPUT_NUGETS_PATH}/*.snupkg", OUTPUT_SYMBOLS_NUGETS_PATH);
MoveFiles ($"{OUTPUT_NUGETS_PATH}/*.symbols.nupkg", OUTPUT_SYMBOLS_NUGETS_PATH);

// setup validation options
var options = new Xamarin.Nuget.Validator.NugetValidatorOptions {
Copyright = "© Microsoft Corporation. All rights reserved.",
Expand Down Expand Up @@ -784,6 +806,8 @@ Task ("nuget-special")
if (GetFiles ("./output/nugets/*.nupkg").Count > 0) {
specials[$"_NuGets"] = $"nugets";
specials[$"_NuGetsPreview"] = $"nugets";
specials[$"_Symbols"] = $"nugets-symbols";
specials[$"_SymbolsPreview"] = $"nugets-symbols";
}

foreach (var pair in specials) {
Expand Down
6 changes: 5 additions & 1 deletion cake/UtilsManaged.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void PackageNuGet(FilePath nuspecPath, DirectoryPath outputPath, bool allowDefaultExcludes = false)
void PackageNuGet(FilePath nuspecPath, DirectoryPath outputPath, bool allowDefaultExcludes = false, string symbolsFormat = null)
{
EnsureDirectoryExists(outputPath);
var settings = new NuGetPackSettings {
Expand All @@ -14,6 +14,10 @@ void PackageNuGet(FilePath nuspecPath, DirectoryPath outputPath, bool allowDefau
if (allowDefaultExcludes) {
settings.ArgumentCustomization = args => args.Append("-NoDefaultExcludes");
}
if (!string.IsNullOrEmpty(symbolsFormat)) {
settings.Symbols = true;
settings.SymbolPackageFormat = symbolsFormat;
}
NuGetPack(nuspecPath, settings);
}

Expand Down
3 changes: 2 additions & 1 deletion cake/msbuild.cake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
DirectoryPath PACKAGE_CACHE_PATH = MakeAbsolute(ROOT_PATH.Combine("externals/package_cache"));
DirectoryPath OUTPUT_NUGETS_PATH = MakeAbsolute(ROOT_PATH.Combine("output/nugets"));
DirectoryPath OUTPUT_SPECIAL_NUGETS_PATH = MakeAbsolute(ROOT_PATH.Combine("output/special-nugets"));
DirectoryPath OUTPUT_SPECIAL_NUGETS_PATH = MakeAbsolute(ROOT_PATH.Combine("output/nugets-special"));
DirectoryPath OUTPUT_SYMBOLS_NUGETS_PATH = MakeAbsolute(ROOT_PATH.Combine("output/nugets-symbols"));

var NUGETS_SOURCES = new [] {
OUTPUT_NUGETS_PATH.FullPath,
Expand Down
60 changes: 60 additions & 0 deletions nuget/HarfBuzzSharp.NativeAssets.Android.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>

<!-- package -->
<id>HarfBuzzSharp.NativeAssets.Android</id>
<title>HarfBuzzSharp - Native Assets for Android</title>
<version>1.0.0</version>
<description>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</description>
<summary>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</summary>
<releaseNotes>
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.
</releaseNotes>
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl>
<tags>xamarin text harfbuzz ios android linux windows uwp tvos macos tizen cross-platform harfbuzzsharp</tags>

<!-- legal -->
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>

<dependencies>
<group targetFramework="monoandroid1.0">
</group>
<group targetFramework="net6.0-android30.0">
</group>
</dependencies>

</metadata>
<files>

<!-- the build bits -->
<file src="build/monoandroid1.0/HarfBuzzSharp.targets" target="build/monoandroid1.0/HarfBuzzSharp.NativeAssets.Android.targets" />
<file src="build/monoandroid1.0/HarfBuzzSharp.targets" target="buildTransitive/monoandroid1.0/HarfBuzzSharp.NativeAssets.Android.targets" />
<file src="build/net6.0-android/HarfBuzzSharp.targets" target="build/net6.0-android30.0/HarfBuzzSharp.NativeAssets.Android.targets" />
<file src="build/net6.0-android/HarfBuzzSharp.targets" target="buildTransitive/net6.0-android30.0/HarfBuzzSharp.NativeAssets.Android.targets" />

<!-- libHarfBuzzSharp.dll and other native files -->
<file platform="macos,windows" src="runtimes/android-x64/native/libHarfBuzzSharp.so" />
<file platform="macos,windows" src="runtimes/android-x86/native/libHarfBuzzSharp.so" />
<file platform="macos,windows" src="runtimes/android-arm/native/libHarfBuzzSharp.so" />
<file platform="macos,windows" src="runtimes/android-arm64/native/libHarfBuzzSharp.so" />

<!-- placeholders -->
<file src="_._" target="lib/monoandroid1.0/_._" />
<file src="_._" target="lib/net6.0-android30.0/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
<file src="THIRD-PARTY-NOTICES.txt" />

</files>
</package>
52 changes: 52 additions & 0 deletions nuget/HarfBuzzSharp.NativeAssets.MacCatalyst.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>

<!-- package -->
<id>HarfBuzzSharp.NativeAssets.MacCatalyst</id>
<title>HarfBuzzSharp - Native Assets for Mac Catalyst</title>
<version>1.0.0</version>
<description>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</description>
<summary>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</summary>
<releaseNotes>
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.
</releaseNotes>
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl>
<tags>xamarin text harfbuzz ios android linux windows uwp tvos macos tizen cross-platform harfbuzzsharp</tags>

<!-- legal -->
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>

<dependencies>
<group targetFramework="net6.0-maccatalyst13.5">
</group>
</dependencies>

</metadata>
<files>

<!-- the build bits -->
<file src="build/net6.0-maccatalyst/HarfBuzzSharp.targets" target="build/net6.0-maccatalyst13.5/HarfBuzzSharp.NativeAssets.MacCatalyst.targets" />
<file src="build/net6.0-maccatalyst/HarfBuzzSharp.targets" target="buildTransitive/net6.0-maccatalyst13.5/HarfBuzzSharp.NativeAssets.MacCatalyst.targets" />

<!-- libHarfBuzzSharp.dll and other native files -->
<file platform="macos" src="runtimes/maccatalyst/native/libHarfBuzzSharp.framework.zip" target="runtimes/maccatalyst/native/libHarfBuzzSharp.framework.zip" />

<!-- placeholders -->
<file src="_._" target="lib/net6.0-maccatalyst13.5/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
<file src="THIRD-PARTY-NOTICES.txt" />

</files>
</package>
53 changes: 53 additions & 0 deletions nuget/HarfBuzzSharp.NativeAssets.Tizen.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>

<!-- package -->
<id>HarfBuzzSharp.NativeAssets.Tizen</id>
<title>HarfBuzzSharp - Native Assets for Tizen</title>
<version>1.0.0</version>
<description>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</description>
<summary>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</summary>
<releaseNotes>
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.
</releaseNotes>
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl>
<tags>xamarin text harfbuzz ios android linux windows uwp tvos macos tizen cross-platform harfbuzzsharp</tags>

<!-- legal -->
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>

<dependencies>
<group targetFramework="tizen40">
</group>
</dependencies>

</metadata>
<files>

<!-- the build bits -->
<file src="build/tizen40/HarfBuzzSharp.targets" target="build/tizen40/HarfBuzzSharp.NativeAssets.Tizen.targets" />
<file src="build/tizen40/HarfBuzzSharp.targets" target="buildTransitive/tizen40/HarfBuzzSharp.NativeAssets.Tizen.targets" />

<!-- libHarfBuzzSharp.dll and other native files -->
<file src="build/tizen40/arm/libHarfBuzzSharp.so" />
<file src="build/tizen40/x86/libHarfBuzzSharp.so" />

<!-- placeholders -->
<file src="_._" target="lib/tizen40/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
<file src="THIRD-PARTY-NOTICES.txt" />

</files>
</package>
57 changes: 57 additions & 0 deletions nuget/HarfBuzzSharp.NativeAssets.UWP.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>

<!-- package -->
<id>HarfBuzzSharp.NativeAssets.UWP</id>
<title>HarfBuzzSharp - Native Assets for UWP</title>
<version>1.0.0</version>
<description>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</description>
<summary>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</summary>
<releaseNotes>
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.
</releaseNotes>
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl>
<tags>xamarin text harfbuzz ios android linux windows uwp tvos macos tizen cross-platform harfbuzzsharp</tags>

<!-- legal -->
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>

<dependencies>
<group targetFramework="uap10.0.10240">
</group>
</dependencies>

</metadata>
<files>

<!-- the build bits -->

<!-- libHarfBuzzSharp.dll and other native files -->
<file platform="windows" src="runtimes/win10-x64/nativeassets/uap10.0/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win10-x64/nativeassets/uap10.0/libHarfBuzzSharp.pdb" />
<file platform="windows" src="runtimes/win10-x86/nativeassets/uap10.0/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win10-x86/nativeassets/uap10.0/libHarfBuzzSharp.pdb" />
<file platform="windows" src="runtimes/win10-arm/nativeassets/uap10.0/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win10-arm/nativeassets/uap10.0/libHarfBuzzSharp.pdb" />
<file platform="windows" src="runtimes/win10-arm64/nativeassets/uap10.0/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win10-arm64/nativeassets/uap10.0/libHarfBuzzSharp.pdb" />

<!-- placeholders -->
<file src="_._" target="lib/uap10.0.10240/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
<file src="THIRD-PARTY-NOTICES.txt" />

</files>
</package>
60 changes: 60 additions & 0 deletions nuget/HarfBuzzSharp.NativeAssets.Win32.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>

<!-- package -->
<id>HarfBuzzSharp.NativeAssets.Win32</id>
<title>HarfBuzzSharp - Native Assets for Win32</title>
<version>1.0.0</version>
<description>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</description>
<summary>
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
</summary>
<releaseNotes>
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.
</releaseNotes>
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl>
<tags>xamarin text harfbuzz ios android linux windows uwp tvos macos tizen cross-platform harfbuzzsharp</tags>

<!-- legal -->
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>

<dependencies>
<group targetFramework="net462">
</group>
<group targetFramework="netstandard1.3">
</group>
</dependencies>

</metadata>
<files>

<!-- the build bits -->
<file src="build/net462/HarfBuzzSharp.targets" target="build/net462/HarfBuzzSharp.NativeAssets.Win32.targets" />
<file src="build/net462/HarfBuzzSharp.targets" target="buildTransitive/net462/HarfBuzzSharp.NativeAssets.Win32.targets" />

<!-- libHarfBuzzSharp.dll and other native files -->
<file platform="windows" src="runtimes/win-x64/native/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win-x64/native/libHarfBuzzSharp.pdb" />
<file platform="windows" src="runtimes/win-x86/native/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win-x86/native/libHarfBuzzSharp.pdb" />
<file platform="windows" src="runtimes/win-arm64/native/libHarfBuzzSharp.dll" />
<file platform="windows" src="runtimes/win-arm64/native/libHarfBuzzSharp.pdb" />

<!-- placeholders -->
<file src="_._" target="lib/net462/_._" />
<file src="_._" target="lib/netstandard1.3/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
<file src="THIRD-PARTY-NOTICES.txt" />

</files>
</package>
Loading

0 comments on commit 68e80fa

Please sign in to comment.