Is it possible to include an NSIS script from CMake that uses CPack together with NSIS? It appears that I'm limited to only a few commands (doc), but some commands suggest that there is a way to include the whole NSIS script, particulary:
CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS,
CPACK_NSIS_EXTRA_INSTALL_COMMANDS,
CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
However, when I try to call these commands:
SET(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "!include extra_preinstall.nsh")
Nothing happens. (Excluding /NONFATAL
throws an error, so presumably the script cannot be found.)
Checking basic functionality:
SET(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS "MessageBox MB_OK \\\"Hello world!\\\"")
Doesn't do anything with the installer.
Why doesn't a Hello World button appear? Why is the script file not found (even though I put it on every level of CMake hiearchy)?
NSIS.template.in
and put it in my local modules folder that is added via the commandlist(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/External/Modules)