Skip to content

Commit 0277641

Browse files
authored
.NET 6 Android Windowing support (#586)
* Initial pass of adding .NET 6 support for sustaining * Get packaging working properly (afiak) * lol * SilkTouch: Stop making managed conv assumptions (.NET 5+), short names * Triangle on .NET 6 on Android now works * Fix old android lab app for fullscreen * Fix bad ifdef * CI fix? * Review fixes
1 parent 8824e51 commit 0277641

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+854
-372
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ jobs:
1313
- uses: actions/checkout@v2
1414
with:
1515
submodules: 'true'
16+
- name: Setup .NET 6.0
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 6.0.100-preview.7.21379.14
1620
- name: Setup .NET 5.0
1721
uses: actions/setup-dotnet@v1
1822
with:
@@ -23,6 +27,9 @@ jobs:
2327
dotnet-version: 3.1.404
2428
- name: Setup NUKE
2529
run: dotnet tool install Nuke.GlobalTool --global
30+
- name: Install Workloads
31+
# TODO: This is slow. Maybe we can make a docker container with this already done?
32+
run: dotnet workload install android android-aot ios maccatalyst maui
2633
- name: Test
2734
# skip Clean, Restore, and Compile as this will build the affect the whole solution.
2835
# dotnet test will compile the necessary projects for testing only.
@@ -31,7 +38,7 @@ jobs:
3138
run: nuke ValidateSolution
3239
- name: Pack
3340
# TODO build native mixins such as BuildLibSilkDroid
34-
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true --feature-sets Android iOS
41+
run: nuke Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true --feature-sets Legacy-Android Legacy-iOS
3542
- name: Push to NuGet
3643
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
3744
run: nuke PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://pkgs.dev.azure.com/UltzOS/Silk.NET/_packaging/Experimental/nuget/v3/index.json --nuget-username ${{ secrets.AZDO_ARTIFACTS_USERNAME }} --nuget-password ${{ secrets.AZDO_ARTIFACTS_TOKEN }} --nuget-api-key az

.github/workflows/deploy.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,27 @@ jobs:
1212
- uses: actions/checkout@v2
1313
with:
1414
submodules: 'true'
15-
- name: Setup .NET Core
15+
- name: Setup .NET 6.0
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: 6.0.100-preview.7.21379.14
19+
- name: Setup .NET 5.0
1620
uses: actions/setup-dotnet@v1
1721
with:
1822
dotnet-version: 5.0.201
23+
- name: Setup .NET Core 3.1
24+
uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 3.1.404
27+
- name: Setup NUKE
28+
run: dotnet tool install Nuke.GlobalTool --global
29+
- name: Install Workloads
30+
# TODO: This is slow. Maybe we can make a docker container with this already done?
31+
run: dotnet workload install android android-aot ios maccatalyst maui
1932
- name: Setup NUKE
2033
run: dotnet tool install Nuke.GlobalTool --global
2134
- name: Pack
22-
run: nuke Pack --msbuild-properties ContinuousIntegrationBuild=true SilkEnableSourceLink=true --feature-sets Android iOS
35+
run: nuke Pack --msbuild-properties ContinuousIntegrationBuild=true SilkEnableSourceLink=true --feature-sets Legacy-Android Legacy-iOS
2336
- name: Upload Unsigned Artifacts to Actions
2437
uses: actions/upload-artifact@v2.2.4
2538
with:

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,21 @@ In addition, the Silk.NET working group help drive larger user-facing changes pr
5454

5555
<h1 align="center">Building from source</h1>
5656

57-
- Make sure you have at least the .NET 5 SDK installed, preferably with Visual Studio's .NET Framework and Xamarin workloads too.
58-
- Clone the repository
59-
- Run build.sh, build.cmd, build.ps1, or `nuke build`. To build for iOS and Android, add the `--feature-sets ios android` arguments.
57+
Prerequisites
58+
- **Must**: .NET 6 SDK
59+
- **Should**: Android (w/ AOT), iOS, and MAUI .NET 6 workloads (use `dotnet workload install android android-aot ios maui` to install them)
60+
- **Should**: Android SDK version 30 with NDK tools installed
61+
- **Could**: Java JDK (for gradle)
62+
- **Could**: Visual Studio 2019 Community version 16.10 or later
63+
64+
Instructions
65+
- Clone the repository (recursively)
66+
- Run build.sh, build.cmd, build.ps1, or `nuke compile`. By default all packages targeting .NET Core, Standard, or .NET 6 are built. To build our older Xamarin iOS and Android packages, add the `--feature-sets legacy-ios legacy-android` arguments.
67+
- Use the DLLs. To get nupkgs you can use with NuGet instead, use `nuke pack`.
6068

6169
There are more advanced build actions you can do too, such as FullBuild, Pack, FullPack, among others which you can view by doing `nuke --plan`.
6270

63-
Some projects may not build properly without being configured to use Desktop MSBuild (i.e. the MSBuild shipped with Visual Studio). As a result, you will ideally need to be on Windows and have Visual Studio 2019 Community (or greater) installed with .NET Core and Xamarin workloads. If you don't have this (i.e. because you're on Linux or Mac), you can still develop Silk.NET in a limited capacity but you will not be able to work on mobile workloads.
71+
The older Xamarin projects will not build properly without being configured to use Desktop MSBuild (i.e. the MSBuild shipped with Visual Studio). As a result, you will ideally need to be on Windows and have Visual Studio 2019 Community (v16.10 or greater) installed with .NET Core and Xamarin workloads. If you don't have this (i.e. because you're on Linux or Mac), you won't be able to build the older Xamarin packages.
6472

6573
<h1 align="center">Contributing</h1>
6674

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy