[CMake] NSIS Installer: Changing shortcuts 'Start in'

Brehler, Michael m.brehler at dkfz-heidelberg.de
Wed Aug 5 11:03:53 EDT 2015


Hi community,

we are using NSIS (CPack) for our Windows installers.
Our current setup looks like this:
  ;Create shortcuts
  CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
@CPACK_NSIS_CREATE_ICONS@
@CPACK_NSIS_CREATE_ICONS_EXTRA@
  CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"

With the $INSTDIR set to top level directory (not the bin with the executables). The problem is that we need to set the 'Start in' path for the created shortcut to the bin directory.

Using this code:
SetOutPath "$INSTDIR\bin"
CreateShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\ TEST.lnk" "$INSTDIR\bin\Test.exe"
SetOutPath "$INSTDIR"

we have a workaround but we would prefer to change the 'Start in' path for the @CPACK_NSIS_CREATE_ICONS@ command without manually adding shortcuts.

Thanks
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150805/a65c84e1/attachment.html>


More information about the CMake mailing list