A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
Added MacCatalyst project
Etienne Baudoux7be35f2a8da5
diff --git a/.gitignore b/.gitignoreindex 461394270..d3c4b6dfa 100644--- a/.gitignore+++ b/.gitignore@@ -417,6 +417,7 @@ $RECYCLE.BIN/*.js*.js.mappackage-lock.json+!AppManifest.js# Nuke Build.nuke/temp/diff --git a/.nuke/build.schema.json b/.nuke/build.schema.jsonindex d209b10b2..2a209ae4c 100644--- a/.nuke/build.schema.json+++ b/.nuke/build.schema.json@@ -43,6 +43,10 @@"VSCode"]},+ "MacSolution": {+ "type": "string",+ "description": "Path to a solution file that is automatically loaded"+ },"NoLogo": {"type": "boolean","description": "Disables displaying the NUKE logo"@@ -98,10 +102,6 @@]}},- "Solution": {- "type": "string",- "description": "Path to a solution file that is automatically loaded"- },"Target": {"type": "array","description": "List of targets to be invoked. Default is '{default_target}'",@@ -126,6 +126,10 @@"Quiet","Verbose"]+ },+ "WindowsSolution": {+ "type": "string",+ "description": "Path to a solution file that is automatically loaded"}}}diff --git a/.nuke/parameters.json b/.nuke/parameters.jsonindex 80f6b72f9..3c9460a70 100644--- a/.nuke/parameters.json+++ b/.nuke/parameters.json@@ -1,4 +1,5 @@{"$schema": "./build.schema.json",- "Solution": "src/DevToys.sln"+ "WindowsSolution": "src/DevToys-Windows.sln",+ "MacSolution": "src/DevToys-MacOS.sln"}\ No newline at end of filediff --git a/.vscode/launch.json b/.vscode/launch.jsonnew file mode 100644index 000000000..687403c81--- /dev/null+++ b/.vscode/launch.json@@ -0,0 +1,46 @@+{+ // Use IntelliSense to find out which attributes exist for C# debugging+ // Use hover for the description of the existing attributes+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md+ "version": "0.2.0",+ "configurations": [+ {+ // Use IntelliSense to find out which attributes exist for C# debugging+ // Use hover for the description of the existing attributes+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md+ "name": "Debug (Chrome, WebAssembly)",+ "type": "pwa-chrome",+ "request": "launch",+ "url": "http://localhost:5000",+ "webRoot": "${workspaceFolder}/src/app/dev/platforms/web/DevToys.Wasm",+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",+ "timeout": 30000,+ "server": {+ "runtimeExecutable": "dotnet",+ "program": "run",+ "outputCapture": "std",+ "timeout": 30000,+ "cwd": "${workspaceFolder}/src/app/dev/platforms/web/DevToys.Wasm"+ }+ },+ {+ // Use IntelliSense to find out which attributes exist for C# debugging+ // Use hover for the description of the existing attributes+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md+ "name": "Debug (macOS)",+ "type": "coreclr",+ "request": "launch",+ "preLaunchTask": "build-macos",+ // If you have changed target frameworks, make sure to update the program path.+ "program": "${workspaceFolder}/bin/Debug/AnyCPU/DevToys.MacOS/net6.0-maccatalyst/maccatalyst-x64/DevToys.MacOS.app",+ "args": [],+ "env": {+ "DOTNET_MODIFIABLE_ASSEMBLIES": "debug"+ },+ "cwd": "${workspaceFolder}/bin/Debug/AnyCPU/DevToys.MacOS/net6.0-maccatalyst/maccatalyst-x64/DevToys.MacOS.app",+ // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console+ "console": "internalConsole",+ "stopAtEntry": false+ }+ ]+ }\ No newline at end of filediff --git a/.vscode/tasks.json b/.vscode/tasks.jsonnew file mode 100644index 000000000..cf5672d00--- /dev/null+++ b/.vscode/tasks.json@@ -0,0 +1,41 @@+{+ "version": "2.0.0",+ "tasks": [+ {+ "label": "build-wasm",+ "command": "dotnet",+ "type": "process",+ "args": [+ "build",+ "${workspaceFolder}/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj",+ "/property:GenerateFullPaths=true",+ "/consoleloggerparameters:NoSummary"+ ],+ "problemMatcher": "$msCompile"+ },+ {+ "label": "build-macos",+ "command": "dotnet",+ "type": "process",+ "args": [+ "build",+ "${workspaceFolder}/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj",+ "/property:GenerateFullPaths=true",+ "/consoleloggerparameters:NoSummary"+ ],+ "problemMatcher": "$msCompile"+ },+ {+ "label": "build-cli",+ "command": "dotnet",+ "type": "process",+ "args": [+ "build",+ "${workspaceFolder}/src/app/dev/platforms/desktop/DevToys.CLI/DevToys.CLI.csproj",+ "/property:GenerateFullPaths=true",+ "/consoleloggerparameters:NoSummary"+ ],+ "problemMatcher": "$msCompile"+ }+ ]+ }\ No newline at end of filediff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex c1be9c93f..3c5a1c6fe 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -9,7 +9,7 @@ You can contribute to DevToys app by:# How to Build and Run DevToys from source:-## On Windows+## From Windows### Prerequisites1. Make sure your machine is running on Windows 10 1903 (19h1) or later.@@ -22,19 +22,29 @@ You can contribute to DevToys app by:### Finalize your environment1. Clone this repository.1. Open a PowerShell command prompt in the root folder of this repository.-1. Run `init.ps1` to restore all the dependencies.-1. Open `src/DevToys.sln` with Visual Studio.-1. Once opened, set `app/dev/platforms/DevToys.Wasm` or `app/dev/platforms/DevToys.Windows` or `app/dev/platforms/DevToys.CLI` as startup project.-1. Now you should be able to build and run DevToys on your machine. If it fails, try to close the solution and reopen it again.+1. Install Nuke.Build command line tooling with the following command from the command prompt:+ ```+ dotnet tool install Nuke.GlobalTool --global+ ```+1. Restore all the dependencies with the following command:+ ```+ .\init.ps1+ ```++### Build, Run & Debug+1. Open `src/DevToys-Windows.sln` with Visual Studio.+1. In Visual Studio, set `app/dev/platforms/web/DevToys.Wasm` or `app/dev/platforms/desktop/windows/DevToys.Windows` or `app/dev/platforms/desktop/DevToys.CLI` as startup project.+1. Now you should be able to build and run DevToys on your machine by pressing `F5`.-## On macOS and Linux+## From macOS### Prerequisites-1. [**Visual Studio Code**](https://code.visualstudio.com/)+1. Make sure your machine is running on macOS Ventura 13.1 or later.+1. [**Visual Studio Code**](https://code.visualstudio.com/) or [**Visual Studio for Mac**](https://visualstudio.microsoft.com/vs/mac/) or [**JetBrains Rider**](https://www.jetbrains.com/rider/)1. **.NET SDK**- * [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) (**version 6.0 (SDK 6.0.100)** or later)+ * [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) (**version 6.0 (SDK 6.0.403)** or later)> Use `dotnet --version` from the terminal to get the version installed.-1. The [Uno Platform Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=unoplatform.vscode) Extension+1. [Node.js](https://nodejs.org/).### Finalize your environment1. Clone this repository.@@ -51,10 +61,28 @@ You can contribute to DevToys app by:```~/.dotnet/tools/uno-check```-1. Follow the instructions indicated by the tool-1. Run `init.sh` to restore all the dependencies.+1. Follow the instructions indicated by the tool.+1. Install Nuke.Build command line tooling with the following command from the command prompt:+ ```+ dotnet tool install Nuke.GlobalTool --global+ ```+1. Restore all the dependencies with the following command:+ ```+ sh init.sh+ ```-// TODO explain how to debug+### Build, Run & Debug+#### If you are using Visual Studio for Mac or JetBains Rider:+1. Open `src/DevToys-MacOS.sln` with Visual Studio for Mac or JetBrains Rider.+1. Set `app/dev/platforms/web/DevToys.Wasm` or `app/dev/platforms/desktop/macos/DevToys.MacOS` or `app/dev/platforms/desktop/DevToys.CLI` as startup project.+1. Now you should be able to build and run DevToys on your machine.++#### If you are using Visual Studio Code:+1. Open the repository in Visual Studio Code to edit the code.+1. In a Terminal prompt, run the following command to build and run DevToys for Mac:+ ```+ sudo dotnet run --project src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj --framework net6.0-maccatalyst+ ```# Internationalization and localizationdiff --git a/build.ps1 b/build.ps1index 99d2e7ad8..e91034822 100644--- a/build.ps1+++ b/build.ps1@@ -12,7 +12,7 @@ function ExecSafe([scriptblock] $cmd) {Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent-# Install .Net+# Install .NETExecSafe { & $PSScriptRoot\tools\Install-DotNet.ps1 -RootFolder $PSScriptRoot }# Build the builder project.diff --git a/build.sh b/build.shindex 2fb921511..db438c823 100644--- a/build.sh+++ b/build.sh@@ -3,7 +3,7 @@set -eo pipefailSCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)-# Install .Net+# Install .NET. "./tools/Install-DotNet.sh" $SCRIPT_DIR# Build the build project.diff --git a/global.json b/global.jsonindex cd688df74..349f70043 100644--- a/global.json+++ b/global.json@@ -2,5 +2,8 @@"sdk": {"version": "6.0.403","rollForward": "latestFeature"+ },+ "msbuild-sdks": {+ "MSBuild.Sdk.Extras": "3.0.44"}}\ No newline at end of filediff --git a/init.ps1 b/init.ps1index 3d9790843..6bd695327 100644--- a/init.ps1+++ b/init.ps1@@ -34,7 +34,7 @@ Function Get-MsBuildPath($useVsPreview) {Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent-# Install .Net+# Install .NETExecSafe { & $PSScriptRoot\tools\Install-DotNet.ps1 -RootFolder $PSScriptRoot }# Restore NuGet solution dependenciesdiff --git a/init.sh b/init.shindex 52e843ccc..86e0a7f72 100644--- a/init.sh+++ b/init.sh@@ -6,9 +6,13 @@ set -eo pipefailSCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)SCRIPT_DIR="${SCRIPT_DIR}/"-# Install .Net+# Install .NET. "./tools/Install-DotNet.sh" "$SCRIPT_DIR"+# Install .NET workloads+echo "Install .NET workloads"+dotnet workload install maccatalyst+# Restore NuGet solution dependenciesecho "Restoring all dependencies"SOLUTIONS=$(find ./src/ -iname "*.sln" -print)diff --git a/src/DevToys-MacOS.sln b/src/DevToys-MacOS.slnnew file mode 100644index 000000000..47b0683e2--- /dev/null+++ b/src/DevToys-MacOS.sln@@ -0,0 +1,150 @@++Microsoft Visual Studio Solution File, Format Version 12.00+# Visual Studio Version 17+VisualStudioVersion = 17.4.33122.133+MinimumVisualStudioVersion = 10.0.40219.1+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{0AC87D9B-BBEC-4DCE-A9D4-82A159E5E7C1}"+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "app", "app", "{C85D2D7C-3D69-482A-8AB6-BCA934220EC0}"+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dev", "dev", "{B20E4027-0777-4A75-A848-609594E9A6B0}"+ ProjectSection(SolutionItems) = preProject+ app\dev\Directory.Build.props = app\dev\Directory.Build.props+ app\dev\Directory.Build.targets = app\dev\Directory.Build.targets+ EndProjectSection+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4C40BF47-315A-4B60-9ED6-8D65B5E79C2C}"+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "platforms", "platforms", "{3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}"+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{9771D1F8-D331-4B26-8E96-6024893009F4}"+ ProjectSection(SolutionItems) = preProject+ app\dev\shared\GlobalUsings.cs = app\dev\shared\GlobalUsings.cs+ app\dev\shared\SharedAssemblyInfo.cs = app\dev\shared\SharedAssemblyInfo.cs+ app\dev\shared\SharedAssemblyVersion.cs = app\dev\shared\SharedAssemblyVersion.cs+ EndProjectSection+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{97141F3A-C655-4140-B09B-466DDC14F870}"+ ProjectSection(SolutionItems) = preProject+ .editorconfig = .editorconfig+ Directory.Build.props = Directory.Build.props+ Directory.Build.targets = Directory.Build.targets+ Directory.Packages.props = Directory.Packages.props+ Environment.props = Environment.props+ EndProjectSection+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "desktops", "desktops", "{22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}"+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "macos", "macos", "{8B003389-15D4-4466-A40E-50FC0D603BF6}"+EndProject+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "web", "web", "{04F9E03E-B519-49C5-BC6A-2131ED9BADC0}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.CLI", "app\dev\platforms\desktop\DevToys.CLI\DevToys.CLI.csproj", "{8C72D38A-658D-4C9D-B0AD-2DA975BE7826}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{745FD4CA-84CC-45D8-A3E2-814A0B9C16C4}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.Api", "app\dev\DevToys.Api\DevToys.Api.csproj", "{89A4D88F-5AC0-436A-8EC5-8E98728CA89E}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.UnitTests", "app\tests\DevToys.UnitTests\DevToys.UnitTests.csproj", "{CCAB7530-4341-4C24-B4E8-28679BB6C4FB}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.Tools", "app\dev\DevToys.Tools\DevToys.Tools.csproj", "{B6D48157-5257-4B60-B065-3B231B610A54}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.Core", "app\dev\DevToys.Core\DevToys.Core.csproj", "{A730FA8A-3713-4F7A-915D-79098CA12DF0}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.UI.Framework", "app\dev\DevToys.UI.Framework\DevToys.UI.Framework.csproj", "{723A3D71-2425-49EE-B669-1A0DF3A8B486}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.UI", "app\dev\DevToys.UI\DevToys.UI.csproj", "{104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A}"+EndProject+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "DevToys.UI.EntryPoint", "app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.shproj", "{93E31B7F-903D-4F24-B30D-220489242866}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.MonacoEditor", "app\dev\DevToys.MonacoEditor\DevToys.MonacoEditor.csproj", "{CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8}"+EndProject+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToys.Wasm", "app\dev\platforms\web\DevToys.Wasm\DevToys.Wasm.csproj", "{9E59352A-836D-47DE-AB02-F404A8345242}"+EndProject+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevToys.MacOS", "app\dev\platforms\desktop\macos\DevToys.MacOS\DevToys.MacOS.csproj", "{E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF}"+EndProject+Global+ GlobalSection(SolutionConfigurationPlatforms) = preSolution+ Debug|AnyCPU = Debug|AnyCPU+ Release|AnyCPU = Release|AnyCPU+ EndGlobalSection+ GlobalSection(ProjectConfigurationPlatforms) = postSolution+ {8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {8C72D38A-658D-4C9D-B0AD-2DA975BE7826}.Release|AnyCPU.Build.0 = Release|Any CPU+ {745FD4CA-84CC-45D8-A3E2-814A0B9C16C4}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {745FD4CA-84CC-45D8-A3E2-814A0B9C16C4}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {745FD4CA-84CC-45D8-A3E2-814A0B9C16C4}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {745FD4CA-84CC-45D8-A3E2-814A0B9C16C4}.Release|AnyCPU.Build.0 = Release|Any CPU+ {89A4D88F-5AC0-436A-8EC5-8E98728CA89E}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {89A4D88F-5AC0-436A-8EC5-8E98728CA89E}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {89A4D88F-5AC0-436A-8EC5-8E98728CA89E}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {89A4D88F-5AC0-436A-8EC5-8E98728CA89E}.Release|AnyCPU.Build.0 = Release|Any CPU+ {CCAB7530-4341-4C24-B4E8-28679BB6C4FB}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {CCAB7530-4341-4C24-B4E8-28679BB6C4FB}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {CCAB7530-4341-4C24-B4E8-28679BB6C4FB}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {CCAB7530-4341-4C24-B4E8-28679BB6C4FB}.Release|AnyCPU.Build.0 = Release|Any CPU+ {B6D48157-5257-4B60-B065-3B231B610A54}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {B6D48157-5257-4B60-B065-3B231B610A54}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {B6D48157-5257-4B60-B065-3B231B610A54}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {B6D48157-5257-4B60-B065-3B231B610A54}.Release|AnyCPU.Build.0 = Release|Any CPU+ {A730FA8A-3713-4F7A-915D-79098CA12DF0}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {A730FA8A-3713-4F7A-915D-79098CA12DF0}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {A730FA8A-3713-4F7A-915D-79098CA12DF0}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {A730FA8A-3713-4F7A-915D-79098CA12DF0}.Release|AnyCPU.Build.0 = Release|Any CPU+ {9E59352A-836D-47DE-AB02-F404A8345242}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {9E59352A-836D-47DE-AB02-F404A8345242}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {9E59352A-836D-47DE-AB02-F404A8345242}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {9E59352A-836D-47DE-AB02-F404A8345242}.Release|AnyCPU.Build.0 = Release|Any CPU+ {E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF}.Release|AnyCPU.Build.0 = Release|Any CPU+ {E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF}.Debug|AnyCPU.Deploy.0 = Debug|Any CPU+ {CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8}.Release|AnyCPU.Build.0 = Release|Any CPU+ {104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A}.Release|AnyCPU.Build.0 = Release|Any CPU+ {723A3D71-2425-49EE-B669-1A0DF3A8B486}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU+ {723A3D71-2425-49EE-B669-1A0DF3A8B486}.Debug|AnyCPU.Build.0 = Debug|Any CPU+ {723A3D71-2425-49EE-B669-1A0DF3A8B486}.Release|AnyCPU.ActiveCfg = Release|Any CPU+ {723A3D71-2425-49EE-B669-1A0DF3A8B486}.Release|AnyCPU.Build.0 = Release|Any CPU+ EndGlobalSection+ GlobalSection(SolutionProperties) = preSolution+ HideSolutionNode = FALSE+ EndGlobalSection+ GlobalSection(NestedProjects) = preSolution+ {B20E4027-0777-4A75-A848-609594E9A6B0} = {C85D2D7C-3D69-482A-8AB6-BCA934220EC0}+ {4C40BF47-315A-4B60-9ED6-8D65B5E79C2C} = {C85D2D7C-3D69-482A-8AB6-BCA934220EC0}+ {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {9771D1F8-D331-4B26-8E96-6024893009F4} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E} = {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}+ {8B003389-15D4-4466-A40E-50FC0D603BF6} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}+ {04F9E03E-B519-49C5-BC6A-2131ED9BADC0} = {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}+ {8C72D38A-658D-4C9D-B0AD-2DA975BE7826} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}+ {745FD4CA-84CC-45D8-A3E2-814A0B9C16C4} = {0AC87D9B-BBEC-4DCE-A9D4-82A159E5E7C1}+ {89A4D88F-5AC0-436A-8EC5-8E98728CA89E} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {CCAB7530-4341-4C24-B4E8-28679BB6C4FB} = {4C40BF47-315A-4B60-9ED6-8D65B5E79C2C}+ {B6D48157-5257-4B60-B065-3B231B610A54} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {A730FA8A-3713-4F7A-915D-79098CA12DF0} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {723A3D71-2425-49EE-B669-1A0DF3A8B486} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {104F1E4B-E0D3-4D87-9DA0-3FE82FE2573A} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {93E31B7F-903D-4F24-B30D-220489242866} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {CDD8B469-ACA6-4A7D-91A0-66ADB0563AE8} = {B20E4027-0777-4A75-A848-609594E9A6B0}+ {9E59352A-836D-47DE-AB02-F404A8345242} = {04F9E03E-B519-49C5-BC6A-2131ED9BADC0}+ {E3E689D3-FC5E-48B4-961E-DD5C0DB62DAF} = {8B003389-15D4-4466-A40E-50FC0D603BF6}+ EndGlobalSection+ GlobalSection(ExtensibilityGlobals) = postSolution+ SolutionGuid = {C2C953F5-F97F-4198-B15C-4947A886050F}+ EndGlobalSection+ GlobalSection(SharedMSBuildProjectFiles) = preSolution+ app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{93e31b7f-903d-4f24-b30d-220489242866}*SharedItemsImports = 13+ app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{97aa45f4-41e2-4fda-b5b7-f4579df2c7ee}*SharedItemsImports = 4+ app\dev\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems*{9e59352a-836d-47de-ab02-f404a8345242}*SharedItemsImports = 5+ EndGlobalSection+EndGlobaldiff --git a/src/DevToys.sln b/src/DevToys-Windows.slnsimilarity index 99%rename from src/DevToys.slnrename to src/DevToys-Windows.slnindex f9840ad62..9bf65bff2 100644--- a/src/DevToys.sln+++ b/src/DevToys-Windows.sln@@ -35,8 +35,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "SolutionEndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "desktops", "desktops", "{22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}"EndProject-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "macos", "macos", "{8B003389-15D4-4466-A40E-50FC0D603BF6}"-EndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows", "windows", "{AFE37797-0A43-4838-8C1E-4D2D1446499C}"EndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "web", "web", "{04F9E03E-B519-49C5-BC6A-2131ED9BADC0}"@@ -289,7 +287,6 @@ Global{3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7} = {B20E4027-0777-4A75-A848-609594E9A6B0}{9771D1F8-D331-4B26-8E96-6024893009F4} = {B20E4027-0777-4A75-A848-609594E9A6B0}{22EE9386-CEFA-47D8-97B2-09A63EDF7F2E} = {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}- {8B003389-15D4-4466-A40E-50FC0D603BF6} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}{AFE37797-0A43-4838-8C1E-4D2D1446499C} = {22EE9386-CEFA-47D8-97B2-09A63EDF7F2E}{04F9E03E-B519-49C5-BC6A-2131ED9BADC0} = {3D2285D5-0E44-4B1A-9B74-2BBE3108D5B7}{34D966D5-5756-4192-B4AB-44AD6FF07CC5} = {AFE37797-0A43-4838-8C1E-4D2D1446499C}diff --git a/src/Directory.Build.props b/src/Directory.Build.propsindex c4a81abd9..00b1d53f2 100644--- a/src/Directory.Build.props+++ b/src/Directory.Build.props@@ -14,12 +14,14 @@<NetCore>net6.0</NetCore><NetCoreWindows>$(NetCore)-windows$(Windows10MinSDKVersionTrimmed)</NetCoreWindows>+ <NetMacCatalyst>$(NetCore)-maccatalyst</NetMacCatalyst><UAP>uap$(Windows10MinSDKVersionTrimmed)</UAP><!-- Define default build configuration --><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>+ <UseAppHost Condition="$(IsMac)">False</UseAppHost><!-- Defines the bin and obj folder paths --><RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))\</RepoRoot>diff --git a/src/Directory.Packages.props b/src/Directory.Packages.propsindex 7b678493d..d9472058a 100644--- a/src/Directory.Packages.props+++ b/src/Directory.Packages.props@@ -9,7 +9,6 @@<MicrosoftNETCoreUniversalWindowsPlatformVersion>6.2.14</MicrosoftNETCoreUniversalWindowsPlatformVersion><MicrosoftWindowsSDKBuildToolsVersion>10.0.22621.1</MicrosoftWindowsSDKBuildToolsVersion><PolySharpVersion>1.8.1</PolySharpVersion>- <ThisAssemblyVersion>1.1.1</ThisAssemblyVersion><UnoVersion>4.6.39</UnoVersion><UnoWasmBootstrapVersion>8.0.0-dev.65</UnoWasmBootstrapVersion><WebView2Version>1.0.1462.37</WebView2Version>@@ -39,9 +38,10 @@<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" /><PackageVersion Include="System.ComponentModel.Composition" Version="$(DotNetVersion)" /><PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />- <PackageVersion Include="ThisAssembly" Version="$(ThisAssemblyVersion)"/>+ <PackageVersion Include="System.Runtime.InteropServices.WindowsRuntime" Version="4.3.0" /><PackageVersion Include="Uno.Core.Extensions.Logging" Version="4.0.1" /><PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />+ <PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.4.0" /><PackageVersion Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.4.0" /><PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="$(UnoVersion)" /><PackageVersion Include="Uno.Wasm.Bootstrap" Version="$(UnoWasmBootstrapVersion)" />diff --git a/src/app/dev/DevToys.Api/DevToys.Api.csproj b/src/app/dev/DevToys.Api/DevToys.Api.csprojindex f35132d63..8449456df 100644--- a/src/app/dev/DevToys.Api/DevToys.Api.csproj+++ b/src/app/dev/DevToys.Api/DevToys.Api.csproj@@ -9,6 +9,5 @@<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" /><PackageReference Include="System.ComponentModel.Composition" /><PackageReference Include="System.Threading.Tasks.Extensions" />- <PackageReference Include="ThisAssembly" /></ItemGroup></Project>\ No newline at end of filediff --git a/src/app/dev/DevToys.Core/DevToys.Core.csproj b/src/app/dev/DevToys.Core/DevToys.Core.csprojindex 057e68b44..510c71463 100644--- a/src/app/dev/DevToys.Core/DevToys.Core.csproj+++ b/src/app/dev/DevToys.Core/DevToys.Core.csproj@@ -10,6 +10,5 @@<PackageReference Include="CommunityToolkit.Diagnostics" /><PackageReference Include="Microsoft.Extensions.Logging.Abstractions" /><PackageReference Include="System.ComponentModel.Composition" />- <PackageReference Include="ThisAssembly" /></ItemGroup></Project>\ No newline at end of filediff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.csindex 4b0efbf9d..b681fd3d8 100644--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditor.cs@@ -25,7 +25,7 @@ using Microsoft.UI.Xaml.Controls;namespace DevToys.MonacoEditor;/// <summary>-/// .Net wrapper for the Monaco CodeEditor+/// .NET wrapper for the Monaco CodeEditor/// https://microsoft.github.io/monaco-editor//// </summary>[TemplatePart(Name = "View", Type = typeof(ICodeEditorPresenter))]diff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.csnew file mode 100644index 000000000..a3f847a07--- /dev/null+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.MacOS.cs@@ -0,0 +1,41 @@+#if __MAC__++using Windows.Foundation;+using DevToys.UI.Framework.Threading;+using Microsoft.UI.Xaml;+using Microsoft.UI.Xaml.Controls;+using Microsoft.Web.WebView2.Core;+using DispatcherQueue = Windows.UI.Core.CoreDispatcher;++namespace DevToys.MonacoEditor;++/// <summary>+/// Provides a WebView that displays the Monaco Editor.+/// </summary>+public sealed partial class CodeEditorPresenter : UserControl, ICodeEditorPresenter+{+ public event TypedEventHandler<ICodeEditorPresenter, CoreWebView2NewWindowRequestedEventArgs>? NewWindowRequested;+ public event TypedEventHandler<ICodeEditorPresenter, CoreWebView2NavigationStartingEventArgs>? NavigationStarting;+ public event TypedEventHandler<ICodeEditorPresenter, CoreWebView2DOMContentLoadedEventArgs>? DOMContentLoaded;+ public event TypedEventHandler<ICodeEditorPresenter, CoreWebView2NavigationCompletedEventArgs>? NavigationCompleted;+ public event AsyncTypedEventHandler<ICodeEditorPresenter, EventArgs>? DotNetObjectInjectionRequested;+ public event TypedEventHandler<ICodeEditorPresenter, RoutedEventArgs>? GotFocus;+ public event TypedEventHandler<ICodeEditorPresenter, RoutedEventArgs>? LostFocus;++ public Task LaunchAsync()+ {+ return Task.CompletedTask;+ }++ public Task InjectDotNetObjectToWebPageAsync<T>(string name, T pObject)+ {+ return Task.CompletedTask;+ }++ public Task<string> InvokeScriptAsync(string script)+ {+ return Task.FromResult(string.Empty);+ }+}++#endifdiff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Wasm.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Wasm.csindex db29b219e..65dc1ca35 100644--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Wasm.cs+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Wasm.cs@@ -83,7 +83,7 @@ public sealed partial class CodeEditorPresenter : Control, ICodeEditorPresenter,DispatcherQueuePriority.Low,() => DOMContentLoaded?.Invoke(this, new CoreWebView2DOMContentLoadedEventArgs()));- // Request to inject .Net web object into the web page.+ // Request to inject .NET web object into the web page.Guard.IsNotNull(DotNetObjectInjectionRequested);await DotNetObjectInjectionRequested.Invoke(this, EventArgs.Empty);diff --git a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.csindex 215f29eac..5d88215d1 100644--- a/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs+++ b/src/app/dev/DevToys.MonacoEditor/CodeEditor/CodeEditorPresenter.Windows.cs@@ -121,7 +121,7 @@ public sealed partial class CodeEditorPresenter : UserControl, ICodeEditorPresenawait tcs.Task;- // Request to inject .Net web object into the web page.+ // Request to inject .NET web object into the web page.Guard.IsNotNull(DotNetObjectInjectionRequested);await DotNetObjectInjectionRequested.Invoke(this, EventArgs.Empty);diff --git a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csprojindex 83fff5167..ae3c69bf1 100644--- a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj+++ b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj@@ -1,10 +1,12 @@-<Project Sdk="MSBuild.Sdk.Extras/3.0.44">+<Project Sdk="MSBuild.Sdk.Extras"><!--Adding project references to this project requires some manual adjustments.Please see https://github.com/unoplatform/uno/issues/3909 for more details.--><PropertyGroup>- <TargetFrameworks>$(UAP);$(NetCore)</TargetFrameworks>+ <TargetFrameworks>$(NetCore)</TargetFrameworks>+ <TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>+ <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(UAP)</TargetFrameworks><!-- Ensures the .xr.xml files are generated in a proper layout folder --><GenerateLibraryLayout>true</GenerateLibraryLayout>@@ -17,6 +19,10 @@<IsUWP>true</IsUWP></PropertyGroup>+ <PropertyGroup Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">+ <IsMacCatalyst>true</IsMacCatalyst>+ </PropertyGroup>+<PropertyGroup Condition="'$(TargetFramework)' == '$(NetCore)'"><IsWasm>true</IsWasm></PropertyGroup>@@ -25,6 +31,11 @@<DefineConstants>$(DefineConstants);__WASM__</DefineConstants></PropertyGroup>+ <PropertyGroup Condition="'$(IsMacCatalyst)' == 'true'">+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ </PropertyGroup>+<PropertyGroup Condition="'$(IsUWP)' == 'true'"><DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants><TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>@@ -56,18 +67,24 @@<ItemGroup Condition="'$(IsUWP)' == 'true'"><PackageReference Include="Microsoft.UI.Xaml" />- <PackageReference Include="Microsoft.Web.WebView2" /></ItemGroup>- <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'"><PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" /><PackageReference Include="Uno.WinUI" /><PackageReference Include="Uno.WinUI.Lottie" />- <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" /><PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" /></ItemGroup>+ <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />+ <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />+ </ItemGroup>++ <ItemGroup Condition="'$(IsMacCatalyst)' == 'true'">+ <PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" />+ </ItemGroup>+<ItemGroup><None Remove="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" /><None Remove="ts-helpermethods\ts-helpermethods-Windows\tsconfig.json" />@@ -81,6 +98,8 @@</Content><UpToDateCheckInput Include="**\*.xaml" />+ <Content Include="Assets\**" />+ <PRIResource Include="**\*.resw" /><Page Include="**\*.xaml"><SubType>Designer</SubType><Generator>MSBuild:Compile</Generator>@@ -97,7 +116,7 @@<None Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json" /></ItemGroup>- <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'"><Content Include="Assets\**" /><Compile Update="**\*.xaml.cs"><DependentUpon>%(Filename)</DependentUpon>diff --git a/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Wasm/tsconfig.json b/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Wasm/tsconfig.jsonindex ba7a481f7..2854c440c 100644--- a/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Wasm/tsconfig.json+++ b/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Wasm/tsconfig.json@@ -2,8 +2,8 @@"compileOnSave": true,"compilerOptions": {"emitBOM": false,- "target": "ES2015",- "lib": [ "ES2015", "DOM" ],+ "target": "es2018",+ "lib": [ "es2018", "DOM" ],"sourceMap": false,"outFile": "..\\..\\WasmScripts\\uno-monaco-helpers.js"},diff --git a/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Windows/tsconfig.json b/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Windows/tsconfig.jsonindex 8de032db5..6921602c3 100644--- a/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Windows/tsconfig.json+++ b/src/app/dev/DevToys.MonacoEditor/ts-helpermethods/ts-helpermethods-Windows/tsconfig.json@@ -1,7 +1,7 @@{"compileOnSave": true,"compilerOptions": {- "target": "ES2015",+ "target": "es2018","sourceMap": false},"include": [diff --git a/src/app/dev/DevToys.UI.EntryPoint/App.xaml.cs b/src/app/dev/DevToys.UI.EntryPoint/App.xaml.csindex 7785bc964..d79f0f616 100644--- a/src/app/dev/DevToys.UI.EntryPoint/App.xaml.cs+++ b/src/app/dev/DevToys.UI.EntryPoint/App.xaml.cs@@ -58,7 +58,9 @@ public sealed partial class App : Application_window = new Window();_window.Activate();#else- _window = Window.Current;+ // Important! Keep the full name `Microsoft.UI.Xaml.Window.Current` otherwise the Mac app won't build.+ // See https://blog.mzikmund.com/2020/04/resolving-uno-platform-uiwindow-does-not-contain-a-definition-for-current-issue/+ _window = Microsoft.UI.Xaml.Window.Current;#endif#if WINDOWS_UWP@@ -144,7 +146,7 @@ public sealed partial class App : Application{#if __WASM__builder.AddProvider(new global::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider());-#elif __IOS__+#elif __MACCATALYST__builder.AddProvider(new global::Uno.Extensions.Logging.OSLogLoggerProvider());#elif NETFX_COREbuilder.AddDebug();diff --git a/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj b/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csprojindex 5da4f1d10..035579e17 100644--- a/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj+++ b/src/app/dev/DevToys.UI.Framework/DevToys.UI.Framework.csproj@@ -1,10 +1,12 @@-<Project Sdk="MSBuild.Sdk.Extras/3.0.44">+<Project Sdk="MSBuild.Sdk.Extras"><!--Adding project references to this project requires some manual adjustments.Please see https://github.com/unoplatform/uno/issues/3909 for more details.--><PropertyGroup>- <TargetFrameworks>$(UAP);$(NetCore)</TargetFrameworks>+ <TargetFrameworks>$(NetCore)</TargetFrameworks>+ <TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>+ <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(UAP)</TargetFrameworks><!-- Ensures the .xr.xml files are generated in a proper layout folder --><GenerateLibraryLayout>true</GenerateLibraryLayout>@@ -17,6 +19,10 @@<IsUWP>true</IsUWP></PropertyGroup>+ <PropertyGroup Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">+ <IsMacCatalyst>true</IsMacCatalyst>+ </PropertyGroup>+<PropertyGroup Condition="'$(TargetFramework)' == '$(NetCore)'"><IsWasm>true</IsWasm></PropertyGroup>@@ -25,6 +31,11 @@<DefineConstants>$(DefineConstants);__WASM__</DefineConstants></PropertyGroup>+ <PropertyGroup Condition="'$(IsMacCatalyst)' == 'true'">+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ </PropertyGroup>+<PropertyGroup Condition="'$(IsUWP)' == 'true'"><DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants><TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>@@ -55,15 +66,18 @@<PackageReference Include="Microsoft.UI.Xaml" /></ItemGroup>- <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'"><PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" /><PackageReference Include="Uno.WinUI" /><PackageReference Include="Uno.WinUI.Lottie" />- <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" /><PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" /></ItemGroup>+ <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />+ <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />+ </ItemGroup>+<ItemGroup><UpToDateCheckInput Include="**\*.xaml" /><Page Include="**\*.xaml" />diff --git a/src/app/dev/DevToys.UI/DevToys.UI.csproj b/src/app/dev/DevToys.UI/DevToys.UI.csprojindex 7f6f4019d..150435814 100644--- a/src/app/dev/DevToys.UI/DevToys.UI.csproj+++ b/src/app/dev/DevToys.UI/DevToys.UI.csproj@@ -1,10 +1,12 @@-<Project Sdk="MSBuild.Sdk.Extras/3.0.44">+<Project Sdk="MSBuild.Sdk.Extras"><!--Adding project references to this project requires some manual adjustments.Please see https://github.com/unoplatform/uno/issues/3909 for more details.--><PropertyGroup>- <TargetFrameworks>$(UAP);$(NetCore)</TargetFrameworks>+ <TargetFrameworks>$(NetCore)</TargetFrameworks>+ <TargetFrameworks Condition="$(IsMac)">$(TargetFrameworks);$(NetMacCatalyst)</TargetFrameworks>+ <TargetFrameworks Condition="$(IsWindows)">$(TargetFrameworks);$(UAP)</TargetFrameworks><!-- Ensures the .xr.xml files are generated in a proper layout folder --><GenerateLibraryLayout>true</GenerateLibraryLayout>@@ -17,6 +19,10 @@<IsUWP>true</IsUWP></PropertyGroup>+ <PropertyGroup Condition="'$(TargetFramework)' == '$(NetMacCatalyst)'">+ <IsMacCatalyst>true</IsMacCatalyst>+ </PropertyGroup>+<PropertyGroup Condition="'$(TargetFramework)' == '$(NetCore)'"><IsWasm>true</IsWasm></PropertyGroup>@@ -25,6 +31,11 @@<DefineConstants>$(DefineConstants);__WASM__</DefineConstants></PropertyGroup>+ <PropertyGroup Condition="'$(IsMacCatalyst)' == 'true'">+ <DefineConstants>$(DefineConstants);__MAC__</DefineConstants>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ </PropertyGroup>+<PropertyGroup Condition="'$(IsUWP)' == 'true'"><DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants><TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>@@ -55,18 +66,21 @@<PackageReference Include="Microsoft.UI.Xaml" /></ItemGroup>- <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsMacCatalyst)' =='true'"><PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" /><PackageReference Include="Uno.WinUI" /><PackageReference Include="Uno.WinUI.Lottie" />- <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" /><PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" /></ItemGroup>+ <ItemGroup Condition="'$(IsWasm)' == 'true'">+ <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" />+ <PackageReference Include="Uno.WinUI.Runtime.WebAssembly" />+ </ItemGroup>+<ItemGroup><UpToDateCheckInput Include="**\*.xaml" />- <Page Include="**\*.xaml" >+ <Page Include="**\*.xaml"><SubType>Designer</SubType><Generator>MSBuild:Compile</Generator></Page>diff --git a/src/app/dev/Directory.Build.props b/src/app/dev/Directory.Build.propsindex 7374d6084..ec9c90cee 100644--- a/src/app/dev/Directory.Build.props+++ b/src/app/dev/Directory.Build.props@@ -2,7 +2,7 @@<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /><PropertyGroup>- <!-- Define .Net and C# configuration -->+ <!-- Define .NET and C# configuration --><LangVersion>10.0</LangVersion><ImplicitUsings>enable</ImplicitUsings><Nullable>enable</Nullable>diff --git a/src/app/dev/platforms/desktop/DevToys.CLI/DevToys.CLI.csproj b/src/app/dev/platforms/desktop/DevToys.CLI/DevToys.CLI.csprojindex df3bbe998..8015b7165 100644--- a/src/app/dev/platforms/desktop/DevToys.CLI/DevToys.CLI.csproj+++ b/src/app/dev/platforms/desktop/DevToys.CLI/DevToys.CLI.csproj@@ -3,6 +3,7 @@<PropertyGroup><OutputType>Exe</OutputType><TargetFramework>$(NetCore)</TargetFramework>+ <UseAppHost>True</UseAppHost></PropertyGroup><ItemGroup>@@ -10,7 +11,6 @@<PackageReference Include="CommunityToolkit.Diagnostics" /><PackageReference Include="System.CommandLine" /><PackageReference Include="System.ComponentModel.Composition" />- <PackageReference Include="ThisAssembly" /><PackageReference Include="Microsoft.Extensions.Logging.Debug" /></ItemGroup>diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csprojnew file mode 100644index 000000000..fdfe18835--- /dev/null+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/DevToys.MacOS.csproj@@ -0,0 +1,60 @@+<Project Sdk="Microsoft.NET.Sdk">+ <PropertyGroup>+ <TargetFrameworks>$(NetMacCatalyst)</TargetFrameworks>+ <!-- <SingleProject>true</SingleProject> -->+ <OutputType>Exe</OutputType> <!-- Debugger workaround https://github.com/dotnet/maui-samples/blob/8aa6b8780b12e97b157514c3bdc54bb4a13001cd/HelloMacCatalyst/HelloMacCatalyst.csproj#L7 --> <!-- <MtouchExtraArgs Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">$(MtouchExtraArgs) -setenv:MONO_THREADS_SUSPEND=preemptive</MtouchExtraArgs> --> <!-- Required for C# Hot Reload, except for macOS which uses CoreCLR (not Mono) --> <!-- Disabled because of https://github.com/dotnet/runtime/issues/68808 --> <!--<UseInterpreter Condition="'$(Configuration)' == 'Debug' and '$(TargetFramework)' != 'net6.0-maccatalyst' and '$(TargetFramework)' != 'net6.0-macos'">True</UseInterpreter>-->+ <IsUnoHead>true</IsUnoHead>+ <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion>+ <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>+ <ApplicationId>com.etiennebaudoux.devtoys</ApplicationId>+ </PropertyGroup>+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">+ <CreatePackage>false</CreatePackage>+ </PropertyGroup>+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">+ <CreatePackage>false</CreatePackage>+ </PropertyGroup>+ <ItemGroup>+ <PackageReference Include="Uno.WinUI" />+ <PackageReference Include="Uno.WinUI.RemoteControl" Condition="'$(Configuration)'=='Debug'" />+ <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />+ <PackageReference Include="Microsoft.Extensions.Logging.Console" />+ <PackageReference Include="Uno.WinUI.Lottie" />+ <PackageReference Include="Uno.Extensions.Logging.OSLog" />+ </ItemGroup>+ <PropertyGroup>+ <!-- Configure the GC -->+ <MtouchExtraArgs>$(MtouchExtraArgs) --setenv=MONO_GC_PARAMS=soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep,concurrent-sweep</MtouchExtraArgs>+ <!-- Required for unknown crash as of .NET 6 Mobile Preview 13 -->+ <MtouchExtraArgs>$(MtouchExtraArgs) --registrar:static</MtouchExtraArgs>+ <!-- https://github.com/xamarin/xamarin-macios/issues/14812 -->+ <MtouchExtraArgs>$(MtouchExtraArgs) --marshal-objectivec-exceptions:disable</MtouchExtraArgs>+ <!-- Full globalization is required for Uno -->+ <InvariantGlobalization>false</InvariantGlobalization>+ </PropertyGroup>+ <ItemGroup>+ <ProjectReference Include="..\..\..\..\DevToys.Api\DevToys.Api.csproj" />+ <ProjectReference Include="..\..\..\..\DevToys.Core\DevToys.Core.csproj" />+ <ProjectReference Include="..\..\..\..\DevToys.MonacoEditor\DevToys.MonacoEditor.csproj" />+ <ProjectReference Include="..\..\..\..\DevToys.UI.Framework\DevToys.UI.Framework.csproj" />+ <ProjectReference Include="..\..\..\..\DevToys.UI\DevToys.UI.csproj" />+ </ItemGroup>+ <ItemGroup>+ <ImageAsset Update="MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-512%402x.png">+ <Link>MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-512%402x.png</Link>+ </ImageAsset>+ <ImageAsset Update="MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-32%402x.png">+ <Link>MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-32%402x.png</Link>+ </ImageAsset>+ <ImageAsset Update="MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-16%402x.png">+ <Link>MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-16%402x.png</Link>+ </ImageAsset>+ <ImageAsset Update="MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-256%402x.png">+ <Link>MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-256%402x.png</Link>+ </ImageAsset>+ <ImageAsset Update="MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-128%402x.png">+ <Link>MacOS\Assets.xcassets\AppIcon.appiconset\AppIcon-128%402x.png</Link>+ </ImageAsset>+ </ItemGroup>+ <Import Project="..\..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems" Label="Shared" Condition="Exists('..\..\..\..\DevToys.UI.EntryPoint\DevToys.UI.EntryPoint.projitems')" />+</Project>\ No newline at end of filediff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Entitlements.plist b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Entitlements.plistnew file mode 100755index 000000000..24c310368--- /dev/null+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Entitlements.plist@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+ <dict>+ </dict>+</plist>diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Info.plist b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Info.plistnew file mode 100755index 000000000..8fc8e692d--- /dev/null+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Info.plist@@ -0,0 +1,36 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>CFBundleName</key>+ <string>DevToys</string>+ <key>CFBundleDisplayName</key>+ <string>DevToys</string>+ <key>CFBundleIdentifier</key>+ <string>com.etiennebaudoux.devtoys</string>+ <key>CFBundleShortVersionString</key>+ <string>1.0</string>+ <key>CFBundleVersion</key>+ <string>1.0</string>+ <key>UIDeviceFamily</key>+ <array>+ <integer>2</integer>+ </array>+ <key>LSApplicationCategoryType</key>+ <string>public.app-category.utilities</string>+ <key>UILaunchStoryboardName</key>+ <string>LaunchScreen</string>+ <key>UISupportedInterfaceOrientations</key>+ <array>+ <string>UIInterfaceOrientationPortrait</string>+ <string>UIInterfaceOrientationLandscapeLeft</string>+ <string>UIInterfaceOrientationLandscapeRight</string>+ </array>+ <key>XSAppIconAssets</key>+ <string>Media.xcassets/AppIcon.appiconset</string>+ <key>UIAppFonts</key>+ <array>+ <string>Fonts/uno-fluentui-assets.ttf</string>+ </array>+</dict>+</plist>diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/LaunchScreen.storyboard b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/LaunchScreen.storyboardnew file mode 100755index 000000000..04a81ae75--- /dev/null+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/LaunchScreen.storyboard@@ -0,0 +1,52 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="5" launchScreen="YES">+ <dependencies>+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>+ </dependencies>+ <scenes>+ <scene sceneID="4">+ <objects>+ <viewController id="5" sceneMemberID="viewController">+ <layoutGuides>+ <viewControllerLayoutGuide type="top" id="2"/>+ <viewControllerLayoutGuide type="bottom" id="3"/>+ </layoutGuides>+ <view contentMode="scaleToFill" id="55" key="view">+ <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>+ <color key="backgroundColor" colorSpace="custom" customColorSpace="sRGB" red="1" green="1" blue="1" alpha="1"/>+ <subviews>+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="56" translatesAutoresizingMaskIntoConstraints="NO" image="SplashScreen.png">+ <rect key="frame" x="58" y="120" width="204" height="242"/>+ <constraints>+ <constraint id="91" firstItem="56" firstAttribute="width" constant="204"/>+ <constraint id="92" firstItem="56" firstAttribute="height" constant="242"/>+ </constraints>+ </imageView>+ </subviews>+ <constraints>+ <constraint id="80" firstItem="55" firstAttribute="centerY" secondItem="56" secondAttribute="centerY" constant="0"/>+ <constraint id="81" firstItem="55" firstAttribute="centerX" secondItem="56" secondAttribute="centerX" constant="0"/>+ </constraints>+ </view>+ </viewController>+ <placeholder placeholderIdentifier="IBFirstResponder" id="7" userLabel="First Responder" sceneMemberID="firstResponder"/>+ </objects>+ <point key="canvasLocation" x="-300" y="-555"/>+ </scene>+ </scenes>+ <resources>+ <image name="[email protected]" width="40" height="40"/>+ <image name="[email protected]" width="60" height="60"/>+ <image name="[email protected]" width="76" height="76"/>+ <image name="[email protected]" width="40" height="40"/>+ <image name="Icon-Small.png" width="29" height="29"/>+ <image name="SplashScreen.png" width="620" height="300"/>+ </resources>+ <simulatedMetricsContainer key="defaultSimulatedMetrics">+ <simulatedStatusBarMetrics key="statusBar"/>+ <simulatedOrientationMetrics key="orientation"/>+ <simulatedScreenMetrics key="destination"/>+ </simulatedMetricsContainer>+</document>diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Main.maccatalyst.cs b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Main.maccatalyst.csnew file mode 100755index 000000000..ed2e8078c--- /dev/null+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Main.maccatalyst.cs@@ -0,0 +1,15 @@+using UIKit;++namespace DevToys+{+ public class EntryPoint+ {+ // This is the main entry point of the application.+ static void Main(string[] args)+ {+ // if you want to use a different Application Delegate class from "AppDelegate"+ // you can specify it here.+ UIApplication.Main(args, null, typeof(App));+ }+ }+}diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Contents.json b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Contents.jsonnew file mode 100755index 000000000..a5c670237--- /dev/null+++ b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Contents.json@@ -0,0 +1,117 @@+{+ "images": [+ {+ "scale": "2x",+ "size": "29x29",+ "idiom": "iphone",+ "filename": "Icon58.png"+ },+ {+ "scale": "3x",+ "size": "29x29",+ "idiom": "iphone",+ "filename": "Icon87.png"+ },+ {+ "scale": "2x",+ "size": "40x40",+ "idiom": "iphone",+ "filename": "Icon80.png"+ },+ {+ "scale": "3x",+ "size": "60x60",+ "idiom": "iphone",+ "filename": "Icon180.png"+ },+ {+ "scale": "1x",+ "size": "20x20",+ "idiom": "ipad",+ "filename": "Icon20.png"+ },+ {+ "scale": "2x",+ "size": "20x20",+ "idiom": "ipad",+ "filename": "Icon40.png"+ },+ {+ "scale": "1x",+ "size": "29x29",+ "idiom": "ipad",+ "filename": "Icon29.png"+ },+ {+ "scale": "2x",+ "size": "29x29",+ "idiom": "ipad",+ "filename": "Icon58.png"+ },+ {+ "scale": "1x",+ "size": "40x40",+ "idiom": "ipad",+ "filename": "Icon40.png"+ },+ {+ "scale": "2x",+ "size": "40x40",+ "idiom": "ipad",+ "filename": "Icon80.png"+ },+ {+ "scale": "1x",+ "size": "76x76",+ "idiom": "ipad",+ "filename": "Icon76.png"+ },+ {+ "scale": "2x",+ "size": "20x20",+ "idiom": "iphone",+ "filename": "Icon40.png"+ },+ {+ "scale": "3x",+ "size": "20x20",+ "idiom": "iphone",+ "filename": "Icon60.png"+ },+ {+ "scale": "3x",+ "size": "40x40",+ "idiom": "iphone",+ "filename": "Icon120.png"+ },+ {+ "scale": "2x",+ "size": "60x60",+ "idiom": "iphone",+ "filename": "Icon120.png"+ },+ {+ "scale": "2x",+ "size": "76x76",+ "idiom": "ipad",+ "filename": "Icon152.png"+ },+ {+ "scale": "2x",+ "size": "83.5x83.5",+ "idiom": "ipad",+ "filename": "Icon167.png"+ },+ {+ "scale": "1x",+ "size": "1024x1024",+ "idiom": "ios-marketing",+ "filename": "Icon1024.png"+ }+ ],+ "properties": {},+ "info": {+ "version": 1,+ "author": "xcode"+ }+}diff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon1024.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon1024.pngnew file mode 100755index 000000000..c7e45b700Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon1024.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon120.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon120.pngnew file mode 100755index 000000000..5f2aea5ebBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon120.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon152.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon152.pngnew file mode 100755index 000000000..c28bde8feBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon152.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon167.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon167.pngnew file mode 100755index 000000000..aeeb0769bBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon167.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon180.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon180.pngnew file mode 100755index 000000000..0a851b8d7Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon180.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon20.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon20.pngnew file mode 100755index 000000000..6f1a958b7Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon20.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon29.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon29.pngnew file mode 100755index 000000000..2d1ce7977Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon29.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon40.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon40.pngnew file mode 100755index 000000000..a0ab12a4eBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon40.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon58.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon58.pngnew file mode 100755index 000000000..26ef6c932Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon58.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon60.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon60.pngnew file mode 100755index 000000000..84bfd00e1Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon60.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon76.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon76.pngnew file mode 100755index 000000000..b5ee36118Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon76.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon80.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon80.pngnew file mode 100755index 000000000..5de98b1c6Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon80.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon87.png b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon87.pngnew file mode 100755index 000000000..53147588cBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Media.xcassets/AppIcons.appiconset/Icon87.png differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected] b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected]new file mode 100755index 000000000..29973dcbeBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected] differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/Fonts/uno-fluentui-assets.ttf b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/Fonts/uno-fluentui-assets.ttfnew file mode 100755index 000000000..055184054Binary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/Fonts/uno-fluentui-assets.ttf differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected] b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected]new file mode 100755index 000000000..f8e793d9eBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected] differdiff --git a/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected] b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected]new file mode 100755index 000000000..8c5f3984cBinary files /dev/null and b/src/app/dev/platforms/desktop/macos/DevToys.MacOS/MacCatalyst/Resources/[email protected] differdiff --git a/src/app/dev/platforms/desktop/windows/DevToys.Windows.Core/DevToys.Windows.Core.csproj b/src/app/dev/platforms/desktop/windows/DevToys.Windows.Core/DevToys.Windows.Core.csprojindex a3bb5e7d3..5e5f6f17a 100644--- a/src/app/dev/platforms/desktop/windows/DevToys.Windows.Core/DevToys.Windows.Core.csproj+++ b/src/app/dev/platforms/desktop/windows/DevToys.Windows.Core/DevToys.Windows.Core.csproj@@ -94,7 +94,6 @@<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets><PrivateAssets>all</PrivateAssets></PackageReference>- <PackageReference Include="ThisAssembly" Version="$(ThisAssemblyVersion)" /></ItemGroup><ItemGroup><ProjectReference Include="..\..\..\..\DevToys.Api\DevToys.Api.csproj">diff --git a/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj b/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csprojindex b0bd66255..2aca52fe2 100644--- a/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj+++ b/src/app/dev/platforms/web/DevToys.Wasm/DevToys.Wasm.csproj@@ -46,7 +46,6 @@<ItemGroup><PackageReference Include="Microsoft.Extensions.Logging" /><PackageReference Include="Microsoft.Windows.Compatibility" />- <PackageReference Include="ThisAssembly" /><PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" /><PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" /><PackageReference Include="Uno.Wasm.Bootstrap" />diff --git a/src/app/dev/platforms/web/DevToys.Wasm/WasmScripts/AppManifest.js b/src/app/dev/platforms/web/DevToys.Wasm/WasmScripts/AppManifest.jsnew file mode 100755index 000000000..ce9851333--- /dev/null+++ b/src/app/dev/platforms/web/DevToys.Wasm/WasmScripts/AppManifest.js@@ -0,0 +1,5 @@+var UnoAppManifest = {+ splashScreenImage: "Assets/SplashScreen.png",+ splashScreenColor: "transparent",+ displayName: "DevToys"+}diff --git a/src/build/Build.cs b/src/build/Build.csindex 165500ee4..55347ce47 100644--- a/src/build/Build.cs+++ b/src/build/Build.cs@@ -42,7 +42,10 @@ class Build : NukeBuildreadonly bool RunTests;[Solution]- readonly Solution Solution;+ readonly Solution WindowsSolution;++ [Solution]+ readonly Solution MacSolution;Target PreliminaryCheck => _ => _.Before(Clean)@@ -58,6 +61,11 @@ class Build : NukeBuildAssert.Fail("To build Windows UWP app, you need to run on Windows 10 or later.");}+ if (PlatformTargets.Contains(PlatformTarget.MacOS) && !OperatingSystem.IsMacOS())+ {+ Assert.Fail("To build macOS app, you need to run on macOS Ventura 13.1 or later.");+ }+Log.Information("Preliminary checks are successful.");});@@ -67,7 +75,7 @@ class Build : NukeBuild{if (!Debugger.IsAttached){- RootDirectory.GlobDirectories("bin", "obj", "publish").ForEach(DeleteDirectory);+ RootDirectory.GlobDirectories("bin", "obj", "publish").ForEach(EnsureCleanDirectory);}});@@ -139,6 +147,47 @@ class Build : NukeBuild});}+ if (PlatformTargets.Contains(PlatformTarget.MacOS))+ {+ Project project = MacSolution.GetProject("DevToys.MacOS");+ var configs = new List<DotnetParameters>();+ foreach (string targetFramework in project.GetTargetFrameworks())+ {+ configs.Add(new DotnetParameters(project.Path, "maccatalyst-arm64", targetFramework, portable: true));+ configs.Add(new DotnetParameters(project.Path, "maccatalyst-x64", targetFramework, portable: true));+ }++ foreach (DotnetParameters dotnetParameters in configs)+ {+ Log.Information($"Publishing {dotnetParameters.ProjectOrSolutionPath + "-" + dotnetParameters.TargetFramework + "-" + dotnetParameters.RuntimeIdentifier}...");+ DotNetBuild(s => s+ .SetProjectFile(dotnetParameters.ProjectOrSolutionPath)+ .SetConfiguration(Configuration)+ .SetFramework(dotnetParameters.TargetFramework)+ .SetRuntime(dotnetParameters.RuntimeIdentifier)+ .SetSelfContained(dotnetParameters.Portable)+ .SetPublishSingleFile(true)+ .SetPublishReadyToRun(true)+ .SetPublishTrimmed(true) /* Required for MacCatalyst*/+ .SetVerbosity(DotNetVerbosity.Quiet)+ .SetProcessArgumentConfigurator(_ => _.Add("/p:CreatePackage=True")) /* Will create an installable .pkg */+ .SetNoRestore(true)); /* workaround for https://github.com/xamarin/xamarin-macios/issues/15664#issuecomment-1233123515 */+ DotNetPublish(s => s+ .SetProject(dotnetParameters.ProjectOrSolutionPath)+ .SetConfiguration(Configuration)+ .SetFramework(dotnetParameters.TargetFramework)+ .SetRuntime(dotnetParameters.RuntimeIdentifier)+ .SetSelfContained(dotnetParameters.Portable)+ .SetPublishSingleFile(true)+ .SetPublishReadyToRun(true)+ .SetPublishTrimmed(true) /* Required for MacCatalyst*/+ .SetVerbosity(DotNetVerbosity.Quiet)+ .SetProcessArgumentConfigurator(_ => _.Add("/p:CreatePackage=True")) /* Will create an installable .pkg */+ .SetNoRestore(true) /* workaround for https://github.com/xamarin/xamarin-macios/issues/15664#issuecomment-1233123515 */+ .SetOutput(RootDirectory / "publish" / dotnetParameters.OutputPath));+ }+ }+if (PlatformTargets.Contains(PlatformTarget.CLI)){foreach (DotnetParameters dotnetParameters in GetDotnetParametersForCliApp())@@ -162,10 +211,11 @@ class Build : NukeBuildIEnumerable<DotnetParameters> GetDotnetParametersForCliApp(){string publishProject = "DevToys.CLI";- Project project = Solution.GetProject(publishProject);+ Project project;if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)){+ project = MacSolution.GetProject(publishProject);foreach (string targetFramework in project.GetTargetFrameworks()){// TODO: I believe that on macOS, PublishTrimmed may be mandatory?@@ -178,6 +228,7 @@ class Build : NukeBuild}else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)){+ project = WindowsSolution.GetProject(publishProject);foreach (string targetFramework in project.GetTargetFrameworks()){yield return new DotnetParameters(project.Path, "win10-x64", targetFramework, portable: false);diff --git a/src/build/Restore/RestoreTask.cs b/src/build/Restore/RestoreTask.csindex 0ffb969d9..486cd40fa 100644--- a/src/build/Restore/RestoreTask.cs+++ b/src/build/Restore/RestoreTask.cs@@ -5,6 +5,7 @@ using Nuke.Common.IO;using Nuke.Common.Tooling;using Nuke.Common.Tools.PowerShell;using Serilog;+using Output = Nuke.Common.Tooling.Output;internal static class RestoreTask{@@ -35,7 +36,7 @@ internal static class RestoreTaskprivate static Task RestoreUnixAsync(AbsolutePath rootDirectory){- return Bash(rootDirectory / "ini.sh");+ return Bash(rootDirectory / "init.sh");}public static Task<int> Bash(string cmd)@@ -46,8 +47,8 @@ internal static class RestoreTask{StartInfo = new ProcessStartInfo{- FileName = "bash",- Arguments = $"-c \"{escapedArgs}\"",+ FileName = "/bin/bash",+ Arguments = $"-c \"sudo sh {escapedArgs}\"",RedirectStandardOutput = true,RedirectStandardError = true,UseShellExecute = false,diff --git a/src/build/_build.csproj b/src/build/_build.csprojindex 103740116..fe0050e25 100644--- a/src/build/_build.csproj+++ b/src/build/_build.csproj@@ -8,7 +8,6 @@<NukeRootDirectory>..\..</NukeRootDirectory><NukeScriptDirectory>..\..</NukeScriptDirectory><NukeTelemetryVersion>1</NukeTelemetryVersion>- <UseAppHost Condition="$(IsMac)">false</UseAppHost><EnableCentralBuildOutput>false</EnableCentralBuildOutput></PropertyGroup>diff --git a/src/build/_build.csproj.DotSettings b/src/build/_build.csproj.DotSettingsindex c8947fcec..7bc28484c 100644--- a/src/build/_build.csproj.DotSettings+++ b/src/build/_build.csproj.DotSettings@@ -1,4 +1,4 @@-<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">+<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=HeapView_002EDelegateAllocation/@EntryIndexedValue">DO_NOT_SHOW</s:String><s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableHidesOuterVariable/@EntryIndexedValue">DO_NOT_SHOW</s:String><s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>@@ -20,6 +20,7 @@<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean><s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean><s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>+ <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean><s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean><s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean><s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>