From 921c0fa5f6bf585c5745059470b8d9e89369f267 Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Wed, 24 Apr 2019 19:31:14 +0200 Subject: [PATCH 1/4] Raise .NET target version to 4.6 This sets the target .NET framework version to 4.6. The Prefer32Bit option was introduced with .NET 4. When set to true this will generate x86 machine code on a 64-bit system, but this only affects projects where the platform target is set to Any CPU. CMake generates the project based on the system. Since the Prefer32Bit option was auto generated during the switch to the new .NET version I ensured this is explicitly set to false. refs #7090 --- .../windows-setup-agent/Icinga2SetupAgent.csproj | 16 ++++++++++++++-- .../Properties/Resources.Designer.cs | 4 ++-- .../Properties/Settings.Designer.cs | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/agent/windows-setup-agent/Icinga2SetupAgent.csproj b/agent/windows-setup-agent/Icinga2SetupAgent.csproj index 8778af498..17fe54ff5 100644 --- a/agent/windows-setup-agent/Icinga2SetupAgent.csproj +++ b/agent/windows-setup-agent/Icinga2SetupAgent.csproj @@ -9,7 +9,7 @@ Properties Icinga Icinga2SetupAgent - v2.0 + v4.6 512 publish\ @@ -37,6 +37,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -46,6 +47,7 @@ TRACE prompt 4 + false x86 @@ -55,6 +57,7 @@ TRACE prompt 4 + false x86 @@ -64,6 +67,7 @@ TRACE prompt 4 + false x86 @@ -74,6 +78,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -83,6 +88,7 @@ TRACE prompt 4 + false x86 @@ -92,6 +98,7 @@ TRACE prompt 4 + false x86 @@ -101,6 +108,7 @@ TRACE prompt 4 + false x64 @@ -111,6 +119,7 @@ DEBUG;TRACE prompt 4 + false x64 @@ -120,6 +129,7 @@ TRACE prompt 4 + false x64 @@ -129,6 +139,7 @@ TRACE prompt 4 + false x64 @@ -138,6 +149,7 @@ TRACE prompt 4 + false icinga.ico @@ -247,4 +259,4 @@ --> - + \ No newline at end of file diff --git a/agent/windows-setup-agent/Properties/Resources.Designer.cs b/agent/windows-setup-agent/Properties/Resources.Designer.cs index cb365d286..78be5e910 100644 --- a/agent/windows-setup-agent/Properties/Resources.Designer.cs +++ b/agent/windows-setup-agent/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34011 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +19,7 @@ namespace Icinga.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/agent/windows-setup-agent/Properties/Settings.Designer.cs b/agent/windows-setup-agent/Properties/Settings.Designer.cs index f1515dde6..ad169dae3 100644 --- a/agent/windows-setup-agent/Properties/Settings.Designer.cs +++ b/agent/windows-setup-agent/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34011 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ namespace Icinga.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); From 773921ce6810c1bd3544c5be20e8bf740a18e6b2 Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Wed, 24 Apr 2019 20:05:16 +0200 Subject: [PATCH 2/4] Drop .NET 2.0/3.0/3.5 as supported .NET platform This drops .NET 2.0, 3.0 and 3.5 as as supported .NET runtime platform. The maximum version can only be v4.0, which targets currently all .NET 4.x releases. Therefor I added the sku flag to enforce .NET 4.6 as minimum runtime platform. Since .NET 4.x is backwards compatible we should be safe to only set the minimum version/sku here (i.e. we should be able to run the application on a system with .NET 4.7) refs #7090 --- agent/windows-setup-agent/App.config | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/agent/windows-setup-agent/App.config b/agent/windows-setup-agent/App.config index 49c7a61c6..5669c3558 100644 --- a/agent/windows-setup-agent/App.config +++ b/agent/windows-setup-agent/App.config @@ -1,7 +1,6 @@  - - - - + + + \ No newline at end of file From 54d9470c6b3bd5de28cc2a160a0de627b5723229 Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Thu, 25 Apr 2019 18:14:04 +0200 Subject: [PATCH 3/4] Use WixNetFxExtension to detect installed .NET This implements the use of the WixNetFxExtension for the WIX toolset, to detect the installed .NET Framework version. If the installed .NET version is lower than 4.6 the installation process will terminate with the note to install at least .NET Framework 4.6. refs #7090 --- CMakeLists.txt | 2 +- icinga-installer/icinga2.wixpatch.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f8eb1217..ac57471fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -414,11 +414,11 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt") set(CPACK_PACKAGE_EXECUTABLES "Icinga2SetupAgent;Icinga 2 Agent Wizard") set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icinga-app\\\\icinga.ico") set(CPACK_WIX_UPGRADE_GUID "52F2BEAA-4DF0-4C3E-ABDC-C0F61DE4DF8A") -set(CPACK_WIX_EXTENSIONS "WixUtilExtension") set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/bannrbmp.bmp") set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/dlgbmp.bmp") set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch.Debug") set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch") +set(CPACK_WIX_EXTENSIONS "WixUtilExtension" "WixNetFxExtension") set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "sbin") set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) diff --git a/icinga-installer/icinga2.wixpatch.cmake b/icinga-installer/icinga2.wixpatch.cmake index 4232be01e..5ee6361ae 100644 --- a/icinga-installer/icinga2.wixpatch.cmake +++ b/icinga-installer/icinga2.wixpatch.cmake @@ -3,6 +3,11 @@ 1 Disable + + + + + From 3b1bd4d13178178a52ee83c3138c48b99c67707f Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Mon, 29 Apr 2019 11:41:49 +0200 Subject: [PATCH 4/4] Doc: Raise required .NET framework version This raises the required .NET framework version in the installation documentation. This also adds notes in the upgrading documentation for the new .NET Framework requirements. Update .NET requirements for development on Windows. refs #7090 --- doc/06-distributed-monitoring.md | 2 +- doc/16-upgrading-icinga-2.md | 7 +++++++ doc/21-development.md | 14 +------------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/doc/06-distributed-monitoring.md b/doc/06-distributed-monitoring.md index 00a91157b..7420345dc 100644 --- a/doc/06-distributed-monitoring.md +++ b/doc/06-distributed-monitoring.md @@ -697,7 +697,7 @@ Requirements: * Windows Vista/Server 2008 or higher * Versions older than Windows 10/Server 2016 require the [Universal C Runtime for Windows](https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows) -* [Microsoft .NET Framework 2.0](https://www.microsoft.com/de-de/download/details.aspx?id=1639) for the setup wizard +* [Microsoft .NET Framework 4.6] or higher (https://www.microsoft.com/en-US/download/details.aspx?id=53344) for the setup wizard The installer package includes the [NSClient++](https://www.nsclient.org/) package so that Icinga 2 can use its built-in plugins. You can find more details in diff --git a/doc/16-upgrading-icinga-2.md b/doc/16-upgrading-icinga-2.md index 665f41b23..b309e6932 100644 --- a/doc/16-upgrading-icinga-2.md +++ b/doc/16-upgrading-icinga-2.md @@ -36,6 +36,13 @@ we provide Boost as package on our [package repository](https://packages.icinga. After upgrade, you may remove the old Boost packages (1.53 or anything above) if you don't need them anymore. +#### Added: .NET Framework 4.6 + +We modernized the graphical Windows wizard to use the more recent .NET Framework 4.6. This requires that Windows versions +older than Windows 10/Windows Server 2016 installs at least [.NET Framework 4.6](https://www.microsoft.com/en-US/download/details.aspx?id=53344). Starting with Windows 10/Windows Server 2016 a .NET Framework 4.6 or higher is installed by default. + +The MSI-Installer package checks if the .NET Framework 4.6 or higher is present, if not the installation wizard will abort with an error message telling you to install at least .NET Framework 4.6. + #### Removed: YAJL Our JSON library, namely [YAJL](https://github.com/lloyd/yajl), isn't maintained anymore diff --git a/doc/21-development.md b/doc/21-development.md index 0053106b4..fe0da2ccd 100644 --- a/doc/21-development.md +++ b/doc/21-development.md @@ -985,7 +985,7 @@ You need a free Microsoft account to download and also store your preferences. Choose these individual components on Visual Studio 2017: * .NET - * .NET Framework 3.5 development tools + * .NET Framework 4.6 targeting pack * .NET Framework 4.6.1 SDK * .NET Framework 4.6.1 targeting pack * Code tools @@ -1010,20 +1010,8 @@ Choose these individual components on Visual Studio 2017: * Uncategorized * GitHub Extension for Visual Studio - After a while, Visual Studio will be ready. -#### .NET Framework 3.5 - -Windows 10 has .NET Framework >= 4.6 installed by default. The Icinga Agent Wizard -is built on .NET Framework 2.0 which is not included in .NET Framework 4.6. - -Windows 10 provides .NET Framework 3.5 which includes .NET Framework 2.0. - -Navigate into `Control Panel` -> `Programs` -> `Turn Windows features on or off`. -Select `.NET Framework 3.5 (includes .NET 2.0 and 3.0)` and wait until the installation process -is finished. - #### Flex and Bison Install it using [chocolatey](https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html):