From bcfa3318abaf962a7fd48866656b4cea677c6f20 Mon Sep 17 00:00:00 2001 From: Marton Balassa <7115274+BalassaMarton@users.noreply.github.com> Date: Thu, 9 Mar 2023 19:26:09 +0100 Subject: [PATCH] Moved the shell and node-launcher under src/ --- .gitignore | 6 + Directory.Build.props | 3 +- .../Node-launcher/MultiWindowDemo/index.html | 38 ------ .../Node-launcher/MultiWindowDemo/popup.html | 24 ---- Tryouts/Prototypes/Shell/Shell.csproj | 47 ------- Tryouts/serve-multiwindow-app.ps1 | 1 + build/dotnet-pack.ps1 | 15 +++ package-lock.json | 118 +++++++++++------- package.json | 1 + .../Shell => src/shell/dotnet}/.gitignore | 0 src/shell/dotnet/README.md | 16 +++ .../Shell => src/shell/dotnet}/Shell.sln | 26 ++-- .../shell/dotnet}/Shell/App.xaml | 0 .../shell/dotnet}/Shell/App.xaml.cs | 0 .../shell/dotnet}/Shell/AssemblyInfo.cs | 0 .../ImageSource/DefaultImageSourcePolicy.cs | 0 .../EnvironmentImageSourcePolicy.cs | 0 .../Shell/ImageSource/IImageSourcePolicy.cs | 0 .../Shell/ImageSource/ImageSourceProvider.cs | 0 .../shell/dotnet}/Shell/MainWindow.xaml | 0 .../shell/dotnet}/Shell/MainWindow.xaml.cs | 0 .../dotnet}/Shell/Manifest/ManifestModel.cs | 0 .../dotnet}/Shell/Manifest/ManifestParser.cs | 0 .../dotnet}/Shell/Manifest/ModuleModel.cs | 0 .../Shell/Manifest/exampleManifest.json | 0 src/shell/dotnet/Shell/Shell.csproj | 49 ++++++++ .../Shell/Utilities/CommandLineParser.cs | 0 .../shell/dotnet}/Shell/WebWindow.xaml | 0 .../shell/dotnet}/Shell/WebWindow.xaml.cs | 0 .../shell/dotnet}/Shell/WebWindowOptions.cs | 0 .../shell/dotnet}/Shell/appsettings.json | 0 src/shell/dotnet/add-to-path.ps1 | 13 ++ .../Node-launcher => src/shell/js}/.gitignore | 0 .../example.js | 0 .../package.json | 0 .../js/composeui-node-launcher}/README.md | 0 .../composeui-node-launcher}/jest.config.ts | 0 .../js/composeui-node-launcher}/package.json | 0 .../src/BrowserWindow.ts | 0 .../composeui-node-launcher}/src/Launcher.ts | 2 +- .../src/WindowConfig.ts | 0 .../composeui-node-launcher}/src/cli/cli.ts | 0 .../src/cli/executeScriptFile.spec.ts | 0 .../src/cli/executeScrtiptFile.ts | 0 .../js/composeui-node-launcher}/src/index.ts | 0 .../src/launcher.spec.ts | 0 .../js/composeui-node-launcher}/tsconfig.json | 0 47 files changed, 192 insertions(+), 167 deletions(-) delete mode 100644 Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/index.html delete mode 100644 Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/popup.html delete mode 100644 Tryouts/Prototypes/Shell/Shell.csproj create mode 100644 build/dotnet-pack.ps1 rename {Tryouts/Prototypes/Shell => src/shell/dotnet}/.gitignore (100%) create mode 100644 src/shell/dotnet/README.md rename {Tryouts/Prototypes/Shell => src/shell/dotnet}/Shell.sln (60%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/App.xaml (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/App.xaml.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/AssemblyInfo.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/ImageSource/DefaultImageSourcePolicy.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/ImageSource/EnvironmentImageSourcePolicy.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/ImageSource/IImageSourcePolicy.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/ImageSource/ImageSourceProvider.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/MainWindow.xaml (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/MainWindow.xaml.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/Manifest/ManifestModel.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/Manifest/ManifestParser.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/Manifest/ModuleModel.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/Manifest/exampleManifest.json (100%) create mode 100644 src/shell/dotnet/Shell/Shell.csproj rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/Utilities/CommandLineParser.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/WebWindow.xaml (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/WebWindow.xaml.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/WebWindowOptions.cs (100%) rename {Tryouts/Prototypes => src/shell/dotnet}/Shell/appsettings.json (100%) create mode 100644 src/shell/dotnet/add-to-path.ps1 rename {Tryouts/Prototypes/Shell/Node-launcher => src/shell/js}/.gitignore (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Demo => src/shell/js/composeui-node-launcher-example}/example.js (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Demo => src/shell/js/composeui-node-launcher-example}/package.json (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/README.md (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/jest.config.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/package.json (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/BrowserWindow.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/Launcher.ts (92%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/WindowConfig.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/cli/cli.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/cli/executeScriptFile.spec.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/cli/executeScrtiptFile.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/index.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/src/launcher.spec.ts (100%) rename {Tryouts/Prototypes/Shell/Node-launcher/Lib => src/shell/js/composeui-node-launcher}/tsconfig.json (100%) diff --git a/.gitignore b/.gitignore index 3b5376a8a..f92d6725e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ # Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +## +## ComposeUI repo specific items +## +artifacts/ + _site .jekyll-metadata [Oo]bj/ diff --git a/Directory.Build.props b/Directory.Build.props index 437e9bdb1..3d7fafcab 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,6 +2,7 @@ - $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory.TrimEnd('/').TrimEnd('\')) + $(ComposeUIRepositoryRoot)/artifacts/packages/nuget \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/index.html b/Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/index.html deleted file mode 100644 index a4863c285..000000000 --- a/Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Navigation demo - - - - -
-
- - -
-
- - - \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/popup.html b/Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/popup.html deleted file mode 100644 index 62f388a93..000000000 --- a/Tryouts/Prototypes/Shell/Node-launcher/MultiWindowDemo/popup.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - title - - - -
- -
-
- -
- - \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Shell.csproj b/Tryouts/Prototypes/Shell/Shell.csproj deleted file mode 100644 index 6e048a862..000000000 --- a/Tryouts/Prototypes/Shell/Shell.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - WinExe - net6.0-windows - enable - true - false - preview - - - - - - - - - - - - - - - - MSBuild:Compile - - - - - - - PreserveNewest - - - Always - - - - - - - - - - - - diff --git a/Tryouts/serve-multiwindow-app.ps1 b/Tryouts/serve-multiwindow-app.ps1 index 6e78ae345..271d1c4c0 100644 --- a/Tryouts/serve-multiwindow-app.ps1 +++ b/Tryouts/serve-multiwindow-app.ps1 @@ -1,3 +1,4 @@ +cd.. npm i npx lerna run build --stream npx lerna run start --stream --scope "{@morgan-stanley/composeui-example-chart,@morgan-stanley/composeui-example-grid}" diff --git a/build/dotnet-pack.ps1 b/build/dotnet-pack.ps1 new file mode 100644 index 000000000..6aae0b085 --- /dev/null +++ b/build/dotnet-pack.ps1 @@ -0,0 +1,15 @@ +. "$PSScriptRoot/dotnet-common.ps1" + +$failedSolutions = @() + +foreach ($sln in GetSolutions) { + dotnet pack $sln --configuration Release --no-build + + if ($LASTEXITCODE -ne 0 ) { + $failedSolutions += $sln + } +} + +if ($failedSolutions.count -gt 0) { + throw "Build FAILED for solutions $failedSolutions" +} diff --git a/package-lock.json b/package-lock.json index a986df55e..757d4c2b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "name": "@morgan-stanley/composeui-web-modules", "workspaces": [ "src/messaging/js/*", + "src/shell/js/*", "Tryouts/Plugins/ApplicationPlugins/*", "Tryouts/Prototypes/Shell/Node-launcher/*" ], @@ -5656,11 +5657,11 @@ "link": true }, "node_modules/@morgan-stanley/composeui-node-launcher": { - "resolved": "Tryouts/Prototypes/Shell/Node-launcher/Lib", + "resolved": "src/shell/js/composeui-node-launcher", "link": true }, "node_modules/@morgan-stanley/composeui-node-launcher-example": { - "resolved": "Tryouts/Prototypes/Shell/Node-launcher/Demo", + "resolved": "src/shell/js/composeui-node-launcher-example", "link": true }, "node_modules/@morgan-stanley/composeui-process-explorer-frontend": { @@ -19676,6 +19677,70 @@ "url": "https://github.com/sponsors/isaacs" } }, + "src/shell/js/composeui-node-launcher": { + "version": "0.1.0", + "bin": { + "composeui": "output/cli/cli.js" + }, + "devDependencies": { + "@types/jest": "29.4.0", + "@types/node": "^18.11.18", + "jest": "29.4.3", + "rimraf": "4.1.2", + "ts-jest": "29.0.5", + "ts-node": "10.9.1", + "tslib": "^2.4.0", + "typescript": "^4.7.4" + } + }, + "src/shell/js/composeui-node-launcher-example": { + "version": "0.1.0", + "dependencies": { + "@morgan-stanley/composeui-node-launcher": "*" + } + }, + "src/shell/js/composeui-node-launcher/node_modules/jest": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.3.tgz", + "integrity": "sha512-XvK65feuEFGZT8OO0fB/QAQS+LGHvQpaadkH5p47/j3Ocqq3xf2pK9R+G0GzgfuhXVxEv76qCOOcMb5efLk6PA==", + "dev": true, + "dependencies": { + "@jest/core": "^29.4.3", + "@jest/types": "^29.4.3", + "import-local": "^3.0.2", + "jest-cli": "^29.4.3" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "src/shell/js/composeui-node-launcher/node_modules/rimraf": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", + "deprecated": "Please upgrade to 4.3.1 or higher to fix a potentially damaging issue regarding symbolic link following. See https://github.com/isaacs/rimraf/issues/259 for details.", + "dev": true, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "Tryouts/Messaging-JS": { "name": "@morgan-stanley/composeui-messaging-client", "version": "0.1.0", @@ -19837,6 +19902,7 @@ "Tryouts/Prototypes/Shell/Node-launcher/Demo": { "name": "@morgan-stanley/composeui-node-launcher-example", "version": "0.1.0", + "extraneous": true, "dependencies": { "@morgan-stanley/composeui-node-launcher": "*" } @@ -19844,6 +19910,7 @@ "Tryouts/Prototypes/Shell/Node-launcher/Lib": { "name": "@morgan-stanley/composeui-node-launcher", "version": "0.1.0", + "extraneous": true, "bin": { "composeui": "output/cli/cli.js" }, @@ -19857,45 +19924,6 @@ "tslib": "^2.4.0", "typescript": "^4.7.4" } - }, - "Tryouts/Prototypes/Shell/Node-launcher/Lib/node_modules/jest": { - "version": "29.4.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.4.3", - "@jest/types": "^29.4.3", - "import-local": "^3.0.2", - "jest-cli": "^29.4.3" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "Tryouts/Prototypes/Shell/Node-launcher/Lib/node_modules/rimraf": { - "version": "4.1.2", - "dev": true, - "license": "ISC", - "bin": { - "rimraf": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } } }, "dependencies": { @@ -23927,7 +23955,7 @@ } }, "@morgan-stanley/composeui-node-launcher": { - "version": "file:Tryouts/Prototypes/Shell/Node-launcher/Lib", + "version": "file:src/shell/js/composeui-node-launcher", "requires": { "@types/jest": "29.4.0", "@types/node": "^18.11.18", @@ -23941,6 +23969,8 @@ "dependencies": { "jest": { "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.4.3.tgz", + "integrity": "sha512-XvK65feuEFGZT8OO0fB/QAQS+LGHvQpaadkH5p47/j3Ocqq3xf2pK9R+G0GzgfuhXVxEv76qCOOcMb5efLk6PA==", "dev": true, "requires": { "@jest/core": "^29.4.3", @@ -23951,12 +23981,14 @@ }, "rimraf": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", "dev": true } } }, "@morgan-stanley/composeui-node-launcher-example": { - "version": "file:Tryouts/Prototypes/Shell/Node-launcher/Demo", + "version": "file:src/shell/js/composeui-node-launcher-example", "requires": { "@morgan-stanley/composeui-node-launcher": "*" } diff --git a/package.json b/package.json index 8160f8dbd..91fcb2952 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "workspaces": [ "src/messaging/js/*", + "src/shell/js/*", "Tryouts/Plugins/ApplicationPlugins/*", "Tryouts/Prototypes/Shell/Node-launcher/*" ], diff --git a/Tryouts/Prototypes/Shell/.gitignore b/src/shell/dotnet/.gitignore similarity index 100% rename from Tryouts/Prototypes/Shell/.gitignore rename to src/shell/dotnet/.gitignore diff --git a/src/shell/dotnet/README.md b/src/shell/dotnet/README.md new file mode 100644 index 000000000..8eecdb6ba --- /dev/null +++ b/src/shell/dotnet/README.md @@ -0,0 +1,16 @@ +# ComposeUI Shell + +This solution contains the ComposeUI shell for Windows. + +# Usage + + +## Usage with `composeui-node-launcher` + +The shell binaries must be globally accessible (ie. included in `PATH`) for `composeui-node-launcher` to work. + +## Development setup + +1. Build the solution +2. Run the `add-to-path.ps1` script to add the shell project's debug output directory to the user's PATH variable. + This step is necessary to make the shell available as a global command. diff --git a/Tryouts/Prototypes/Shell/Shell.sln b/src/shell/dotnet/Shell.sln similarity index 60% rename from Tryouts/Prototypes/Shell/Shell.sln rename to src/shell/dotnet/Shell.sln index f5f526445..ac859f1a2 100644 --- a/Tryouts/Prototypes/Shell/Shell.sln +++ b/src/shell/dotnet/Shell.sln @@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shell", "Shell.csproj", "{E82FEAE8-FDB2-45A6-93B6-E94E5478C796}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shell", "Shell\Shell.csproj", "{E82FEAE8-FDB2-45A6-93B6-E94E5478C796}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{E7A2C581-4BF4-47A5-8A11-59B2DEBADCA7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Messaging.Core", "..\..\..\src\messaging\dotnet\src\Core\MorganStanley.ComposeUI.Messaging.Core.csproj", "{80902059-F301-4B0E-8CFC-D7E8D27016CA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Messaging.Core", "..\..\messaging\dotnet\src\Core\MorganStanley.ComposeUI.Messaging.Core.csproj", "{B2AA5676-2776-4BDA-95F8-BE09D7642393}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Messaging.Server", "..\..\..\src\messaging\dotnet\src\Server\MorganStanley.ComposeUI.Messaging.Server.csproj", "{9D13920A-70A2-4F38-AA9E-8F811A4C4457}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MorganStanley.ComposeUI.Messaging.Server", "..\..\messaging\dotnet\src\Server\MorganStanley.ComposeUI.Messaging.Server.csproj", "{F0DFAB55-14F5-4FF6-A12F-37B1745D4551}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,21 +21,21 @@ Global {E82FEAE8-FDB2-45A6-93B6-E94E5478C796}.Debug|Any CPU.Build.0 = Debug|Any CPU {E82FEAE8-FDB2-45A6-93B6-E94E5478C796}.Release|Any CPU.ActiveCfg = Release|Any CPU {E82FEAE8-FDB2-45A6-93B6-E94E5478C796}.Release|Any CPU.Build.0 = Release|Any CPU - {80902059-F301-4B0E-8CFC-D7E8D27016CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {80902059-F301-4B0E-8CFC-D7E8D27016CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {80902059-F301-4B0E-8CFC-D7E8D27016CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {80902059-F301-4B0E-8CFC-D7E8D27016CA}.Release|Any CPU.Build.0 = Release|Any CPU - {9D13920A-70A2-4F38-AA9E-8F811A4C4457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D13920A-70A2-4F38-AA9E-8F811A4C4457}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D13920A-70A2-4F38-AA9E-8F811A4C4457}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D13920A-70A2-4F38-AA9E-8F811A4C4457}.Release|Any CPU.Build.0 = Release|Any CPU + {B2AA5676-2776-4BDA-95F8-BE09D7642393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2AA5676-2776-4BDA-95F8-BE09D7642393}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2AA5676-2776-4BDA-95F8-BE09D7642393}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2AA5676-2776-4BDA-95F8-BE09D7642393}.Release|Any CPU.Build.0 = Release|Any CPU + {F0DFAB55-14F5-4FF6-A12F-37B1745D4551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0DFAB55-14F5-4FF6-A12F-37B1745D4551}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0DFAB55-14F5-4FF6-A12F-37B1745D4551}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0DFAB55-14F5-4FF6-A12F-37B1745D4551}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {80902059-F301-4B0E-8CFC-D7E8D27016CA} = {E7A2C581-4BF4-47A5-8A11-59B2DEBADCA7} - {9D13920A-70A2-4F38-AA9E-8F811A4C4457} = {E7A2C581-4BF4-47A5-8A11-59B2DEBADCA7} + {B2AA5676-2776-4BDA-95F8-BE09D7642393} = {E7A2C581-4BF4-47A5-8A11-59B2DEBADCA7} + {F0DFAB55-14F5-4FF6-A12F-37B1745D4551} = {E7A2C581-4BF4-47A5-8A11-59B2DEBADCA7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4C901E6C-4B9A-48C2-AB16-461040DC57B4} diff --git a/Tryouts/Prototypes/Shell/App.xaml b/src/shell/dotnet/Shell/App.xaml similarity index 100% rename from Tryouts/Prototypes/Shell/App.xaml rename to src/shell/dotnet/Shell/App.xaml diff --git a/Tryouts/Prototypes/Shell/App.xaml.cs b/src/shell/dotnet/Shell/App.xaml.cs similarity index 100% rename from Tryouts/Prototypes/Shell/App.xaml.cs rename to src/shell/dotnet/Shell/App.xaml.cs diff --git a/Tryouts/Prototypes/Shell/AssemblyInfo.cs b/src/shell/dotnet/Shell/AssemblyInfo.cs similarity index 100% rename from Tryouts/Prototypes/Shell/AssemblyInfo.cs rename to src/shell/dotnet/Shell/AssemblyInfo.cs diff --git a/Tryouts/Prototypes/Shell/ImageSource/DefaultImageSourcePolicy.cs b/src/shell/dotnet/Shell/ImageSource/DefaultImageSourcePolicy.cs similarity index 100% rename from Tryouts/Prototypes/Shell/ImageSource/DefaultImageSourcePolicy.cs rename to src/shell/dotnet/Shell/ImageSource/DefaultImageSourcePolicy.cs diff --git a/Tryouts/Prototypes/Shell/ImageSource/EnvironmentImageSourcePolicy.cs b/src/shell/dotnet/Shell/ImageSource/EnvironmentImageSourcePolicy.cs similarity index 100% rename from Tryouts/Prototypes/Shell/ImageSource/EnvironmentImageSourcePolicy.cs rename to src/shell/dotnet/Shell/ImageSource/EnvironmentImageSourcePolicy.cs diff --git a/Tryouts/Prototypes/Shell/ImageSource/IImageSourcePolicy.cs b/src/shell/dotnet/Shell/ImageSource/IImageSourcePolicy.cs similarity index 100% rename from Tryouts/Prototypes/Shell/ImageSource/IImageSourcePolicy.cs rename to src/shell/dotnet/Shell/ImageSource/IImageSourcePolicy.cs diff --git a/Tryouts/Prototypes/Shell/ImageSource/ImageSourceProvider.cs b/src/shell/dotnet/Shell/ImageSource/ImageSourceProvider.cs similarity index 100% rename from Tryouts/Prototypes/Shell/ImageSource/ImageSourceProvider.cs rename to src/shell/dotnet/Shell/ImageSource/ImageSourceProvider.cs diff --git a/Tryouts/Prototypes/Shell/MainWindow.xaml b/src/shell/dotnet/Shell/MainWindow.xaml similarity index 100% rename from Tryouts/Prototypes/Shell/MainWindow.xaml rename to src/shell/dotnet/Shell/MainWindow.xaml diff --git a/Tryouts/Prototypes/Shell/MainWindow.xaml.cs b/src/shell/dotnet/Shell/MainWindow.xaml.cs similarity index 100% rename from Tryouts/Prototypes/Shell/MainWindow.xaml.cs rename to src/shell/dotnet/Shell/MainWindow.xaml.cs diff --git a/Tryouts/Prototypes/Shell/Manifest/ManifestModel.cs b/src/shell/dotnet/Shell/Manifest/ManifestModel.cs similarity index 100% rename from Tryouts/Prototypes/Shell/Manifest/ManifestModel.cs rename to src/shell/dotnet/Shell/Manifest/ManifestModel.cs diff --git a/Tryouts/Prototypes/Shell/Manifest/ManifestParser.cs b/src/shell/dotnet/Shell/Manifest/ManifestParser.cs similarity index 100% rename from Tryouts/Prototypes/Shell/Manifest/ManifestParser.cs rename to src/shell/dotnet/Shell/Manifest/ManifestParser.cs diff --git a/Tryouts/Prototypes/Shell/Manifest/ModuleModel.cs b/src/shell/dotnet/Shell/Manifest/ModuleModel.cs similarity index 100% rename from Tryouts/Prototypes/Shell/Manifest/ModuleModel.cs rename to src/shell/dotnet/Shell/Manifest/ModuleModel.cs diff --git a/Tryouts/Prototypes/Shell/Manifest/exampleManifest.json b/src/shell/dotnet/Shell/Manifest/exampleManifest.json similarity index 100% rename from Tryouts/Prototypes/Shell/Manifest/exampleManifest.json rename to src/shell/dotnet/Shell/Manifest/exampleManifest.json diff --git a/src/shell/dotnet/Shell/Shell.csproj b/src/shell/dotnet/Shell/Shell.csproj new file mode 100644 index 000000000..988dc322d --- /dev/null +++ b/src/shell/dotnet/Shell/Shell.csproj @@ -0,0 +1,49 @@ + + + + WinExe + net6.0-windows + enable + true + false + preview + ComposeUI-Shell + + + + + + + + + + + + + + + + MSBuild:Compile + + + + + + + PreserveNewest + + + Always + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tryouts/Prototypes/Shell/Utilities/CommandLineParser.cs b/src/shell/dotnet/Shell/Utilities/CommandLineParser.cs similarity index 100% rename from Tryouts/Prototypes/Shell/Utilities/CommandLineParser.cs rename to src/shell/dotnet/Shell/Utilities/CommandLineParser.cs diff --git a/Tryouts/Prototypes/Shell/WebWindow.xaml b/src/shell/dotnet/Shell/WebWindow.xaml similarity index 100% rename from Tryouts/Prototypes/Shell/WebWindow.xaml rename to src/shell/dotnet/Shell/WebWindow.xaml diff --git a/Tryouts/Prototypes/Shell/WebWindow.xaml.cs b/src/shell/dotnet/Shell/WebWindow.xaml.cs similarity index 100% rename from Tryouts/Prototypes/Shell/WebWindow.xaml.cs rename to src/shell/dotnet/Shell/WebWindow.xaml.cs diff --git a/Tryouts/Prototypes/Shell/WebWindowOptions.cs b/src/shell/dotnet/Shell/WebWindowOptions.cs similarity index 100% rename from Tryouts/Prototypes/Shell/WebWindowOptions.cs rename to src/shell/dotnet/Shell/WebWindowOptions.cs diff --git a/Tryouts/Prototypes/Shell/appsettings.json b/src/shell/dotnet/Shell/appsettings.json similarity index 100% rename from Tryouts/Prototypes/Shell/appsettings.json rename to src/shell/dotnet/Shell/appsettings.json diff --git a/src/shell/dotnet/add-to-path.ps1 b/src/shell/dotnet/add-to-path.ps1 new file mode 100644 index 000000000..59b629dfa --- /dev/null +++ b/src/shell/dotnet/add-to-path.ps1 @@ -0,0 +1,13 @@ +# Adds the Shell project's Debug output directory to the PATH environment variable +# so that it can be invoked from command line and the node launcher + +$path = [System.Environment]::GetEnvironmentVariable("PATH", [EnvironmentVariableTarget]::User) +$paths = $path -split ";" +$shellPath = Resolve-Path -Path "./Shell/bin/Debug/net6.0-windows" + +if ($paths.indexof($shellPath.Path) -ne -1) { exit } + +$paths += $shellPath.Path +$path = $paths -join ";" +[System.Environment]::SetEnvironmentVariable("PATH", $path, [EnvironmentVariableTarget]::User) +Write-Host "Appended '$($shellPath.Path)' to PATH" diff --git a/Tryouts/Prototypes/Shell/Node-launcher/.gitignore b/src/shell/js/.gitignore similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/.gitignore rename to src/shell/js/.gitignore diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Demo/example.js b/src/shell/js/composeui-node-launcher-example/example.js similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Demo/example.js rename to src/shell/js/composeui-node-launcher-example/example.js diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Demo/package.json b/src/shell/js/composeui-node-launcher-example/package.json similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Demo/package.json rename to src/shell/js/composeui-node-launcher-example/package.json diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/README.md b/src/shell/js/composeui-node-launcher/README.md similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/README.md rename to src/shell/js/composeui-node-launcher/README.md diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/jest.config.ts b/src/shell/js/composeui-node-launcher/jest.config.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/jest.config.ts rename to src/shell/js/composeui-node-launcher/jest.config.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/package.json b/src/shell/js/composeui-node-launcher/package.json similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/package.json rename to src/shell/js/composeui-node-launcher/package.json diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/BrowserWindow.ts b/src/shell/js/composeui-node-launcher/src/BrowserWindow.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/BrowserWindow.ts rename to src/shell/js/composeui-node-launcher/src/BrowserWindow.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/Launcher.ts b/src/shell/js/composeui-node-launcher/src/Launcher.ts similarity index 92% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/Launcher.ts rename to src/shell/js/composeui-node-launcher/src/Launcher.ts index 660da879b..492a609da 100644 --- a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/Launcher.ts +++ b/src/shell/js/composeui-node-launcher/src/Launcher.ts @@ -33,7 +33,7 @@ export class Launcher { if (!config?.url) { throw new Error("At least the url must be specified!"); } - const child = execFile("Shell.exe", argsArray, (error, stdout, stderr) => { + const child = execFile("ComposeUI-Shell.exe", argsArray, (error, stdout, stderr) => { console.log(stdout); if (error) { throw error; diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/WindowConfig.ts b/src/shell/js/composeui-node-launcher/src/WindowConfig.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/WindowConfig.ts rename to src/shell/js/composeui-node-launcher/src/WindowConfig.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/cli/cli.ts b/src/shell/js/composeui-node-launcher/src/cli/cli.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/cli/cli.ts rename to src/shell/js/composeui-node-launcher/src/cli/cli.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/cli/executeScriptFile.spec.ts b/src/shell/js/composeui-node-launcher/src/cli/executeScriptFile.spec.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/cli/executeScriptFile.spec.ts rename to src/shell/js/composeui-node-launcher/src/cli/executeScriptFile.spec.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/cli/executeScrtiptFile.ts b/src/shell/js/composeui-node-launcher/src/cli/executeScrtiptFile.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/cli/executeScrtiptFile.ts rename to src/shell/js/composeui-node-launcher/src/cli/executeScrtiptFile.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/index.ts b/src/shell/js/composeui-node-launcher/src/index.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/index.ts rename to src/shell/js/composeui-node-launcher/src/index.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/src/launcher.spec.ts b/src/shell/js/composeui-node-launcher/src/launcher.spec.ts similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/src/launcher.spec.ts rename to src/shell/js/composeui-node-launcher/src/launcher.spec.ts diff --git a/Tryouts/Prototypes/Shell/Node-launcher/Lib/tsconfig.json b/src/shell/js/composeui-node-launcher/tsconfig.json similarity index 100% rename from Tryouts/Prototypes/Shell/Node-launcher/Lib/tsconfig.json rename to src/shell/js/composeui-node-launcher/tsconfig.json