# GMM (C) 2018 Stephane Charette <stephanecharette@gmail.com>
# $Id: CM_package_windows.cmake 2601 2018-09-15 20:40:24Z stephane $


SET ( CPACK_STRIP_FILES								"TRUE" )
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY				"GMM" )
#SET ( CPACK_SYSTEM_NAME							"win${GMM_BIT_SIZE}" )
SET ( CPACK_NSIS_PACKAGE_NAME						"GMM" )
SET ( CPACK_NSIS_DISPLAY_NAME						"GMM v${GMM_VERSION}" )
SET ( CPACK_NSIS_MUI_ICON							"${CMAKE_CURRENT_SOURCE_DIR}\\\\src-img\\\\gmm.ico" )
SET ( CPACK_NSIS_MUI_UNIICON						"${CMAKE_CURRENT_SOURCE_DIR}\\\\src-img\\\\gmm.ico" )
SET ( CPACK_PACKAGE_ICON							"${CMAKE_CURRENT_SOURCE_DIR}\\\\src-img\\\\gmm.ico" )
SET ( CPACK_NSIS_CONTACT							"stephanecharette@gmail.com" )
SET ( CPACK_NSIS_URL_INFO_ABOUT						"http://www.ccoderun.ca/" )
SET ( CPACK_NSIS_HELP_LINK							"http://www.ccoderun.ca/" )
SET ( CPACK_NSIS_MODIFY_PATH						"OFF" )
SET ( CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL	"ON" )
SET ( CPACK_NSIS_INSTALLED_ICON_NAME				"bin\\\\gmm.ico" )
SET ( CPACK_NSIS_MUI_FINISHPAGE_RUN					"gmm.exe" )
SET ( CPACK_NSIS_MENU_LINKS							"bin\\\\gmm.exe" "Gorman Moisture Measurement v${GMM_VERSION}" )

SET ( CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
Delete \\\"$INSTDIR\\\\gmm.log\\\"
SetOutPath \\\"$INSTDIR\\\\bin\\\"
CreateShortCut \\\"$DESKTOP\\\\GMM v${GMM_VERSION}.lnk\\\"				\\\"$INSTDIR\\\\bin\\\\gmm.exe\\\" 		\\\"\\\"	\\\"$INSTDIR\\\\bin\\\\gmm.ico\\\"
CreateShortCut \\\"$SMPROGRAMS\\\\GMM v${GMM_VERSION}\\\\GMM.lnk\\\"	\\\"$INSTDIR\\\\bin\\\\gmm.exe\\\" 		\\\"\\\"	\\\"$INSTDIR\\\\bin\\\\gmm.ico\\\"" )

SET ( CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
Delete \\\"$INSTDIR\\\\gmm.log\\\"
Delete \\\"$DESKTOP\\\\GMM v${GMM_VERSION}.lnk\\\"
Delete \\\"$SMPROGRAMS\\\\GMM v${GMM_VERSION}\\\\GMM.lnk\\\"" )

SET ( CPACK_GENERATOR "NSIS" )
