Skip to content

Commit

Permalink
feat: Tizen project template
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund authored and jeromelaban committed Nov 5, 2020
1 parent 47b6c76 commit 6d46e18
Show file tree
Hide file tree
Showing 12 changed files with 163 additions and 6 deletions.
6 changes: 5 additions & 1 deletion build/run-template-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function Get-TemplateConfiguration(
[bool]$wasm = $false,
[bool]$skiaGtk = $false,
[bool]$skiaWpf = $false,
[bool]$skiaTizen = $false,
[bool]$wasmVsCode = $false)
{
$uwpFlag = '-uwp'
Expand All @@ -26,6 +27,7 @@ function Get-TemplateConfiguration(
$wasmVsCodeFlag = '--vscodeWasm'
$skiaWpfFlag = '--skia-wpf'
$skiaGtkFlag = '--skia-gtk'
$skiaTizenFlag = '--skia-tizen'

$a = If ($uwp) { $uwpFlag } Else { $uwpFlag + '=false' }
$b = If ($android) { $androidFlag } Else { $androidFlag + '=false' }
Expand All @@ -35,8 +37,9 @@ function Get-TemplateConfiguration(
$f = If ($wasmVsCode) { $wasmVsCodeFlag } Else { $wasmVsCodeFlag + '=false' }
$g = If ($skiaWpf) { $skiaWpfFlag } Else { $skiaWpfFlag + '=false' }
$h = If ($skiaGtk) { $skiaGtkFlag } Else { $skiaGtkFlag + '=false' }
$i = If ($skiaTizen) { $skiaTizenFlag } Else { $skiaGtkTizen + '=false' }

@($a, $b, $c, $d, $e, $f, $g, $h)
@($a, $b, $c, $d, $e, $f, $g, $h, $i)
}

$msbuild = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
Expand All @@ -59,6 +62,7 @@ $templateConfigurations =
(Get-TemplateConfiguration -wasm 1),
(Get-TemplateConfiguration -skiaGtk 1),
(Get-TemplateConfiguration -skiaWpf 1)
(Get-TemplateConfiguration -skiaGtk 1)
)

$configurations =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
}
var platforms = new string[] { "iOS", "UWP", "Wasm", "Droid", "macOS", "Shared", "Skia.Gtk", "Skia.WPF", "Skia.WPF.Host" };
var platforms = new string[] { "iOS", "UWP", "Wasm", "Droid", "macOS", "Shared", "Skia.Gtk", "Skia.WPF", "Skia.WPF.Host", "Skia.Tizen" };
foreach(var platform in platforms)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"Android",
"iOS",
"Windows",
"macOS"
"macOS",
"Linux",
"Tizen"
],
"name": "Cross-Platform App (Uno Platform)",
"identity": "Uno.Platform.UnoApp",
Expand Down Expand Up @@ -124,6 +126,12 @@
"defaultValue": "true",
"description": "Enables the Skia/GTK platform support project"
},
"skia-tizen": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true",
"description": "Enables the Skia/Tizen platform support project"
},
"vscodeWasm": {
"type": "parameter",
"dataType": "bool",
Expand Down Expand Up @@ -157,15 +165,19 @@
},
{
"condition": "skia-gtk",
"path": "UnoQuickStart.macOS\\UnoQuickStart.Skia.Gtk.csproj"
"path": "UnoQuickStart.Skia.Gtk\\UnoQuickStart.Skia.Gtk.csproj"
},
{
"condition": "skia-wpf",
"path": "UnoQuickStart.macOS\\UnoQuickStart.Skia.WPF.csproj"
"path": "UnoQuickStart.Skia.WPF\\UnoQuickStart.Skia.WPF.csproj"
},
{
"condition": "skia-wpf",
"path": "UnoQuickStart.macOS\\UnoQuickStart.Skia.WPF.Host.csproj"
"path": "UnoQuickStart.Skia.WPF.Host\\UnoQuickStart.Skia.WPF.Host.csproj"
},
{
"condition": "skia-tizen",
"path": "UnoQuickStart.Skia.Tizen\\UnoQuickStart.Skia.Tizen.csproj"
}
],
"sources": [
Expand Down Expand Up @@ -214,6 +226,12 @@
"UnoQuickStart.Skia.WPF.Host/**/*"
]
},
{
"condition": "(!skia-tizen)",
"exclude": [
"UnoQuickStart.Skia.Tizen/**/*"
]
},
{
"condition": "(!vscodeWasm)",
"exclude": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoQuickStart.Skia.Wpf.Host
EndProject
#//#endif

#//#if (skia-tizen)
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoQuickStart.Skia.Tizen", "UnoQuickStart.Skia.Tizen\UnoQuickStart.Skia.Tizen.csproj", "{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}"
EndProject
#//#endif

Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
UnoQuickStart.Shared\UnoQuickStart.Shared.projitems*{$guid2$}*SharedItemsImports = 4
Expand Down Expand Up @@ -280,6 +285,35 @@ Global
{A5B8155A-118F-4794-B551-C6F3CF7E5411}.Release|x86.ActiveCfg = Release|Any CPU
{A5B8155A-118F-4794-B551-C6F3CF7E5411}.Release|x86.Build.0 = Release|Any CPU

{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|ARM.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|ARM64.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|iPhone.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|x64.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|x64.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|x86.ActiveCfg = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Debug|x86.Build.0 = Debug|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|Any CPU.Build.0 = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|ARM.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|ARM.Build.0 = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|ARM64.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|ARM64.Build.0 = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|iPhone.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|iPhone.Build.0 = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|x64.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|x64.Build.0 = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|x86.ActiveCfg = Release|Any CPU
{9AED22A6-77DC-4799-BAE7-5F26F2070BD2}.Release|x86.Build.0 = Release|Any CPU

{6CF284A4-22B1-4F05-97F4-F095C07A598E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CF284A4-22B1-4F05-97F4-F095C07A598E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CF284A4-22B1-4F05-97F4-F095C07A598E}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down
Binary file not shown.
14 changes: 14 additions & 0 deletions src/SolutionTemplate/UnoSolutionTemplate/Skia.Tizen/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Tizen.Applications;
using Uno.UI.Runtime.Skia;

namespace $ext_safeprojectname$.Skia.Tizen
{
class Program
{
static void Main(string[] args)
{
var host = new TizenHost(() => new $ext_safeprojectname$.App(), args);
host.Run();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>UnoQuickStart.Skia.Tizen</Name>
<Description>No Description</Description>
<Icon>__TemplateIcon.png</Icon>
<PreviewImage>__PreviewImage.png</PreviewImage>
<ProjectType>CSharp</ProjectType>
<ProjectSubType />
<SortOrder>1000</SortOrder>
<DefaultName>UnoQuickStart.Skia.Tizen</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<LocationField>Enabled</LocationField>
<CreateInPlace>true</CreateInPlace>
</TemplateData>
<TemplateContent>
<Project File="UnoQuickStart.Skia.Tizen.csproj" TargetFileName="$ext_safeprojectname$.Skia.Tizen.csproj" ReplaceParameters="true">
<Folder Name="Assets" TargetFolderName="Assets">
<Folder Name="Fonts" TargetFolderName="Fonts">
<ProjectItem TargetFileName="uno-fluentui-assets.ttf" ReplaceParameters="false">uno-fluentui-assets.ttf</ProjectItem>
</Folder>
</Folder>
<Folder Name="shared" TargetFolderName="shared">
<Folder Name="res" TargetFolderName="res">
<ProjectItem ReplaceParameters="false" TargetFileName="Icon.png">Icon.png</ProjectItem>
</Folder>
</Folder>
<ProjectItem TargetFileName="Program.cs" ReplaceParameters="true">Program.cs</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Tizen.NET.Sdk/1.0.9">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>tizen50</TargetFramework>
<OutputType>Exe</OutputType>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Folder Include="lib\" />
<Folder Include="res\" />
</ItemGroup>

<ItemGroup Condition="exists('..\$ext_safeprojectname$.UWP')">
<EmbeddedResource Include="..\$ext_safeprojectname$.UWP\Package.appxmanifest" LogicalName="Package.appxmanifest" />
<Content Include="..\$ext_safeprojectname$.UWP\Assets\StoreLogo.png" Link="Assets\StoreLogo.png" />
</ItemGroup>

<ItemGroup>
<UpToDateCheckInput Include="..\$ext_safeprojectname$.Shared\**\*.xaml" />
</ItemGroup>

<ItemGroup>
<!-- Note that for WebAssembly version 1.1.1 of the console logger required -->
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="Uno.UI.Skia.Tizen" Version="3.0.0-dev.1447" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.0.0-dev.1447" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>

<Import Project="..\$ext_safeprojectname$.Shared\$ext_safeprojectname$.Shared.projitems" Label="Shared" />

</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://tizen.org/ns/packages" api-version="5" package="com.example.$ext_safeprojectname$.Skia.Tizen" version="1.0.0">
<profile name="common" />
<ui-application appid="com.example.$ext_safeprojectname$.Skia.Tizen"
exec="$ext_safeprojectname$.Skia.Tizen.dll"
type="dotnet"
multiple="false"
taskmanage="true"
nodisplay="false"
launch_mode="single">
<label>$ext_safeprojectname$.Skia.Tizen</label>
<icon>Icon.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="false" />
</ui-application>
</manifest>
2 changes: 2 additions & 0 deletions src/SolutionTemplate/UnoSolutionTemplate/UnoApp.vstemplate
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PlatformTag>Windows</PlatformTag>
<PlatformTag>macOS</PlatformTag>
<PlatformTag>web</PlatformTag>
<PlatformTag>Tizen</PlatformTag>
<ProjectTypeTag>mobile</ProjectTypeTag>
<ProjectTypeTag>UWP</ProjectTypeTag>
<ProjectTypeTag>WebAssembly</ProjectTypeTag>
Expand All @@ -37,6 +38,7 @@
<ProjectTemplateLink ProjectName="$projectname$.Skia.Wpf.Host" CopyParameters="true">Skia.Wpf.Host\SkiaWpfHost.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$projectname$.Skia.Wpf" CopyParameters="true">Skia.Wpf\SkiaWpf.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$projectname$.Skia.Gtk" CopyParameters="true">Skia.Gtk\SkiaGtk.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$projectname$.Skia.Tizen" CopyParameters="true">Skia.Tizen\SkiaTizen.vstemplate</ProjectTemplateLink>
</ProjectCollection>
</TemplateContent>
<WizardExtension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Skia.Tizen\Program.cs" />
<None Include="Skia.Tizen\UnoQuickStart.Skia.Tizen.csproj" />
<None Include="Skia.WPF\Program.cs" />
<None Include="Skia.WPF.Host\App.xaml.cs" />
<None Include="Skia.WPF.Host\MainWindow.xaml.cs" />
Expand Down Expand Up @@ -237,6 +239,9 @@
<None Include="Skia.Gtk\SkiaGtk.vstemplate">
<SubType>Designer</SubType>
</None>
<Content Include="Skia.Tizen\shared\res\Icon.png" />
<Content Include="Skia.Tizen\SkiaTizen.vstemplate" />
<Content Include="Skia.Tizen\tizen-manifest.xml" />
<Content Include="UWP\Assets\LockScreenLogo.scale-200.png" />
<Content Include="UWP\Assets\SplashScreen.scale-200.png" />
<Content Include="UWP\Assets\Square150x150Logo.scale-200.png" />
Expand Down

0 comments on commit 6d46e18

Please sign in to comment.