On 02/21/2012 06:25 PM, Eric Noulard wrote:
2012/2/21 Andrea Crotti<[email protected]>:
I'm trying to finally create an installer for my project, with CPack and
NSIS.

The project is really really simple, I just need to copy over a directory
somewhere.
And I did something like:

get_filename_component(userprofile $ENV{USERPROFILE} REALPATH)

install(
  DIRECTORY ${EGG_BUILD_DIRECTORY}
  DESTINATION ${userprofile}/${PROJECT_NAME}
  )
Is "userprofile" an absolute path? (sorry I'm not working on Windows very often)
if this is the case this will not work.

DO NEVER install with absolute install path on Windows:
    1) the installed pieces won't be put in the installer
    2) the files/dirs/whatever MAY (if you have enough privilege) be
installed on the machine
        on which you are trying to build the package!!

I think we should forcibly forbid absolute install path on
windows...but that's another story.

I see, well I just wanted to get something running quickly to see if the packaging actually works. Anyway my assumption was that $ENV{USERPROFILE} would be the userprofile directory on the machine where I will run the installer, but I understand now why this is a very stupid assumption.

With the relative path I got an actual installer in the end, but I get another error when I try to run it
that I will investigate further tomorrow..
Thanks a lot for now.
--

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

Reply via email to