Skip to content

Commit

Permalink
MAUI workload for Tizen (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiejava committed Nov 23, 2021
1 parent 87f996b commit e79cd97
Show file tree
Hide file tree
Showing 21 changed files with 150 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Essentials/src/Essentials-net6.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.Net.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net6.0;$(MauiPlatforms)</TargetFrameworks>
<AssemblyName>Microsoft.Maui.Essentials</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Blazor" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen", "Blazor" ],
"identity": "Microsoft.Maui.BlazorApp",
"groupIdentity": "Microsoft.Maui.BlazorApp",
"name": ".NET MAUI Blazor App (Preview)",
"description": "A project for creating a .NET MAUI application for iOS, Android, Mac Catalyst, and WinUI using Blazor",
"description": "A project for creating a .NET MAUI application for iOS, Android, Mac Catalyst, WinUI, and Tizen using Blazor",
"shortName": "maui-blazor",
"tags": {
"language": "C#",
Expand Down
3 changes: 2 additions & 1 deletion src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst;net6.0-tizen</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp._1</RootNamespace>
Expand All @@ -28,6 +28,7 @@
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility;

namespace MauiApp1
{
class Program : MauiApplication<Startup>
{
protected override void OnCreate()
{
base.OnCreate();
}

static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.companyname.MauiApp1" version="1.0.0" api-version="8" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="com.companyname.MauiApp1" exec="MauiApp1.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>MauiApp1</label>
<icon>appicon.xhigh.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Xaml", "Code" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen", "Xaml", "Code" ],
"identity": "Microsoft.Maui.CSharpContentPage",
"name": ".NET MAUI ContentPage (C#) (Preview)",
"shortName": "maui-page-csharp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Xaml", "Code" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen", "Xaml", "Code" ],
"identity": "Microsoft.Maui.XamlContentPage",
"name": ".NET MAUI ContentPage (Preview)",
"shortName": "maui-page-xaml",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Xaml", "Code" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen", "Xaml", "Code" ],
"identity": "Microsoft.Maui.CSharpContentView",
"name": ".NET MAUI ContentView (C#) (Preview)",
"shortName": "maui-view-csharp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Xaml", "Code" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen", "Xaml", "Code" ],
"identity": "Microsoft.Maui.XamlContentView",
"name": ".NET MAUI ContentView (Preview)",
"shortName": "maui-view-xaml",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen" ],
"identity": "Microsoft.Maui.MauiLib",
"groupIdentity": "Microsoft.Maui.Library",
"name": ".NET MAUI Class Library (Preview)",
Expand Down
3 changes: 2 additions & 1 deletion src/Templates/src/templates/maui-lib/MauiLib1.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst;net6.0-tizen</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">MauiLib1</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -13,6 +13,7 @@
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace MauiLib1
{
// All the code in this file is only included on Tizen.
public class PlatformClass1
{
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Microsoft",
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "WinUI", "Tizen" ],
"identity": "Microsoft.Maui.MauiApp",
"groupIdentity": "Microsoft.Maui.App",
"name": ".NET MAUI App (Preview)",
"description": "A project for creating a .NET MAUI application for iOS, Android, Mac Catalyst, and WinUI",
"description": "A project for creating a .NET MAUI application for iOS, Android, Mac Catalyst, WinUI and Tizen",
"shortName": "maui",
"tags": {
"language": "C#",
Expand Down
3 changes: 2 additions & 1 deletion src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst;net6.0-tizen</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp._1</RootNamespace>
Expand All @@ -27,6 +27,7 @@
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility;

namespace MauiApp1
{
class Program : MauiApplication<Startup>
{
protected override void OnCreate()
{
base.OnCreate();
}

static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.companyname.MauiApp1" version="1.0.0" api-version="8" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="com.companyname.MauiApp1" exec="MauiApp1.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>MauiApp1</label>
<icon>appicon.xhigh.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Graphics.Win2D" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'tizen'" >
<PackageReference Include="Tizen.UIExtensions.ElmSharp" Version="[0.4.0-pre1, )" />
<PackageReference Include="Microsoft.Maui.Graphics.Skia" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<!-- Framework references -->
<ItemGroup>
<_MauiRuntimeIdentifiers Include="android;ios;maccatalyst;win" />
<_MauiRuntimeIdentifiers Include="android;ios;maccatalyst;win;tizen" />
<KnownFrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' "
Include="Microsoft.Maui.Core"
Expand Down
39 changes: 39 additions & 0 deletions src/Workload/Microsoft.NET.Sdk.Maui/WorkloadManifest.in.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@
"Microsoft.Maui.Essentials.Ref.win",
"Microsoft.Maui.Essentials.Runtime.win"
]
},
"maui-tizen": {
"description": ".NET MAUI SDK for Tizen",
"extends": [
"maui-core",
"tizen"
],
"packs": [
"Microsoft.Maui.Core.Ref.tizen",
"Microsoft.Maui.Core.Runtime.tizen",
"Microsoft.Maui.Controls.Ref.tizen",
"Microsoft.Maui.Controls.Runtime.tizen",
"Microsoft.Maui.Essentials.Ref.tizen",
"Microsoft.Maui.Essentials.Runtime.tizen"
]
}
},
"packs": {
Expand Down Expand Up @@ -131,6 +146,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Ref.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Runtime.any": {
"kind": "framework",
"version": "@VERSION@"
Expand All @@ -151,6 +170,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Runtime.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Ref.any": {
"kind": "framework",
"version": "@VERSION@"
Expand All @@ -171,6 +194,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Ref.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.any": {
"kind": "framework",
"version": "@VERSION@"
Expand All @@ -191,6 +218,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Dependencies": {
"kind": "library",
"version": "@VERSION@"
Expand All @@ -215,6 +246,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Ref.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Runtime.any": {
"kind": "framework",
"version": "@VERSION@"
Expand All @@ -235,6 +270,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Runtime.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Extensions": {
"kind": "library",
"version": "@VERSION@"
Expand Down
1 change: 1 addition & 0 deletions src/Workload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ installed:
* `maui-maccatalyst`
* `maui-macos`
* `maui-windows`
* `maui-tizen`

Android has an `android` workload id that excludes AOT compilers, so
`maui-android` will extend this. `android-aot` includes AOT support.
Expand Down
9 changes: 8 additions & 1 deletion src/Workload/Shared/Frameworks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@
Tfm="net6.0-windows$(WindowsTargetFrameworkVersion)"
Profile="Windows"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'tizen' "
Include="net6.0-tizen6.5"
FullTfm="%(Identity)"
Tfm="net6.0-tizen"
Profile="Tizen"
/>
</ItemGroup>

<Import Condition=" '$(MauiPlatformName)' != '' " Project="FrameworkList.targets" />

<ItemGroup>
<_Platforms Include="any;android;maccatalyst;ios" />
<_Platforms Include="any;android;maccatalyst;ios;tizen" />
<_Platforms Include="win" Condition="'$(IncludeWindowsTargetFrameworks)' == 'true'" />
</ItemGroup>

Expand Down

0 comments on commit e79cd97

Please sign in to comment.