[CMake] CPack - installing non .exe and question on some variables

David Cole david.cole at kitware.com
Tue Oct 24 10:46:26 EDT 2006


Try something like this:
IF(WIN32)
  SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
  CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Batch
File.lnk\\\" \\\"$INSTDIR\\\\MyBatchFile.bat\\\"
  CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Project
ReadMe.lnk\\\" \\\"$INSTDIR\\\\README.html\\\"
")

  SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
  !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
  Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Batch File.lnk\\\"
  Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Project ReadMe.lnk\\\"
")
ENDIF(WIN32)

INCLUDE(CPack)

Adjust the text to your liking... The names of the lnk files show up
in the Start menu structure. The names of files under $INSTDIR are
file names of things in your install tree.

I think the CPACK_NSIS_INSTALLED_ICON_NAME icon is the one that shows
up in the Add/Remove control panel...


HTH,
David


On 10/23/06, Bill Katz <billkatz at gmail.com> wrote:
> Hello,
> I'd like to install a .bat file (or a simple readme) instead of a .exe
> and have it listed in the start menu. It looks like the
> CPACK_PACKAGE_EXECUTABLES appends .exe. Is there a way to package
> non-exe starting files?  And what does CPACK_NSIS_INSTALLED_ICON_NAME
> do? I wasn't able to tell from the example on
> http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
> Thanks for any help,
> Bill
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list