diff --git a/CMakeLists.txt b/CMakeLists.txt index 97ccd5533..e60618893 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -326,16 +326,24 @@ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) include(InstallRequiredSystemLibraries) if(WIN32) - set(NSCP_SHA256SUM "") - if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi) - file(SHA256 ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi NSCP_SHA256SUM) - endif() - - if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi OR NOT ${NSCP_SHA256SUM} STREQUAL "226cef0154daf1f9b93d0e168068e723e2be407548e5c4772557401d87535b48") - file(DOWNLOAD https://github.com/mickem/nscp/releases/download/0.4.3.143/NSCP-0.4.3.143-Win32.msi ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi SHOW_PROGRESS) + if(CMAKE_VS_PLATFORM_NAME STREQUAL "x64") + set(NSCP_URL "https://github.com/mickem/nscp/releases/download/0.4.4.19/NSCP-0.4.4.19-x64.msi") + set(NSCP_SHA256 "36c487777e9488cbf7a15db3a87f63ff6d6af46398d6f36b25734041e3e13900") + else() + set(NSCP_URL "https://github.com/mickem/nscp/releases/download/0.4.4.19/NSCP-0.4.4.19-Win32.msi") + set(NSCP_SHA256 "f05bc00712966901531d5a9354c57e95c34eb65b4748cf3ebc305ccc8fa29cce") endif() - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi DESTINATION ${CMAKE_INSTALL_SBINDIR}) + set(NSCP_SHA256SUM "") + if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi) + file(SHA256 ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi NSCP_SHA256SUM) + endif() + + if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi OR NOT ${NSCP_SHA256SUM} STREQUAL ${NSCP_SHA256}) + file(DOWNLOAD ${NSCP_URL} ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi SHOW_PROGRESS) + endif() + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi DESTINATION ${CMAKE_INSTALL_SBINDIR}) install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} diff --git a/agent/windows-setup-agent/SetupWizard.cs b/agent/windows-setup-agent/SetupWizard.cs index 6186f3311..38aab03ff 100644 --- a/agent/windows-setup-agent/SetupWizard.cs +++ b/agent/windows-setup-agent/SetupWizard.cs @@ -255,7 +255,7 @@ namespace Icinga Process proc = new Process(); proc.StartInfo.FileName = "msiexec.exe"; - proc.StartInfo.Arguments = "/i \"" + Program.Icinga2InstallDir + "\\sbin\\NSCP-Win32.msi\""; + proc.StartInfo.Arguments = "/i \"" + Program.Icinga2InstallDir + "\\sbin\\NSCP.msi\""; proc.Start(); proc.WaitForExit(); }