Re: [CMake] Change cpack install folder

2011-12-19 Thread Totte Karlsson


set(CPACK_NSIS_INSTALL_ROOT C:)

should work.


Works great!

Thanks
-totte
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread Eric Noulard
2011/12/17 Totte Karlsson to...@dunescientific.com:
 Hi,
 How can I get my nsis installer to install my distribution to
 c:\myPackageName instead of C:\Program Files\myPackageName ?

 My installation  is a library with headers and I don't it to be installed
 in Program Files folder. Is there a straightforward fix.

NSIS installer does offer you the choice during installation right?
1) Do you want to provide an alternate default choice?
or
2) Do you want an NSIS command line?

for 2) it should already work:
http://www.kitware.com/blog/home/post/186

for 1) Normally you should set
CPACK_PACKAGING_INSTALL_PREFIX
and/or CPACK_PACKAGE_INSTALL_DIRECTORY

but do not know whether if NSIS honors those two vars.
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread Totte Karlsson



How can I get my nsis installer to install my distribution to
c:\myPackageName instead of C:\Program Files\myPackageName ?


NSIS installer does offer you the choice during installation right?

Yes.


1) Do you want to provide an alternate default choice?

Thats it.



for 1) Normally you should set
CPACK_PACKAGING_INSTALL_PREFIX
and/or CPACK_PACKAGE_INSTALL_DIRECTORY


I tried setting
set(CPACK_PACKAGING_INSTALL_PREFIX  C:\\)
but gets errors.
I also tried
set(CPACK_PACKAGING_INSTALL_PREFIX  C:)
and that removed the errors. However, the installer still  first points to 
C:\\Program Files\\



but do not know whether if NSIS honors those two vars.

Seem not. :(

But I found this NSIS specific setting
CPACK_NSIS_INSTALL_ROOT
But setting that as C:\\ still create the error: Function missing ending ) .

Not sure how to get this one right..

-totte
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread Eric Noulard
2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

set(CPACK_NSIS_INSTALL_ROOT C:)

should work.

It is awkward but since the template contains:

InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

you cannot remove middle \, thus the unexpected C: (not back
slashes whatsoever)


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread David Cole
On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

 set(CPACK_NSIS_INSTALL_ROOT C:)

 should work.

 It is awkward but since the template contains:

 InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

 you cannot remove middle \, thus the unexpected C: (not back
 slashes whatsoever)


 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

I disagree that C: is awkward compared to C:\\ -- it follows the
unwritten rule of thou shalt never end a directory name with a
trailing slash when using it as a variable value when the variable is
meant to be composed into a longer full path name.

(But I understand why you say it's awkward...)

That variable was added as a bug fix in this commit last January:

  
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.


HTH,
David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread Eric Noulard
2011/12/17 David Cole david.c...@kitware.com:
 On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

 set(CPACK_NSIS_INSTALL_ROOT C:)

 should work.

 It is awkward but since the template contains:

 InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

 you cannot remove middle \, thus the unexpected C: (not back
 slashes whatsoever)


 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

 I disagree that C: is awkward compared to C:\\ -- it follows the
 unwritten rule of thou shalt never end a directory name with a
 trailing slash when using it as a variable value when the variable is
 meant to be composed into a longer full path name.

 (But I understand why you say it's awkward...)

 That variable was added as a bug fix in this commit last January:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

 CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.

Too bad one did not use CPACK_PACKAGING_INSTALL_PREFIX...
they look like both have the same meaning.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread David Cole
On Sat, Dec 17, 2011 at 1:48 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2011/12/17 David Cole david.c...@kitware.com:
 On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard eric.noul...@gmail.com 
 wrote:
 2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

 set(CPACK_NSIS_INSTALL_ROOT C:)

 should work.

 It is awkward but since the template contains:

 InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

 you cannot remove middle \, thus the unexpected C: (not back
 slashes whatsoever)


 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

 I disagree that C: is awkward compared to C:\\ -- it follows the
 unwritten rule of thou shalt never end a directory name with a
 trailing slash when using it as a variable value when the variable is
 meant to be composed into a longer full path name.

 (But I understand why you say it's awkward...)

 That variable was added as a bug fix in this commit last January:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

 CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.

 Too bad one did not use CPACK_PACKAGING_INSTALL_PREFIX...
 they look like both have the same meaning.


 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org

Their meaning is similar, but subtly different, I think.

CPack uses the value of CPACK_PACKAGING_INSTALL_PREFIX as the prefix
of its own make install tree of your project that it uses in its
build tree as it's assembling the tree that gets passed as input to
the native packaging tool. That prefix does not necessarily have
anything to do with the default value that an end user installer
program displays to the end user about where to install a program by
default.

I suppose they *could* be the same values, but I think it's a good
thing to have separate variables for each concept.

CPACK_PACKAGING_INSTALL_PREFIX is used internally by CPack generators
and may (or may not) be used to set values that get communicated to
the end user.

CPACK_NSIS_INSTALL_ROOT is used only for the NSIS packager, and only
to change the root of the default suggestion from Program Files to
something else.


David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake