mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 15:33:14 +02:00
use nsDialogs for custom post install options
This commit is contained in:
parent
dd0f541759
commit
288b044a0f
3 changed files with 14 additions and 19 deletions
|
@ -22,12 +22,6 @@ macro(GENERATE_INSTALLERS)
|
|||
set(CPACK_NSIS_PACKAGE_NAME ${_DISPLAY_NAME})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME})
|
||||
|
||||
# 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}/templates/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})
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[Settings]
|
||||
NumFields = 3
|
||||
|
||||
[Field 1]
|
||||
Type=checkBox
|
||||
Text=Create a desktop shortcut for High Fidelity
|
||||
Left=0
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=20
|
|
@ -19,6 +19,9 @@
|
|||
Var ADD_TO_PATH_CURRENT_USER
|
||||
Var INSTALL_DESKTOP
|
||||
Var IS_DEFAULT_INSTALLDIR
|
||||
|
||||
Var POST_INSTALL_DIALOG
|
||||
Var DESKTOP_CHECKBOX
|
||||
;--------------------------------
|
||||
;Include Modern UI
|
||||
|
||||
|
@ -766,9 +769,17 @@ Function InstallOptionsPage
|
|||
FunctionEnd
|
||||
|
||||
Function PostInstallOptionsPage
|
||||
!insertmacro MUI_HEADER_TEXT "Post-Install Options"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "@POST_INSTALL_OPTIONS_PATH@"
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "@POST_INSTALL_OPTIONS_PATH@"
|
||||
nsDialogs::Create 1018
|
||||
Pop $POST_INSTALL_DIALOG
|
||||
|
||||
${If} $POST_INSTALL_DIALOG == error
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
${NSD_CreateCheckbox} 0 0 100% 10u "&Create High Fidelity Desktop Shortcut"
|
||||
Pop $DESKTOP_CHECKBOX
|
||||
|
||||
nsDialogs::Show
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
|
Loading…
Reference in a new issue