mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
CPack/NSIS: Fix PATH modification without "bin" directory
Previously our NSIS project template hard-coded `$INSTDIR\bin` for inclusion in the `PATH`. If the directory does not exist, nothing is done. Use `CPACK_NSIS_EXECUTABLES_DIRECTORY` instead of `bin`. Fixes: #15635
This commit is contained in:
committed by
Brad King
parent
3773fb5a46
commit
6b695daab8
@@ -742,7 +742,7 @@ Section "-Core installation"
|
||||
SectionEnd
|
||||
|
||||
Section "-Add to path"
|
||||
Push $INSTDIR\bin
|
||||
Push $INSTDIR\@CPACK_NSIS_EXECUTABLES_DIRECTORY@
|
||||
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
|
||||
StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
|
||||
Call AddToPath
|
||||
@@ -902,7 +902,7 @@ Section "Uninstall"
|
||||
|
||||
DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
||||
|
||||
Push $INSTDIR\bin
|
||||
Push $INSTDIR\@CPACK_NSIS_EXECUTABLES_DIRECTORY@
|
||||
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
|
||||
Call un.RemoveFromPath
|
||||
doNotRemoveFromPath:
|
||||
|
||||
Reference in New Issue
Block a user