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 Apr 11, 2022
1 parent 55b0ecd commit 6ab379f
Show file tree
Hide file tree
Showing 21 changed files with 151 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Essentials/src/Essentials.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;$(_MauiDotNetTfm);$(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", "Windows", "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>DOTNET_TFM-android;DOTNET_TFM-ios;DOTNET_TFM-maccatalyst</TargetFrameworks>
<TargetFrameworks>DOTNET_TFM-android;DOTNET_TFM-ios;DOTNET_TFM-maccatalyst;DOTNET_TFM-tizen</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);DOTNET_TFM-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp._1</RootNamespace>
Expand All @@ -26,6 +26,7 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == '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 (XAML) (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 (XAML) (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", "Windows" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "Windows", "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>DOTNET_TFM;DOTNET_TFM-android;DOTNET_TFM-ios;DOTNET_TFM-maccatalyst</TargetFrameworks>
<TargetFrameworks>DOTNET_TFM;DOTNET_TFM-android;DOTNET_TFM-ios;DOTNET_TFM-maccatalyst;DOTNET_TFM-tizen</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);DOTNET_TFM-windows10.0.19041.0</TargetFrameworks>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">MauiLib1</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -13,6 +13,7 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == '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", "Windows" ],
"classifications": [ "MAUI", "Android", "iOS", "macOS", "Mac Catalyst", "Windows", "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>DOTNET_TFM-android;DOTNET_TFM-ios;DOTNET_TFM-maccatalyst</TargetFrameworks>
<TargetFrameworks>DOTNET_TFM-android;DOTNET_TFM-ios;DOTNET_TFM-maccatalyst;DOTNET_TFM-tizen</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);DOTNET_TFM-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp._1</RootNamespace>
Expand All @@ -25,6 +25,7 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == '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 @@ -33,5 +33,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>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 @@ -105,6 +105,21 @@
"Microsoft.Maui.Essentials.Runtime.win",
"Microsoft.Maui.Graphics.Win2D.WinUI.Desktop"
]
},
"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 @@ -132,6 +147,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 @@ -152,6 +171,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 @@ -172,6 +195,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 @@ -192,6 +219,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Dependencies": {
"kind": "library",
"version": "@VERSION@"
Expand All @@ -216,6 +247,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 @@ -236,6 +271,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`

`maui-android` simply extends the `android` workload, adding the
Android-specific platform implementation for MAUI.
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="net$(_MauiDotNetVersion)-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 6ab379f

Please sign in to comment.