mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:36:44 +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_NSIS_PACKAGE_NAME ${_DISPLAY_NAME})
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_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
|
# configure a cpack properties file for custom variables in NSIS template
|
||||||
set(CPACK_CONFIGURED_PROP_FILE "${CMAKE_CURRENT_BINARY_DIR}/CPackCustomProperties.cmake")
|
set(CPACK_CONFIGURED_PROP_FILE "${CMAKE_CURRENT_BINARY_DIR}/CPackCustomProperties.cmake")
|
||||||
configure_file("${HF_CMAKE_DIR}/templates/CPackProperties.cmake.in" ${CPACK_CONFIGURED_PROP_FILE})
|
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 ADD_TO_PATH_CURRENT_USER
|
||||||
Var INSTALL_DESKTOP
|
Var INSTALL_DESKTOP
|
||||||
Var IS_DEFAULT_INSTALLDIR
|
Var IS_DEFAULT_INSTALLDIR
|
||||||
|
|
||||||
|
Var POST_INSTALL_DIALOG
|
||||||
|
Var DESKTOP_CHECKBOX
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Include Modern UI
|
;Include Modern UI
|
||||||
|
|
||||||
|
@ -766,9 +769,17 @@ Function InstallOptionsPage
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function PostInstallOptionsPage
|
Function PostInstallOptionsPage
|
||||||
!insertmacro MUI_HEADER_TEXT "Post-Install Options"
|
nsDialogs::Create 1018
|
||||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "@POST_INSTALL_OPTIONS_PATH@"
|
Pop $POST_INSTALL_DIALOG
|
||||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "@POST_INSTALL_OPTIONS_PATH@"
|
|
||||||
|
${If} $POST_INSTALL_DIALOG == error
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
${NSD_CreateCheckbox} 0 0 100% 10u "&Create High Fidelity Desktop Shortcut"
|
||||||
|
Pop $DESKTOP_CHECKBOX
|
||||||
|
|
||||||
|
nsDialogs::Show
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
Loading…
Reference in a new issue