diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-09-18 19:16:21 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-09-18 19:16:21 (GMT) |
commit | 0eba9b638f95a7574d66b70c321680555e72ae0f (patch) | |
tree | 028ce169eb1256b490618e2b055c1479883f412c /Source/CPack/cmCPackNSISGenerator.cxx | |
parent | ec207513e4bfc1c3336850ed9cab8fdd7394fa76 (diff) | |
download | CMake-0eba9b638f95a7574d66b70c321680555e72ae0f.zip CMake-0eba9b638f95a7574d66b70c321680555e72ae0f.tar.gz CMake-0eba9b638f95a7574d66b70c321680555e72ae0f.tar.bz2 |
ENH: allow for desktop link to be created and fix chop of last char in PATH on uninstall
Diffstat (limited to 'Source/CPack/cmCPackNSISGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index dc1b852..b9db822 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -241,6 +241,20 @@ int cmCPackNSISGenerator::InitializeInternal() << std::endl; deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName << ".lnk\"" << std::endl; + // see if CPACK_CREATE_DESKTOP_LINK_ExeName is on + // if so add a desktop link + std::string desktop = "CPACK_CREATE_DESKTOP_LINK_"; + desktop += execName; + if(this->IsSet(desktop.c_str())) + { + str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; + str << " CreateShortCut \"$DESKTOP\\" + << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\"" + << std::endl; + deleteStr << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; + deleteStr << " Delete \"$DESKTOP\\" << linkName + << ".lnk\"" << std::endl; + } } this->SetOptionIfNotSet("CPACK_NSIS_CREATE_ICONS", str.str().c_str()); this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", |