[CMake] CPack and NSIS failure
David Demelier
demelier.david at gmail.com
Wed Jun 27 17:09:19 EDT 2012
2012/6/27 Eric Noulard <eric.noulard at gmail.com>:
> 2012/6/27 David Cole <david.cole at kitware.com>:
>>> Demelier David
>>
>>
>> You can try:
>>
>> set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
>>
>> before you include(CPack).
>>
>> This bug ( http://public.kitware.com/Bug/view.php?id=7828 ) was
>> resolved by adding the CPACK_NSIS_EXECUTABLES_DIRECTORY variable in
>> this commit:
>
> In addition,
> and if you wonder about a variable usage you can do (since cpack 2.8.8):
>
> cpack --help-variable CPACK_NSIS_EXECUTABLES_DIRECTORY
>
> you can get the full list of documented CPack variable using:
>
> cpack --help-variables
>
> or dump it in html file:
>
> cpack --help-variables cpackvar.html
>
> then look for CPACK_NSIS_xxxx in this and you'll get all CPack NSIS
> specific control vars.
> --
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.org
Thanks for your help, it worked!
Now, the last problem, I noticed that CPACK_PACKAGE_EXECUTABLES you
can't set an icon, thus I used my own CreateShortCut and Delete with
respectively CPACK_NSIS_CREATE_ICONS_EXTRA and
CPACK_NSIS_DELETE_ICONS_EXTRA. The first one works, but not the
second.
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut \\\\
'$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME}.lnk' \\\\
'$INSTDIR\\\\sd-tris.exe' \\\\
'' \\\\
'${ICONPATH}'"
)
set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete \\\\
'$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME}.lnk'"
)
When uninstalling, the window menu entry is still there and not
removed at all. But the project.nsi has the line
Delete \
'$SMPROGRAMS\$STARTMENU_FOLDER\sd-tris.lnk'
But this command is not executed by the Uninstall.exe.
Cheers, and thanks for your attention!
--
Demelier David
More information about the CMake
mailing list