From f84ee65c0f258f8c42588bdd9d938278465f069e Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Sun, 14 Oct 2018 16:33:58 +0200 Subject: [PATCH] Updates Jarvis to new project format Closes #77 --- build.cake | 7 +- global.json | 5 + src/Jarvis.Package/Jarvis.Package.wapproj | 6 +- src/Jarvis.Package/Package.appxmanifest | 2 +- src/Jarvis.sln | 2 +- .../{JarvisApplication.xaml => App.xaml} | 2 +- ...{JarvisApplication.xaml.cs => App.xaml.cs} | 2 +- src/Jarvis/Bootstrapper.cs | 2 +- src/Jarvis/Jarvis.csproj | 308 +++--------------- src/Jarvis/Properties/AssemblyInfo.cs | 4 +- src/Jarvis/Services/ApplicationService.cs | 4 +- src/Jarvis/Services/JarvisTaskbarIcon.cs | 2 +- 12 files changed, 66 insertions(+), 280 deletions(-) create mode 100644 global.json rename src/Jarvis/{JarvisApplication.xaml => App.xaml} (93%) rename src/Jarvis/{JarvisApplication.xaml.cs => App.xaml.cs} (95%) diff --git a/build.cake b/build.cake index f1e0aab..2b5489a 100644 --- a/build.cake +++ b/build.cake @@ -60,7 +60,6 @@ Task("Patch-Version") }); Task("Patch-AppX-Info") - .WithCriteria(() => patch) .Does(() => { var manifest = File("./src/Jarvis.Package/Package.appxmanifest"); @@ -96,9 +95,9 @@ Task("Copy-Binaries") .IsDependentOn("Build") .Does(() => { - CopyFiles($"./src/Jarvis/bin/{configuration}/*", "./.artifacts/bin"); - CopyFiles($"./src/Jarvis/bin/{configuration}/*", "./.artifacts/installer/bin"); - CopyFiles($"./src/Jarvis.Package/AppPackages/Jarvis.Package_{version.MsiVersion}.0_*/**/*", "./.artifacts/appx"); + CopyFiles($"./src/Jarvis/bin/{configuration}/net47/*", "./.artifacts/bin"); + CopyFiles($"./src/Jarvis/bin/{configuration}/net47/*", "./.artifacts/installer/bin"); + CopyFiles($"./src/Jarvis.Package/bin/AnyCPU/{configuration}/**/*", "./.artifacts/appx"); DeleteFiles("./.artifacts/installer/bin/*.xml"); DeleteFiles("./.artifacts/installer/bin/*.pdb"); diff --git a/global.json b/global.json new file mode 100644 index 0000000..4393151 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "MSBuild.Sdk.Extras": "1.6.20-preview" + } + } \ No newline at end of file diff --git a/src/Jarvis.Package/Jarvis.Package.wapproj b/src/Jarvis.Package/Jarvis.Package.wapproj index 520d78b..4bcf36d 100644 --- a/src/Jarvis.Package/Jarvis.Package.wapproj +++ b/src/Jarvis.Package/Jarvis.Package.wapproj @@ -20,9 +20,11 @@ 121a7682-edca-4031-b9bf-3b01ea6675dd - 10.0.17134.0 + 10.0.16299.0 10.0.15063.0 en-US + False + Always Jarvis.Package_TemporaryKey.pfx ..\Jarvis\Jarvis.csproj E018FA042C858503529CA2F55A2CF3B1BB569312 @@ -81,7 +83,7 @@ - + \ No newline at end of file diff --git a/src/Jarvis.Package/Package.appxmanifest b/src/Jarvis.Package/Package.appxmanifest index c5bc4a9..093fb4b 100644 --- a/src/Jarvis.Package/Package.appxmanifest +++ b/src/Jarvis.Package/Package.appxmanifest @@ -1,6 +1,6 @@  - + Jarvis - Your robotic butler Spectre Systems AB diff --git a/src/Jarvis.sln b/src/Jarvis.sln index 63cdc7d..a39d9fa 100644 --- a/src/Jarvis.sln +++ b/src/Jarvis.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2010 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jarvis", "Jarvis\Jarvis.csproj", "{7C90B0C6-A0F6-4E4B-BE77-A81F893E167E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jarvis", "Jarvis\Jarvis.csproj", "{7C90B0C6-A0F6-4E4B-BE77-A81F893E167E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jarvis.Core", "Jarvis.Core\Jarvis.Core.csproj", "{5826D320-9026-4BE9-8C82-893C55B80871}" EndProject diff --git a/src/Jarvis/JarvisApplication.xaml b/src/Jarvis/App.xaml similarity index 93% rename from src/Jarvis/JarvisApplication.xaml rename to src/Jarvis/App.xaml index 0b4efbf..94ca007 100644 --- a/src/Jarvis/JarvisApplication.xaml +++ b/src/Jarvis/App.xaml @@ -1,4 +1,4 @@ - diff --git a/src/Jarvis/JarvisApplication.xaml.cs b/src/Jarvis/App.xaml.cs similarity index 95% rename from src/Jarvis/JarvisApplication.xaml.cs rename to src/Jarvis/App.xaml.cs index 8e40d27..20681aa 100644 --- a/src/Jarvis/JarvisApplication.xaml.cs +++ b/src/Jarvis/App.xaml.cs @@ -8,7 +8,7 @@ namespace Jarvis { - public partial class JarvisApplication : IDisposable + public partial class App : IDisposable { private Mutex _mutex; diff --git a/src/Jarvis/Bootstrapper.cs b/src/Jarvis/Bootstrapper.cs index c482b54..611aadf 100644 --- a/src/Jarvis/Bootstrapper.cs +++ b/src/Jarvis/Bootstrapper.cs @@ -37,7 +37,7 @@ protected override void Configure() // Configure container. var builder = new ContainerBuilder(); - builder.RegisterInstance(Application).As(); + builder.RegisterInstance(Application).As(); builder.RegisterModule(new JarvisModule()); builder.RegisterModule(); builder.RegisterModule(); diff --git a/src/Jarvis/Jarvis.csproj b/src/Jarvis/Jarvis.csproj index 2b87e3d..04e4949 100644 --- a/src/Jarvis/Jarvis.csproj +++ b/src/Jarvis/Jarvis.csproj @@ -1,286 +1,66 @@ - - - + + - Debug - AnyCPU - {7C90B0C6-A0F6-4E4B-BE77-A81F893E167E} WinExe - Jarvis - Jarvis - v4.7 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - latest - - - AnyCPU - true - full - false - bin\Debug\ - TRACE;DEBUG;FAKERELEASE - prompt - 4 - false - - - AnyCPU + net47 + true pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - true - true - - Jarvis.ico - - - - ..\packages\Autofac.4.6.2\lib\net45\Autofac.dll - - - ..\packages\Caliburn.Micro.Core.3.2.0\lib\net45\Caliburn.Micro.dll - - - ..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.dll - - - ..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.Core.dll - - - ..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll - - - ..\packages\JetBrains.Annotations.11.1.0\lib\net20\JetBrains.Annotations.dll - - - ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll - - - ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - - - ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - - - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.6.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Spectre.System.0.7.0\lib\net461\Spectre.System.dll - - - - - - - - - - - - ..\packages\Caliburn.Micro.3.2.0\lib\net45\System.Windows.Interactivity.dll - True - - - - - - - - 4.0 - - - - - + - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - IconControl.xaml - - - - - - - - - - JarvisApplication.xaml - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - + + + + - - - - Designer - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - + Designer MSBuild:Compile - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - + - - {6e2c9a93-08d3-42c8-9822-9c17d118e646} - Jarvis.Addin.Files - - - {630865d0-c44b-41bd-aa6e-4697a4a12bd9} - Jarvis.Addin.Google - - - {cbb05832-5634-4611-ada1-e3793c5765d6} - Jarvis.Addin.Wikipedia - - - {5826d320-9026-4be9-8c82-893c55b80871} - Jarvis.Core - + + + + + - + + + + + + + + + + + + + + - - - - - ../Spectre.ruleset - - - Jarvis.JarvisApplication - - - - - - - - + + + - + + True + True + Resources.resx + + - + + ResXFileCodeGenerator + Resources.Designer.cs + - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + \ No newline at end of file diff --git a/src/Jarvis/Properties/AssemblyInfo.cs b/src/Jarvis/Properties/AssemblyInfo.cs index ddd5803..050b1a3 100644 --- a/src/Jarvis/Properties/AssemblyInfo.cs +++ b/src/Jarvis/Properties/AssemblyInfo.cs @@ -9,8 +9,8 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Jarvis")] -[assembly: AssemblyDescription("")] +//[assembly: AssemblyTitle("Jarvis")] +//[assembly: AssemblyDescription("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/Jarvis/Services/ApplicationService.cs b/src/Jarvis/Services/ApplicationService.cs index d63a71a..32d923a 100644 --- a/src/Jarvis/Services/ApplicationService.cs +++ b/src/Jarvis/Services/ApplicationService.cs @@ -13,10 +13,10 @@ namespace Jarvis.Services [UsedImplicitly] public sealed class ApplicationService { - private readonly JarvisApplication _application; + private readonly App _application; public ApplicationService( - JarvisApplication application, + App application, IEventAggregator inbox) { _application = application; diff --git a/src/Jarvis/Services/JarvisTaskbarIcon.cs b/src/Jarvis/Services/JarvisTaskbarIcon.cs index d5eb791..66269dc 100644 --- a/src/Jarvis/Services/JarvisTaskbarIcon.cs +++ b/src/Jarvis/Services/JarvisTaskbarIcon.cs @@ -14,7 +14,7 @@ public sealed class JarvisTaskbarIcon : IDisposable { private readonly TaskbarIcon _icon; - public JarvisTaskbarIcon(JarvisApplication application, TaskbarIconViewModel viewModel) + public JarvisTaskbarIcon(App application, TaskbarIconViewModel viewModel) { _icon = (TaskbarIcon)application.FindResource("SystemTrayIcon"); if (_icon != null)