-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6181ad
commit b4af22c
Showing
6 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,49 @@ | |
# For more information : [email protected] | ||
# | ||
|
||
project("Centreon agent Installer") | ||
|
||
|
||
# Set directories. | ||
set(SRC_DIR "${PROJECT_SOURCE_DIR}/installer") | ||
set(CENTAGENT_PATH_OUTPUT_DIR ${Centreon\ agent_BINARY_DIR}) | ||
|
||
if( ${CMAKE_GENERATOR} MATCHES "Visual Studio.*" ) | ||
set(CENTAGENT_PATH "${Centreon\ agent_BINARY_DIR}/${CMAKE_BUILD_TYPE}/centagent.exe") | ||
else() | ||
set(CENTAGENT_PATH "${Centreon\ agent_BINARY_DIR}/centagent.exe") | ||
endif() | ||
|
||
string(REPLACE "/" "\\" CENTAGENT_PATH "${CENTAGENT_PATH}") | ||
|
||
#uncomment if makensis is not in the path | ||
set(MKNSIS "C:/Program Files (x86)/NSIS/Bin/makensis.exe") | ||
|
||
#set(MKNSIS "makensis.exe") | ||
|
||
# Configure files. | ||
configure_file("${SRC_DIR}/version.nsi.in" | ||
"${SRC_DIR}/version.nsi") | ||
configure_file("${PROJECT_SOURCE_DIR}/version.nsi.in" "${PROJECT_SOURCE_DIR}/version.nsi") | ||
|
||
file(GLOB COMMON_INSTALLERS_FILES "${PROJECT_SOURCE_DIR}/version.nsi" "${PROJECT_SOURCE_DIR}/dlg_helper.nsi" "${PROJECT_SOURCE_DIR}/resources/*") | ||
|
||
message(NOTICE "---------------- Generate installer in ${PROJECT_SOURCE_DIR} ---------------") | ||
|
||
# modify binary called from the application manager | ||
# embedded in installer | ||
add_custom_command( | ||
DEPENDS "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent-modify.nsi" ${COMMON_INSTALLERS_FILES} ${CENTREON_AGENT} | ||
COMMENT "--------- Generating cma configuration modifier --------" | ||
OUTPUT "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent-modify.exe" | ||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" | ||
COMMAND ${MKNSIS} "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent-modify.nsi") | ||
|
||
|
||
#final installer | ||
add_custom_command( | ||
DEPENDS "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent.nsi" "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent-modify.exe" ${COMMON_INSTALLERS_FILES} | ||
COMMENT "--------- Generating cma configuration installer --------" | ||
OUTPUT "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent.exe" | ||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" | ||
COMMAND ${MKNSIS} "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent.nsi") | ||
|
||
add_custom_target("centreon-monitoring-agent-installer" ALL DEPENDS "${PROJECT_SOURCE_DIR}/centreon-monitoring-agent.exe") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters