[CMake] CMake-CPack-NSIS
Eric Noulard
eric.noulard at gmail.com
Tue Apr 8 10:46:16 EDT 2008
2008/4/8, Alin M Elena <alin.elena at qub.ac.uk>:
>
>
>
>
> Hi,
>
>
>
> I want to setup a variable(TestVar) on windows when I use NSIS
> using cmake/cpack.
>
> A small example is presented here
>
>
> http://nsis.sourceforge.net/Setting_Environment_Variables
>
>
>
> The idea is that the project.nsi which is created by cmake already sets a
> variable PATH.
>
> Can I reuse some of the functions already defined there?
>
>
>
> I suspect that everything should be added using
> CPACK_NSIS_EXTRA_(UN)INSTALL_COMMANDS
>
> I see the plural form of the commands. Can you pass more commands? How do
> you separate them?
I do set CPACK_NSIS_EXTRA_INSTALL_COMMANDS with embedded
newlines which works:
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
ExecWait
\\\"$INSTDIR\\\\external\\\\oncrpc\\\\bin\\\\inst_pm.exe remove\\\"
CopyFiles
\\\"$INSTDIR\\\\external\\\\oncrpc\\\\bin\\\\oncrpc.dll\\\"
\\\"$SYSDIR\\\"
CopyFiles
\\\"$INSTDIR\\\\external\\\\oncrpc\\\\bin\\\\portmap.exe\\\"
\\\"$SYSDIR\\\"
CreateDirectory \\\"$SYSDIR\\\\drivers\\\\etc\\\"
CopyFiles \\\"$INSTDIR\\\\external\\\\oncrpc\\\\etc\\\\rpc\\\"
\\\"$SYSDIR\\\\drivers\\\\etc\\\"
ExecWait
\\\"$INSTDIR\\\\external\\\\oncrpc\\\\bin\\\\inst_pm.exe
$SYSDIR\\\\portmap.exe\\\"
look at:
http://cvs.savannah.nongnu.org/viewvc/tsp/CMakeLists.txt?root=tsp&view=markup
for properly indented CMakeLists.txt example.
I do encounter a "limit in size problem" with
CPACK_NSIS_EXTRA_INSTALL_COMMANDS
if I try to set it with a string which is longer than X character
the var content is truncated to X.
I'm not sure but I think X is about 255.
--
Erk
More information about the CMake
mailing list