diff options
author | Mike McQuaid <mike@mikemcquaid.com> | 2011-01-06 12:48:47 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-06 21:21:23 (GMT) |
commit | 702c8f8ba79591744449244ed47a5181fdf68a63 (patch) | |
tree | e43917ff39c2d625f27ad39f84b2cfdbfcd2cc4a /Source/CPack/cmCPackNSISGenerator.cxx | |
parent | fec32328b17662d44bfa7769e672529c24e1697f (diff) | |
download | CMake-702c8f8ba79591744449244ed47a5181fdf68a63.zip CMake-702c8f8ba79591744449244ed47a5181fdf68a63.tar.gz CMake-702c8f8ba79591744449244ed47a5181fdf68a63.tar.bz2 |
Add CPACK_NSIS_EXECUTABLES_DIRECTORY (#7828)
NSIS installers default to assuming the executables exist in a
directory named "bin" under the installation directory. As this
isn't usual for Windows programs, the addition of this variable
allows the customization of this directory and links still to be
created correctly.
Diffstat (limited to 'Source/CPack/cmCPackNSISGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index f3ebf30..d27ab0a 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -421,10 +421,13 @@ int cmCPackNSISGenerator::InitializeInternal() return 0; } this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin"); const char* cpackPackageExecutables = this->GetOption("CPACK_PACKAGE_EXECUTABLES"); const char* cpackPackageDeskTopLinks = this->GetOption("CPACK_CREATE_DESKTOP_LINKS"); + const char* cpackNsisExecutablesDirectory + = this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY"); std::vector<std::string> cpackPackageDesktopLinksVector; if(cpackPackageDeskTopLinks) { @@ -472,7 +475,8 @@ int cmCPackNSISGenerator::InitializeInternal() ++ it; std::string linkName = *it; str << " CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\" - << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\"" + << linkName << ".lnk\" \"$INSTDIR\\" + << cpackNsisExecutablesDirectory << "\\" << execName << ".exe\"" << std::endl; deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName << ".lnk\"" << std::endl; @@ -486,7 +490,8 @@ int cmCPackNSISGenerator::InitializeInternal() { str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; str << " CreateShortCut \"$DESKTOP\\" - << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\"" + << linkName << ".lnk\" \"$INSTDIR\\" + << cpackNsisExecutablesDirectory << "\\" << execName << ".exe\"" << std::endl; deleteStr << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; deleteStr << " Delete \"$DESKTOP\\" << linkName |