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 Sep 1, 2021
1 parent 789d0be commit b032527
Show file tree
Hide file tree
Showing 21 changed files with 148 additions and 16 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",
"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
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-blazor/MauiApp1.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-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net6.0-ios;net6.0-android;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>MauiApp1</RootNamespace>
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#)",
"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",
"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#)",
"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",
"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",
Expand Down
4 changes: 2 additions & 2 deletions 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-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net6.0;net6.0-ios;net6.0-android;net6.0-maccatalyst;net6.0-tizen</TargetFrameworks>
<!-- <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks> -->
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">MauiLib1</RootNamespace>
Expand All @@ -13,4 +13,4 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="WINDOWSAPPSDK_VERSION" />
</ItemGroup>

</Project>
</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",
"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
2 changes: 1 addition & 1 deletion src/Templates/src/templates/maui-mobile/MauiApp1.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net6.0-ios;net6.0-android;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>MauiApp1</RootNamespace>
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 @@ -11,7 +11,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
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@
<PackageReference Include="Microsoft.WindowsAppSDK.InteractiveExperiences" NoWarn="NU1701" />
<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>
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 @@ -96,6 +96,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 @@ -123,6 +138,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 @@ -143,6 +162,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 @@ -163,6 +186,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 @@ -183,6 +210,10 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.tizen": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Dependencies": {
"kind": "library",
"version": "@VERSION@"
Expand All @@ -207,6 +238,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 @@ -227,6 +262,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`

Eventually, Android will have a `microsoft-android-sdk-minimal`
workload id that excludes AOT compilers. We'll need to modify some of
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-windows10.0.18362"
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=" '$(BuildForWinUI)' == 'true' or '$(Packing)' == 'true' " />
</ItemGroup>

Expand Down

0 comments on commit b032527

Please sign in to comment.