]> granicus.if.org Git - icinga2/commitdiff
Bundle NSClient++ in Windows installer
authorGunnar Beutner <gunnar@beutner.name>
Tue, 12 May 2015 14:00:04 +0000 (16:00 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 12 May 2015 14:00:04 +0000 (16:00 +0200)
fixes #9238

CMakeLists.txt

index 9fd1f316572c6582920d3d4aa540cad6b85b3842..52c5807e4dc28bb482174419a73a5995f4521405 100644 (file)
@@ -258,6 +258,7 @@ set(CPACK_PACKAGE_EXECUTABLES "Icinga2SetupAgent;Icinga 2 Agent Wizard")
 set(CPACK_NSIS_MUI_FINISHPAGE_RUN "Icinga2SetupAgent")
 set(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "nsExec::Exec 'net stop icinga2'")
 set(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS}\nSleep 10000")
+set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nnsExec::Exec 'msiexec /i \\\"$INSTDIR\\\\sbin\\\\NSCP-0.4.3.143-Win32.msi\\\" /quiet'")
 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nnsExec::Exec 'icacls \\\"$INSTDIR\\\" /grant *S-1-5-20:(oi)(ci)m'")
 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateDirectory '$INSTDIR\\\\etc\\\\icinga2\\\\pki'")
 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateDirectory '$INSTDIR\\\\var\\\\cache\\\\icinga2'")
@@ -279,6 +280,9 @@ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
 include(InstallRequiredSystemLibraries)
 
 if(WIN32)
+  file(DOWNLOAD http://files.nsclient.org/released/NSCP-0.4.3.143-Win32.msi ${CMAKE_CURRENT_BINARY_DIR}/NSCP-0.4.3.143-Win32.msi)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP-0.4.3.143-Win32.msi DESTINATION ${CMAKE_INSTALL_SBINDIR})
+
   install(
     PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
       ${OPENSSL_INCLUDE_DIR}/../bin/libeay32.dll ${OPENSSL_INCLUDE_DIR}/../bin/ssleay32.dll