[CMake] CPack: NSIS: how to install files to APPDATA?

David Cole david.cole at kitware.com
Fri Apr 16 10:57:11 EDT 2010


On Fri, Apr 16, 2010 at 8:37 AM, Yegor Yefremov <yegor_sub1 at visionsystems.de
> wrote:

> I need to install some configuration files to application data directory. I
> found following variable in NSIS docs (
> http://nsis.sourceforge.net/Docs/Chapter4.html) as $APPDATA:
>
> "The application data directory. Detection of the current user path
> requires Internet Explorer 4 and above. Detection of the all users path
> requires Internet Explorer 5 and above. The context of this constant (All
> Users or Current user) depends on the SetShellVarContext  setting. The
> default is the current user."
>
> So how can I specify this folder as install()'s DESTINATION?


You can't. You'd have to write special NSIS code yourself to put files into
$APPDATA. The CMake install command assumes you're going to be installing
into the program's install tree, or use an absolute known-in-advance path.

You can specify your own NSIS.template.in file if you need to, and customize
it to do something like this.

( See this old email thread for more details about overriding
NSIS.template.in:
http://www.cmake.org/pipermail/cmake/2007-January/012649.html )


HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100416/0d9f04d6/attachment.htm>


More information about the CMake mailing list