Skip to content

Commit 92174ae

Browse files
committed
chore: Adding GTK target
1 parent aed83d1 commit 92174ae

File tree

5 files changed

+185
-0
lines changed

5 files changed

+185
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<Package
4+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
5+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
6+
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
7+
IgnorableNamespaces="uap rescap">
8+
9+
<Identity
10+
Name="UnoCakesMobile"
11+
Publisher="O=UnoCakesMobile"
12+
Version="1.0.0.0" />
13+
14+
<Properties>
15+
<DisplayName>UnoCakesMobile</DisplayName>
16+
<PublisherDisplayName>UnoCakesMobile</PublisherDisplayName>
17+
</Properties>
18+
19+
<Dependencies>
20+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
21+
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
22+
</Dependencies>
23+
24+
<Resources>
25+
<Resource Language="x-generate"/>
26+
</Resources>
27+
28+
<Applications>
29+
<Application Id="App"
30+
Executable="$targetnametoken$.exe"
31+
EntryPoint="$targetentrypoint$">
32+
<uap:VisualElements
33+
DisplayName="UnoCakesMobile"
34+
Description="UnoCakesMobile">
35+
<uap:SplashScreen />
36+
</uap:VisualElements>
37+
</Application>
38+
</Applications>
39+
40+
<Capabilities>
41+
<rescap:Capability Name="runFullTrust" />
42+
</Capabilities>
43+
</Package>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using GLib;
3+
using Uno.UI.Runtime.Skia.Gtk;
4+
5+
namespace UnoCakesMobile.Skia.Gtk;
6+
7+
public class Program
8+
{
9+
public static void Main(string[] args)
10+
{
11+
ExceptionManager.UnhandledException += delegate (UnhandledExceptionArgs expArgs)
12+
{
13+
Console.WriteLine("GLIB UNHANDLED EXCEPTION" + expArgs.ExceptionObject.ToString());
14+
expArgs.ExitApplication = true;
15+
};
16+
17+
var host = new GtkHost(() => new AppHead());
18+
19+
host.Run();
20+
}
21+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType Condition="'$(Configuration)'=='Release'">WinExe</OutputType>
4+
<OutputType Condition="'$(Configuration)'=='Debug'">Exe</OutputType>
5+
<TargetFramework>net7.0</TargetFramework>
6+
<ApplicationManifest>app.manifest</ApplicationManifest>
7+
</PropertyGroup>
8+
<ItemGroup>
9+
<EmbeddedResource Include="Package.appxmanifest" />
10+
<Manifest Include="$(ApplicationManifest)" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<PackageReference Include="Uno.WinUI.Skia.Gtk" />
15+
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
16+
<PackageReference Include="SkiaSharp.Views.Uno.WinUI" />
17+
<PackageReference Include="SkiaSharp.Skottie" />
18+
<PackageReference Include="Uno.WinUI.DevServer" Condition="'$(Configuration)'=='Debug'" />
19+
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />
20+
</ItemGroup>
21+
<ItemGroup>
22+
<ProjectReference Include="..\UnoCakesMobile\UnoCakesMobile.csproj" />
23+
</ItemGroup>
24+
<Import Project="..\UnoCakesMobile.Base\base.props" />
25+
</Project>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3+
<assemblyIdentity version="1.0.0.0" name="UnoCakesMobile.Gtk"/>
4+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5+
<security>
6+
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7+
<!-- UAC Manifest Options
8+
If you want to change the Windows User Account Control level replace the
9+
requestedExecutionLevel node with one of the following.
10+
11+
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
12+
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
13+
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
14+
15+
Specifying requestedExecutionLevel element will disable file and registry virtualization.
16+
Remove this element if your application requires this virtualization for backwards
17+
compatibility.
18+
-->
19+
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
20+
</requestedPrivileges>
21+
</security>
22+
</trustInfo>
23+
24+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
25+
<application>
26+
<!-- A list of the Windows versions that this application has been tested on
27+
and is designed to work with. Uncomment the appropriate elements
28+
and Windows will automatically select the most compatible environment. -->
29+
30+
<!-- Windows Vista -->
31+
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
32+
33+
<!-- Windows 7 -->
34+
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
35+
36+
<!-- Windows 8 -->
37+
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
38+
39+
<!-- Windows 8.1 -->
40+
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
41+
42+
<!-- Windows 10 -->
43+
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
44+
45+
</application>
46+
</compatibility>
47+
48+
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
49+
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
50+
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
51+
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
52+
53+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
54+
<windowsSettings>
55+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
56+
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
57+
</windowsSettings>
58+
</application>
59+
60+
61+
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
62+
<!--
63+
<dependency>
64+
<dependentAssembly>
65+
<assemblyIdentity
66+
type="win32"
67+
name="Microsoft.Windows.Common-Controls"
68+
version="6.0.0.0"
69+
processorArchitecture="*"
70+
publicKeyToken="6595b64144ccf1df"
71+
language="*"
72+
/>
73+
</dependentAssembly>
74+
</dependency>
75+
-->
76+
77+
</assembly>

UI/UnoCakesMobile/UnoCakesMobile.sln

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2222
Directory.Packages.props = Directory.Packages.props
2323
EndProjectSection
2424
EndProject
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoCakesMobile.Skia.Gtk", "UnoCakesMobile.Skia.Gtk\UnoCakesMobile.Skia.Gtk.csproj", "{3D097878-DADE-435F-9F6F-BE03F2285110}"
26+
EndProject
2527
Global
2628
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2729
Debug|Any CPU = Debug|Any CPU
@@ -114,6 +116,22 @@ Global
114116
{5F6366B6-DB08-42AD-9429-412FD085A5E7}.Release|x64.Build.0 = Release|Any CPU
115117
{5F6366B6-DB08-42AD-9429-412FD085A5E7}.Release|x86.ActiveCfg = Release|Any CPU
116118
{5F6366B6-DB08-42AD-9429-412FD085A5E7}.Release|x86.Build.0 = Release|Any CPU
119+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
120+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|Any CPU.Build.0 = Debug|Any CPU
121+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|arm64.ActiveCfg = Debug|Any CPU
122+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|arm64.Build.0 = Debug|Any CPU
123+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|x64.ActiveCfg = Debug|Any CPU
124+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|x64.Build.0 = Debug|Any CPU
125+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|x86.ActiveCfg = Debug|Any CPU
126+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Debug|x86.Build.0 = Debug|Any CPU
127+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|Any CPU.ActiveCfg = Release|Any CPU
128+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|Any CPU.Build.0 = Release|Any CPU
129+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|arm64.ActiveCfg = Release|Any CPU
130+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|arm64.Build.0 = Release|Any CPU
131+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|x64.ActiveCfg = Release|Any CPU
132+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|x64.Build.0 = Release|Any CPU
133+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|x86.ActiveCfg = Release|Any CPU
134+
{3D097878-DADE-435F-9F6F-BE03F2285110}.Release|x86.Build.0 = Release|Any CPU
117135
EndGlobalSection
118136
GlobalSection(SolutionProperties) = preSolution
119137
HideSolutionNode = FALSE
@@ -124,6 +142,7 @@ Global
124142
{24343F66-6042-4754-908B-03C77F253928} = {C22204E7-37C7-4F4C-9001-574DB1C45E78}
125143
{799A1372-8AF0-4BE4-A78A-BFCB76E06918} = {C22204E7-37C7-4F4C-9001-574DB1C45E78}
126144
{5F6366B6-DB08-42AD-9429-412FD085A5E7} = {C22204E7-37C7-4F4C-9001-574DB1C45E78}
145+
{3D097878-DADE-435F-9F6F-BE03F2285110} = {C22204E7-37C7-4F4C-9001-574DB1C45E78}
127146
EndGlobalSection
128147
GlobalSection(ExtensibilityGlobals) = postSolution
129148
SolutionGuid = {98E947C1-2A40-40F0-8823-E26F39F06EF9}

0 commit comments

Comments
 (0)