1
0
Fork 0

Fix windows NSIS client package

This commit is contained in:
Wilfried Goesgens 2016-08-30 10:57:41 +02:00
parent 84b164b985
commit 0601cc2661
1 changed files with 23 additions and 30 deletions

View File

@ -1,4 +1,5 @@
; CPack install script designed for a nmake build
; TODO !addplugindir '@CPACK_PLUGIN_PATH@/AccessControl/Plugins'
;--------------------------------
; Include LogicLib for more readable code
@ -484,14 +485,10 @@ FunctionEnd
;--------------------------------
;Pages
!define MUI_PAGE_CUSTOMFUNCTION_PRE skip_page
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE skip_page
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
Page custom InstallOptionsPage skip_page
!define MUI_PAGE_CUSTOMFUNCTION_PRE default_installation_directory
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE check_installation_directory
!insertmacro MUI_PAGE_DIRECTORY
@ -709,7 +706,6 @@ displayAgain:
StrCmp $PASSWORD $PASSWORD_AGAIN +3 0
MessageBox MB_OK|MB_ICONSTOP "Passwords don't match, try again"
Goto displayAgain
done:
Pop ${TEMP1}
Return
@ -736,9 +732,6 @@ Function default_installation_directory
${If} $R4 == '1'
StrCpy $TRI_INSTALL_TYPE 'SingleUser'
${EndIf}
Call read_options
${EndIf}
${Switch} $TRI_INSTALL_TYPE
${Case} 'SingleUser'
@ -750,24 +743,24 @@ Function default_installation_directory
Return
FunctionEnd
Function assign_proper_access_rigths
StrCpy $0 "0"
AccessControl::GrantOnFile \
"$INSTDIR" "(BU)" "GenericRead + GenericWrite + GenericExecute"
Pop $R0
${If} $R0 == error
Pop $R0
StrCpy $0 "1"
DetailPrint `AccessControl error: $R0`
; MessageBox MB_OK "target directory $INSTDIR can not get cannot get correct access rigths"
${EndIf}
FunctionEnd
; TODO Function assign_proper_access_rights
; TODO StrCpy $0 "0"
; TODO AccessControl::GrantOnFile \
; TODO "$INSTDIR" "(BU)" "GenericRead + GenericWrite + GenericExecute"
; TODO Pop $R0
; TODO ${If} $R0 == error
; TODO Pop $R0
; TODO StrCpy $0 "1"
; TODO DetailPrint `AccessControl error: $R0`
; TODO ; MessageBox MB_OK "target directory $INSTDIR can not get cannot get correct access rigths"
; TODO ${EndIf}
; TODO FunctionEnd
Function is_writable
; is does not matter if we do some errors here
${If} $TRI_INSTALL_ALL_USERS == '1'
CreateDirectory $INSTDIR
Call assign_proper_access_rigths
; TODO Call assign_proper_access_rights
${EndIf}
FunctionEnd