diff --git a/.github/workflows/build-gtk.yml b/.github/workflows/build-gtk.yml new file mode 100644 index 000000000000..e047ea9c070b --- /dev/null +++ b/.github/workflows/build-gtk.yml @@ -0,0 +1,47 @@ +name: Build Controls.Sample.Gtk +on: [push, pull_request] + +jobs: + build_and_test: + name: Build & Test + runs-on: ubuntu-22.04 + env: + GtkSharpVersion: 3.24.24.117-develop + GtkSharpManifestVersion: 8.0.200 + DotnetVersion: 8.0.200 + PROJECTS_TO_PACK: | + src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj + src/Essentials/src/Essentials.csproj + src/Controls/src/Core/Controls.Core.csproj + src/Controls/src/Xaml/Controls.Xaml.csproj + src/Core/src/Core.csproj + src/Compatibility/Core/src/Compatibility.csproj + src/Controls/Foldable/src/Controls.Foldable.csproj + src/Graphics/src/Graphics/Graphics.csproj + steps: + - name: Checkout MAUI repo + uses: actions/checkout@v2 + - name: Setup .NET SDK ${{ env.DotnetVersion }} + uses: actions/setup-dotnet@v1.7.2 + with: + dotnet-version: ${{ env.DotnetVersion }} + - name: Install gtk workload + run: ./install_gtk_workload.sh + - name: Generate pre-release version suffix + run: dotnet fsi nugetPreRelease.fsx "" > PreReleaseVersionSuffix.txt + - name: Build MAUI + run: | + mv Directory.Build.Override.props.in Directory.Build.Override.props + dotnet build Microsoft.Maui.BuildTasks.slnf + echo "$PROJECTS_TO_PACK" | while read -r project; do + [ -z "$project" ] && continue # Skip if empty + dotnet build -c Release "$project" + done + - name: Pack MAUI + run: ./pack_mali.sh + - name: Upload binaries to nuget (if tag or main branch, and nugetKey is present) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NUGET_KEY: ${{ secrets.NUGET_KEY }} + if: ${{ env.NUGET_KEY != '' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} + run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/Directory.Build.Override.props.in b/Directory.Build.Override.props.in index c04c2e7095b8..e1edf4ac3259 100644 --- a/Directory.Build.Override.props.in +++ b/Directory.Build.Override.props.in @@ -6,6 +6,7 @@ --> <_IncludeWindows> <_IncludeTizen> + <_IncludeGtk>true <_IncludeAndroid> <_IncludeIos> <_IncludeMacCatalyst> @@ -13,7 +14,7 @@ - <_SpecificPlatformRequested Condition="'$(_IncludeAndroid)' == 'true' OR '$(_IncludeWindows)' == 'true' OR '$(_IncludeTizen)' == 'true' OR '$(_IncludeIos)' == 'true' OR '$(_IncludeMacCatalyst)' == 'true' OR '$(_IncludeMacOS)' == 'true'">true + <_SpecificPlatformRequested Condition="'$(_IncludeAndroid)' == 'true' OR '$(_IncludeWindows)' == 'true' OR '$(_IncludeTizen)' == 'true' OR '$(_IncludeGtk)' == true OR '$(_IncludeIos)' == 'true' OR '$(_IncludeMacCatalyst)' == 'true' OR '$(_IncludeMacOS)' == 'true'">true false false false diff --git a/Directory.Build.props b/Directory.Build.props index bcfbd2da661f..f4ae82287add 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -129,6 +129,8 @@ <_MauiBuildTasksLocation Condition="'$(_MauiBuildTasksLocation)' == ''">$(MSBuildThisFileDirectory).buildtasks\ <_MauiAOTProfileLocation>$(MauiSrcDirectory)Controls\src\Build.Tasks\nuget\buildTransitive\netstandard2.0\ true + $(NoWarn);NU1605 + NU1605 portable true true diff --git a/eng/Versions.props b/eng/Versions.props index c886b9d800ff..f2af65439c93 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,7 +44,7 @@ 4.5.0 4.5.5 4.5.1 - 7.0.2 + 8.0.5 7.0.0 7.0.0 4.3.0 @@ -64,7 +64,7 @@ - Feed URI in the nuget.config - Native assets build and sha --> - <_SkiaSharpVersion>2.88.2 + <_SkiaSharpVersion>2.88.6 <_HarfBuzzSharpVersion>2.8.2.2 <_SkiaSharpNativeAssetsVersion>0.0.0-commit.193b587552cb0ed39372a049d7e6c692db98c267.483 7.0.100-preview.5.22226.1 diff --git a/eng/Versions.targets b/eng/Versions.targets index 1b8398d1090a..23d7156384bc 100644 --- a/eng/Versions.targets +++ b/eng/Versions.targets @@ -64,13 +64,13 @@ - - + @(VersionMetadata -> '%(Identity)', '-') - +$(VersionMetadataLabel) + 0+$(VersionMetadataLabel) $(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch) $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel) $(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel).$(BUILDVERSION) @@ -79,6 +79,11 @@ $(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION) $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch).0 $(PackageReferenceVersion)$(VersionMetadataPlusLabel) + + $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch) + + $([System.IO.File]::ReadAllText($(MSBuildThisFileDirectory)../PreReleaseVersionSuffix.txt)) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(PreReleaseVersionSuffix) diff --git a/install_gtk_workload.sh b/install_gtk_workload.sh new file mode 100755 index 000000000000..86f3d8fea64d --- /dev/null +++ b/install_gtk_workload.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +# For some reason automatic workload manifest detection doesn't work (see https://github.com/GtkSharp/GtkSharp/issues/355#issuecomment-1446262239), so download and uzip mainfest file manually +dotnet nuget add source --name nuget.org "https://api.nuget.org/v3/index.json" +wget https://www.nuget.org/api/v2/package/gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion/$GtkSharpVersion -O gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion.nupkg +DOTNET_DIR=/home/runner/.dotnet +WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/$DotnetVersion/gtksharp.net.sdk.gtk +mkdir -p $WORKLOAD_MANIFEST_DIR +unzip -j gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion.nupkg "data/*" -d $WORKLOAD_MANIFEST_DIR/ +rm gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion.nupkg +chmod 764 $WORKLOAD_MANIFEST_DIR/* +dotnet workload search +dotnet workload install gtk --skip-manifest-update diff --git a/nugetPreRelease.fsx b/nugetPreRelease.fsx new file mode 100644 index 000000000000..71cadf764e97 --- /dev/null +++ b/nugetPreRelease.fsx @@ -0,0 +1,6 @@ +#r "nuget: Fsdk, Version=0.6.0--date20231213-0703.git-d7a5962" + +let args = fsi.CommandLineArgs + +Fsdk.Network.GetNugetPrereleaseVersionFromBaseVersion args.[1] +|> System.Console.WriteLine diff --git a/pack_mali.sh b/pack_mali.sh new file mode 100755 index 000000000000..234f585cf1b1 --- /dev/null +++ b/pack_mali.sh @@ -0,0 +1,11 @@ +#!/bin/env bash + +# Use PROJECTS_TO_PACK env. var for newline-separated list of projects. + +set -euxo pipefail + + +echo "$PROJECTS_TO_PACK" | while read -r project; do + [ -z "$project" ] && continue # Skip if empty + dotnet pack "$project" --no-build --no-restore +done diff --git a/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj b/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj index d3ab5b3d1c28..11de188bb700 100644 --- a/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj +++ b/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj @@ -2,6 +2,7 @@ $(_MauiDotNetTfm);$(MauiPlatforms) + Mali.AspNetCore.Components.WebView enable Build .NET MAUI applications with Blazor web UI in the BlazorWebView control. $(DefineConstants);WEBVIEW2_MAUI diff --git a/src/BlazorWebView/src/Maui/build/Microsoft.AspNetCore.Components.WebView.Maui.props b/src/BlazorWebView/src/Maui/build/Mali.AspNetCore.Components.WebView.props similarity index 100% rename from src/BlazorWebView/src/Maui/build/Microsoft.AspNetCore.Components.WebView.Maui.props rename to src/BlazorWebView/src/Maui/build/Mali.AspNetCore.Components.WebView.props diff --git a/src/BlazorWebView/src/Maui/build/Microsoft.AspNetCore.Components.WebView.Maui.targets b/src/BlazorWebView/src/Maui/build/Mali.AspNetCore.Components.WebView.targets similarity index 100% rename from src/BlazorWebView/src/Maui/build/Microsoft.AspNetCore.Components.WebView.Maui.targets rename to src/BlazorWebView/src/Maui/build/Mali.AspNetCore.Components.WebView.targets diff --git a/src/Compatibility/Core/src/Compatibility.csproj b/src/Compatibility/Core/src/Compatibility.csproj index 129d8548dd5a..a6345d6b22f0 100644 --- a/src/Compatibility/Core/src/Compatibility.csproj +++ b/src/Compatibility/Core/src/Compatibility.csproj @@ -3,6 +3,7 @@ netstandard2.1;netstandard2.0;$(_MauiDotNetTfm);$(MauiPlatforms) Microsoft.Maui.Controls.Compatibility Microsoft.Maui.Controls.Compatibility + Mali.Controls.Compatibility disable Android\ iOS\ diff --git a/src/Controls/Foldable/src/Controls.Foldable.csproj b/src/Controls/Foldable/src/Controls.Foldable.csproj index 05d41821f0c9..b5b72f3f839c 100644 --- a/src/Controls/Foldable/src/Controls.Foldable.csproj +++ b/src/Controls/Foldable/src/Controls.Foldable.csproj @@ -3,6 +3,7 @@ $(_MauiDotNetTfm);$(MauiPlatforms) Microsoft.Maui.Controls.Foldable Microsoft.Maui.Controls.Foldable + Mali.Controls.Foldable BI1234 false true diff --git a/src/Controls/src/Core/Controls.Core.csproj b/src/Controls/src/Core/Controls.Core.csproj index c9d57ec781b0..a9b8303173b0 100644 --- a/src/Controls/src/Core/Controls.Core.csproj +++ b/src/Controls/src/Core/Controls.Core.csproj @@ -4,7 +4,7 @@ netstandard2.1;netstandard2.0;$(_MauiDotNetTfm);$(MauiPlatforms) Microsoft.Maui.Controls Microsoft.Maui.Controls - Microsoft.Maui.Controls.Core + Mali.Controls.Core enable true false diff --git a/src/Controls/src/Xaml/Controls.Xaml.csproj b/src/Controls/src/Xaml/Controls.Xaml.csproj index fdbdb523d462..51a877393de2 100644 --- a/src/Controls/src/Xaml/Controls.Xaml.csproj +++ b/src/Controls/src/Xaml/Controls.Xaml.csproj @@ -4,11 +4,11 @@ netstandard2.1;netstandard2.0;$(_MauiDotNetTfm);$(MauiPlatforms) Microsoft.Maui.Controls.Xaml Microsoft.Maui.Controls.Xaml + Mali.Controls.Xaml true false <_MauiDesignDllBuild Condition=" '$(OS)' != 'Unix' ">True $(NoWarn);CA2200;CS1591;RS0041 - Microsoft.Maui.Controls.Xaml true diff --git a/src/Core/src/Core.csproj b/src/Core/src/Core.csproj index 82797bf897c2..c531b1533f03 100644 --- a/src/Core/src/Core.csproj +++ b/src/Core/src/Core.csproj @@ -4,7 +4,7 @@ netstandard2.1;netstandard2.0;$(_MauiDotNetTfm);$(MauiPlatforms) Microsoft.Maui Microsoft.Maui - Microsoft.Maui.Core + Mali.Core enable true false diff --git a/src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.After.targets b/src/Core/src/nuget/buildTransitive/Mali.Core.After.targets similarity index 100% rename from src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.After.targets rename to src/Core/src/nuget/buildTransitive/Mali.Core.After.targets diff --git a/src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.Before.targets b/src/Core/src/nuget/buildTransitive/Mali.Core.Before.targets similarity index 100% rename from src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.Before.targets rename to src/Core/src/nuget/buildTransitive/Mali.Core.Before.targets diff --git a/src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.props b/src/Core/src/nuget/buildTransitive/Mali.Core.props similarity index 100% rename from src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.props rename to src/Core/src/nuget/buildTransitive/Mali.Core.props diff --git a/src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.targets b/src/Core/src/nuget/buildTransitive/Mali.Core.targets similarity index 56% rename from src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.targets rename to src/Core/src/nuget/buildTransitive/Mali.Core.targets index 337db9f84f00..33c25d60f90a 100644 --- a/src/Core/src/nuget/buildTransitive/Microsoft.Maui.Core.targets +++ b/src/Core/src/nuget/buildTransitive/Mali.Core.targets @@ -4,10 +4,10 @@ true - + - $(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)Microsoft.Maui.Core.After.targets + $(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)Mali.Core.After.targets \ No newline at end of file diff --git a/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.props b/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.props similarity index 85% rename from src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.props rename to src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.props index 28406ccb7d5e..94b7aad480ca 100644 --- a/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.props +++ b/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.props @@ -7,6 +7,6 @@ false - + \ No newline at end of file diff --git a/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.targets b/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.targets new file mode 100644 index 000000000000..b4d8d14f9381 --- /dev/null +++ b/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.targets @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.targets b/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.targets deleted file mode 100644 index 05f86306a1d3..000000000000 --- a/src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.targets +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/Essentials/src/Essentials.csproj b/src/Essentials/src/Essentials.csproj index 4c0542d4d7db..acd47f8cf04f 100644 --- a/src/Essentials/src/Essentials.csproj +++ b/src/Essentials/src/Essentials.csproj @@ -3,6 +3,7 @@ netstandard2.1;netstandard2.0;$(_MauiDotNetTfm);$(MauiPlatforms) Microsoft.Maui.Essentials Microsoft.Maui.Essentials + Mali.Essentials false BI1234 true diff --git a/src/Graphics/src/Graphics/Graphics.csproj b/src/Graphics/src/Graphics/Graphics.csproj index 70f3e6376e51..5c54ff047eb2 100644 --- a/src/Graphics/src/Graphics/Graphics.csproj +++ b/src/Graphics/src/Graphics/Graphics.csproj @@ -9,7 +9,7 @@ snupkg Microsoft.Maui.Graphics Microsoft.Maui.Graphics - Microsoft.Maui.Graphics + Mali.Graphics Microsoft.Maui.Graphics false true