add a file for NSIS post install options

This commit is contained in:
Stephen Birarda 2016-01-11 16:58:54 -08:00
parent cfcda488c4
commit 58cc86bc5b
4 changed files with 25 additions and 1 deletions

View file

@ -22,7 +22,13 @@ macro(GENERATE_INSTALLERS)
set(CPACK_NSIS_PACKAGE_NAME ${_DISPLAY_NAME})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME})
# configure a cpack properties file for custom installation options
# configure the post install options file for custom installation options
if (WIN32)
set(POST_INSTALL_OPTIONS_PATH "${CMAKE_CURRENT_BINARY_DIR}/NSIS.PostInstallOptions.ini")
configure_file("${HF_CMAKE_DIR}/template/NSIS.PostInstallOptions.ini.in" ${POST_INSTALL_OPTIONS_PATH})
endif ()
# configure a cpack properties file for custom variables in NSIS template
set(CPACK_CONFIGURED_PROP_FILE "${CMAKE_CURRENT_BINARY_DIR}/CPackCustomProperties.cmake")
configure_file("${HF_CMAKE_DIR}/templates/CPackProperties.cmake.in" ${CPACK_CONFIGURED_PROP_FILE})
set(CPACK_PROPERTIES_FILE ${CPACK_CONFIGURED_PROP_FILE})

View file

@ -15,3 +15,4 @@ set(CONSOLE_SHORTCUT_NAME "@CONSOLE_SM_SHORTCUT_NAME@")
set(CONSOLE_WIN_EXEC_NAME "@CONSOLE_EXEC_NAME@")
set(HIGH_FIDELITY_PROTOCOL "@HIGH_FIDELITY_PROTOCOL@")
set(PRODUCTION_BUILD "@PRODUCTION_BUILD@")
set(POST_INSTALL_OPTIONS_PATH "@POST_INSTALL_OPTIONS_PATH@")

View file

@ -0,0 +1,10 @@
[Settings]
NumFields = 3
[Field 1]
Type=checkBox
Text=Create a desktop shortcut for High Fidelity
Left=0
Right=-1
Top=0
Bottom=20

View file

@ -562,6 +562,7 @@ FunctionEnd
@CPACK_NSIS_PAGE_COMPONENTS@
!insertmacro MUI_PAGE_INSTFILES
Page custom PostInstallOptionsPage
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
@ -763,6 +764,12 @@ Function InstallOptionsPage
FunctionEnd
Function PostInstallOptionsPage
ReserveFile "@POST_INSTALL_OPTIONS_PATH@"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "@POST_INSTALL_OPTIONS_PATH@"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "@POST_INSTALL_OPTIONS_PATH@"
FunctionEnd
;--------------------------------
; determine admin versus local install
Function un.onInit