forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAUI Add WinUI Unpackaged Launch & rename namespace/appname
- Loading branch information
Showing
23 changed files
with
110 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace ST.Client.Maui.App | ||
namespace System.Application.UI | ||
{ | ||
public partial class AppShell : Shell | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace ST.Client.Maui.App | ||
namespace System.Application.UI | ||
{ | ||
public partial class MainPage : ContentPage | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<maui:MauiWinUIApplication | ||
x:Class="ST.Client.Maui.App.WinUI.App" | ||
<maui:MauiWinUIApplication | ||
x:Class="System.Application.UI.WinUI.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:maui="using:Microsoft.Maui" | ||
xmlns:local="using:ST.Client.Maui.App.WinUI"> | ||
xmlns:local="using:System.Application.UI.WinUI"> | ||
|
||
</maui:MauiWinUIApplication> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.Runtime.InteropServices; | ||
using WinRT; | ||
using Microsoft.UI.Dispatching; | ||
using WinUIApplication = Microsoft.UI.Xaml.Application; | ||
using WinUIApp = System.Application.UI.WinUI.App; | ||
|
||
namespace System.Application.UI | ||
{ | ||
public static partial class MauiProgram | ||
{ | ||
static event Action? Exit; | ||
|
||
[DllImport("Microsoft.ui.xaml.dll")] | ||
static extern void XamlCheckProcessRequirements(); | ||
|
||
[STAThread] | ||
static void Main(string[] args) | ||
{ | ||
// 不能以管理员权限启动 程序“.exe”已退出,返回值为 3221226505 (0xc0000409)。 | ||
try | ||
{ | ||
XamlCheckProcessRequirements(); | ||
} | ||
catch (DllNotFoundException ex) | ||
{ | ||
// 需要安装 Windows App Runtime | ||
// <WindowsPackageType>None</WindowsPackageType> | ||
throw new ApplicationException("Requires Windows App Runtime to be installed.", ex); | ||
} | ||
ComWrappersSupport.InitializeComWrappers(); | ||
WinUIApplication.Start(p => | ||
{ | ||
var context = new DispatcherQueueSynchronizationContext(DispatcherQueue.GetForCurrentThread()); | ||
SynchronizationContext.SetSynchronizationContext(context); | ||
var app = new WinUIApp(); | ||
}); | ||
|
||
Exit?.Invoke(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#if ANDROID | ||
[assembly: System.Runtime.Versioning.SupportedOSPlatform("Android21.0")] | ||
#elif WINDOWS | ||
[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.17763.0")] | ||
#elif IOS | ||
[assembly: System.Runtime.Versioning.SupportedOSPlatform("iOS10.0")] | ||
#elif MACCATALYST | ||
[assembly: System.Runtime.Versioning.SupportedOSPlatform("maccatalyst13.1")] | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
{ | ||
"profiles": { | ||
"Watt Toolkit (Package)": { | ||
"commandName": "MsixPackage", | ||
"nativeDebugging": false | ||
"commandName": "MsixPackage" | ||
}, | ||
"Watt Toolkit (Unpackaged)": { | ||
"commandName": "Project", | ||
"nativeDebugging": false | ||
"commandName": "Project" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters