Re: [CMake] CPack: Installing applications in separate folders (NSIS)

2012-05-22 Thread David Cole
You're welcome.

Be careful with that technique, though.

If somebody configures your project with CMAKE_INSTALL_PREFIX set to
C:/Put/Stuff/Here, they'll end up with your main install tree underneath
that, and then all your custom dir files in "C:/Put/Stuff/CustomDir".


On Tue, May 22, 2012 at 3:31 PM,  wrote:

> I got it to work.
>
> Under windows/NSIS I set the destination to "../CustomDir" instead of
> $CustomDir.
> With this and a custom nsis script which knows the location it is possible
> to run CPack.
>
> In the NSIS script I've the following
> Var $CustomDir="@CPACK_TEMPORARY_DIRECTORY@\..\CustomDir"
>
> After this I can install files from this directory too.
>
> The directory content after the preinstall:
> .../_CPack_Packages/win32/NSIS/myproject.1.0.0.1/
> .../_CPack_Packages/win32/NSIS/CustomDir/
> .../_CPack_Packages/win32/NSIS/project.nsi
> .
> .
> .
>
> @Eric, @David: Thank you very much
>
> Best Regards
>
>
> Am 22.05.2012 um 00:38 schrieb Eric Noulard :
>
> > 2012/5/21 David Cole :
> >> On Mon, May 21, 2012 at 2:05 PM,  wrote:
> >>>
> >>> But what about other systems like linux. If I have an executable and
> >>> shared libraries for example.
> >>> Then it is possible to install it under /opt/myproject, but it is not
> >>> possible to install the executable under /usr/bin and the shared
> libraries
> >>> under /usr/lib? Or did I misunderstood something?
> >>
> >>
> >> But you don't build an NSIS installer based on those.
> >
> > And installing lib in /usr/lib and exe in /usr/bin IS possible
> > because the 2 path shares the /usr prefix.
> >
> > On Linux if you build an RPM or DEB package which contains various
> > prefix (/usr /opt etc..) you either get a non relocatable package
> > or decide that some files are "special" like config files.
> >
> > but David is right this does not work with NSIS.
> >
> >>> Sorry, for simple installers the default NSIS template is great, but
> for
> >>> customized ones it seems to be very difficult, isn't it?
> >
> > As difficult as it is with NSIS alone :-]
> >
> >> Yes, you're correct. It takes some effort if you are not installing
> >> everything underneath the directory that the end user chooses for your
> final
> >> location.
> >>
> >> It's quite good for "simple installers" and "component-based
> installers" --
> >> beyond that, and especially putting things outside the location chosen
> by
> >> the end user ... you're on your own.
> >
> > If you do have 2 separate unrelated installation prefixes
> > may be you can just build 2 NSIS installers
> > (which contains only one prefix)
> > using CPack twice out of 2 differents configurations of the same project
> >
> > Or craft your own project.nsi file.
> >
> > --
> > Erk
> > Le gouvernement représentatif n'est pas la démocratie --
> > http://www.le-message.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] CPack: Installing applications in separate folders (NSIS)

2012-05-22 Thread norulez
I got it to work.

Under windows/NSIS I set the destination to "../CustomDir" instead of 
$CustomDir.
With this and a custom nsis script which knows the location it is possible to 
run CPack.

In the NSIS script I've the following
Var $CustomDir="@CPACK_TEMPORARY_DIRECTORY@\..\CustomDir"

After this I can install files from this directory too.

The directory content after the preinstall:
.../_CPack_Packages/win32/NSIS/myproject.1.0.0.1/
.../_CPack_Packages/win32/NSIS/CustomDir/
.../_CPack_Packages/win32/NSIS/project.nsi
.
.
.

@Eric, @David: Thank you very much

Best Regards


Am 22.05.2012 um 00:38 schrieb Eric Noulard :

> 2012/5/21 David Cole :
>> On Mon, May 21, 2012 at 2:05 PM,  wrote:
>>> 
>>> But what about other systems like linux. If I have an executable and
>>> shared libraries for example.
>>> Then it is possible to install it under /opt/myproject, but it is not
>>> possible to install the executable under /usr/bin and the shared libraries
>>> under /usr/lib? Or did I misunderstood something?
>> 
>> 
>> But you don't build an NSIS installer based on those.
> 
> And installing lib in /usr/lib and exe in /usr/bin IS possible
> because the 2 path shares the /usr prefix.
> 
> On Linux if you build an RPM or DEB package which contains various
> prefix (/usr /opt etc..) you either get a non relocatable package
> or decide that some files are "special" like config files.
> 
> but David is right this does not work with NSIS.
> 
>>> Sorry, for simple installers the default NSIS template is great, but for
>>> customized ones it seems to be very difficult, isn't it?
> 
> As difficult as it is with NSIS alone :-]
> 
>> Yes, you're correct. It takes some effort if you are not installing
>> everything underneath the directory that the end user chooses for your final
>> location.
>> 
>> It's quite good for "simple installers" and "component-based installers" --
>> beyond that, and especially putting things outside the location chosen by
>> the end user ... you're on your own.
> 
> If you do have 2 separate unrelated installation prefixes
> may be you can just build 2 NSIS installers
> (which contains only one prefix)
> using CPack twice out of 2 differents configurations of the same project
> 
> Or craft your own project.nsi file.
> 
> -- 
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.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] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread Eric Noulard
2012/5/21 David Cole :
> On Mon, May 21, 2012 at 2:05 PM,  wrote:
>>
>> But what about other systems like linux. If I have an executable and
>> shared libraries for example.
>> Then it is possible to install it under /opt/myproject, but it is not
>> possible to install the executable under /usr/bin and the shared libraries
>> under /usr/lib? Or did I misunderstood something?
>
>
> But you don't build an NSIS installer based on those.

And installing lib in /usr/lib and exe in /usr/bin IS possible
because the 2 path shares the /usr prefix.

On Linux if you build an RPM or DEB package which contains various
prefix (/usr /opt etc..) you either get a non relocatable package
or decide that some files are "special" like config files.

but David is right this does not work with NSIS.

>> Sorry, for simple installers the default NSIS template is great, but for
>> customized ones it seems to be very difficult, isn't it?

As difficult as it is with NSIS alone :-]

> Yes, you're correct. It takes some effort if you are not installing
> everything underneath the directory that the end user chooses for your final
> location.
>
> It's quite good for "simple installers" and "component-based installers" --
> beyond that, and especially putting things outside the location chosen by
> the end user ... you're on your own.

If you do have 2 separate unrelated installation prefixes
may be you can just build 2 NSIS installers
(which contains only one prefix)
using CPack twice out of 2 differents configurations of the same project

Or craft your own project.nsi file.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.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] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread David Cole
I think you need to do the NSIS script by hand to see what it looks like
and then ask the question "how can I get CPack to use a project.nsi file
that looks like this?"



On Mon, May 21, 2012 at 2:22 PM,  wrote:

> I think one solution could be that the files must be copied with
> add_custom_command's, then run configure_file with the NSIS template to be
> able to use @ variables and then another add_custom_command to run NSIS.
>
> Is there maybe a simpler solution or is this the correct way?
>
>
> Am 21.05.2012 um 20:05 schrieb noru...@me.com:
>
> But what about other systems like linux. If I have an executable and
> shared libraries for example.
> Then it is possible to install it under /opt/myproject, but it is not
> possible to install the executable under /usr/bin and the shared libraries
> under /usr/lib? Or did I misunderstood something?
>
> Sorry, for simple installers the default NSIS template is great, but for
> customized ones it seems to be very difficult, isn't it?
>
>
> Best Regards
>
> Am 21.05.2012 um 19:27 schrieb David Cole :
>
> The install rule:
>
>   install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION
> $CustomDir)
>
> doesn't make sense because $CustomDir is not known at CMake-time or even
> at build-time or install-time. It's not known except to NSIS at packaging
> time.
>
> make install runs before NSIS runs.
>
> Sounds like you need a completely custom installer -- if you have
> installed files that are not contained within the make install tree prefix,
> then you cannot use the recursive "install all files from one root"
> technique in the NSIS script that CPack uses by default.
>
>
> We generally encourage and expect a "re-locatable" install tree to be used
> with the CPack built NSIS installers. (i.e. -- no matter where the end-user
> finally installs your package, they will be able to run the installed
> programs just fine.) That's why the entire install tree is copied using the
> following:
>
>   this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL",
> "File /r \"${INST_DIR}\\*.*\"");
>
> That results in the following generated in project.nsi:
>
>   File /r "${INST_DIR}\*.*"
>
> which installs all files and directories recursively (from your make
> install tree) to the installation directory chosen by the end user of your
> installation program.
>
>
> This stuff is not easy, especially when we can't see your code.
>
> Cheers, (& good luck),
> David
>
>
> On Mon, May 21, 2012 at 12:39 PM, NoRulez  wrote:
>
>> Hi,
>>
>> I know that the install commands collect files and copy them into the
>> temporary cpack directory for the specified generator.
>> How is it possible to install an application for example into those
>> folders:
>> C:\myapp
>> C:\somefolder
>>
>> I defined 'Var CustomDir="C:\somefolder"' in the NSIS template.
>>
>> When I then use the following in the CMakeLists.txt:
>> install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION
>> $CustomDir)
>>
>> Then the files are installed in
>> _CPACK_PACKAGES/NSIS/myproject_1.0.0.1/$CustomDir.
>> The generated project.nsi has the content: $INSTDIR\$CustomDir\...
>>
>> How can I avoid that $INSTDIR\ is added, or did I need to use the
>> install command in a different way?
>>
>> Thanks in advance
>>
>> Best Regards
>> NoRulez
>>
>> --
>>
>> 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
>>
>
> --
>
> 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
>
>
--

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] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread norulez
I think one solution could be that the files must be copied with 
add_custom_command's, then run configure_file with the NSIS template to be able 
to use @ variables and then another add_custom_command to run NSIS.

Is there maybe a simpler solution or is this the correct way?


Am 21.05.2012 um 20:05 schrieb noru...@me.com:

> But what about other systems like linux. If I have an executable and shared 
> libraries for example.
> Then it is possible to install it under /opt/myproject, but it is not 
> possible to install the executable under /usr/bin and the shared libraries 
> under /usr/lib? Or did I misunderstood something?
> 
> Sorry, for simple installers the default NSIS template is great, but for 
> customized ones it seems to be very difficult, isn't it?
> 
> 
> Best Regards
> 
> Am 21.05.2012 um 19:27 schrieb David Cole :
> 
>> The install rule:
>> 
>>   install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION 
>> $CustomDir)
>> 
>> doesn't make sense because $CustomDir is not known at CMake-time or even at 
>> build-time or install-time. It's not known except to NSIS at packaging time.
>> 
>> make install runs before NSIS runs.
>> 
>> Sounds like you need a completely custom installer -- if you have installed 
>> files that are not contained within the make install tree prefix, then you 
>> cannot use the recursive "install all files from one root" technique in the 
>> NSIS script that CPack uses by default.
>> 
>> 
>> We generally encourage and expect a "re-locatable" install tree to be used 
>> with the CPack built NSIS installers. (i.e. -- no matter where the end-user 
>> finally installs your package, they will be able to run the installed 
>> programs just fine.) That's why the entire install tree is copied using the 
>> following:
>> 
>>   this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", 
>> "File /r \"${INST_DIR}\\*.*\"");
>> 
>> That results in the following generated in project.nsi:
>> 
>>   File /r "${INST_DIR}\*.*"
>> 
>> which installs all files and directories recursively (from your make install 
>> tree) to the installation directory chosen by the end user of your 
>> installation program.
>> 
>> 
>> This stuff is not easy, especially when we can't see your code.
>> 
>> Cheers, (& good luck),
>> David
>> 
>> 
>> On Mon, May 21, 2012 at 12:39 PM, NoRulez  wrote:
>> Hi,
>> 
>> I know that the install commands collect files and copy them into the 
>> temporary cpack directory for the specified generator.
>> How is it possible to install an application for example into those folders:
>> C:\myapp
>> C:\somefolder
>> 
>> I defined 'Var CustomDir="C:\somefolder"' in the NSIS template.
>> 
>> When I then use the following in the CMakeLists.txt:
>> install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION 
>> $CustomDir)
>> 
>> Then the files are installed in 
>> _CPACK_PACKAGES/NSIS/myproject_1.0.0.1/$CustomDir.
>> The generated project.nsi has the content: $INSTDIR\$CustomDir\...
>> 
>> How can I avoid that $INSTDIR\ is added, or did I need to use the install 
>> command in a different way?
>> 
>> Thanks in advance
>> 
>> Best Regards
>> NoRulez
>> 
>> --
>> 
>> 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
>> 
> --
> 
> 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
--

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] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread David Cole
On Mon, May 21, 2012 at 2:05 PM,  wrote:

> But what about other systems like linux. If I have an executable and
> shared libraries for example.
> Then it is possible to install it under /opt/myproject, but it is not
> possible to install the executable under /usr/bin and the shared libraries
> under /usr/lib? Or did I misunderstood something?
>

But you don't build an NSIS installer based on those.



>
> Sorry, for simple installers the default NSIS template is great, but for
> customized ones it seems to be very difficult, isn't it?
>

Yes, you're correct. It takes some effort if you are not installing
everything underneath the directory that the end user chooses for your
final location.

It's quite good for "simple installers" and "component-based installers" --
beyond that, and especially putting things outside the location chosen by
the end user ... you're on your own.



>
>
> Best Regards
>
> Am 21.05.2012 um 19:27 schrieb David Cole :
>
> The install rule:
>
>   install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION
> $CustomDir)
>
> doesn't make sense because $CustomDir is not known at CMake-time or even
> at build-time or install-time. It's not known except to NSIS at packaging
> time.
>
> make install runs before NSIS runs.
>
> Sounds like you need a completely custom installer -- if you have
> installed files that are not contained within the make install tree prefix,
> then you cannot use the recursive "install all files from one root"
> technique in the NSIS script that CPack uses by default.
>
>
> We generally encourage and expect a "re-locatable" install tree to be used
> with the CPack built NSIS installers. (i.e. -- no matter where the end-user
> finally installs your package, they will be able to run the installed
> programs just fine.) That's why the entire install tree is copied using the
> following:
>
>   this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL",
> "File /r \"${INST_DIR}\\*.*\"");
>
> That results in the following generated in project.nsi:
>
>   File /r "${INST_DIR}\*.*"
>
> which installs all files and directories recursively (from your make
> install tree) to the installation directory chosen by the end user of your
> installation program.
>
>
> This stuff is not easy, especially when we can't see your code.
>
> Cheers, (& good luck),
> David
>
>
> On Mon, May 21, 2012 at 12:39 PM, NoRulez  wrote:
>
>> Hi,
>>
>> I know that the install commands collect files and copy them into the
>> temporary cpack directory for the specified generator.
>> How is it possible to install an application for example into those
>> folders:
>> C:\myapp
>> C:\somefolder
>>
>> I defined 'Var CustomDir="C:\somefolder"' in the NSIS template.
>>
>> When I then use the following in the CMakeLists.txt:
>> install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION
>> $CustomDir)
>>
>> Then the files are installed in
>> _CPACK_PACKAGES/NSIS/myproject_1.0.0.1/$CustomDir.
>> The generated project.nsi has the content: $INSTDIR\$CustomDir\...
>>
>> How can I avoid that $INSTDIR\ is added, or did I need to use the
>> install command in a different way?
>>
>> Thanks in advance
>>
>> Best Regards
>> NoRulez
>>
>> --
>>
>> 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
>>
>
>
--

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] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread norulez
But what about other systems like linux. If I have an executable and shared 
libraries for example.
Then it is possible to install it under /opt/myproject, but it is not possible 
to install the executable under /usr/bin and the shared libraries under 
/usr/lib? Or did I misunderstood something?

Sorry, for simple installers the default NSIS template is great, but for 
customized ones it seems to be very difficult, isn't it?


Best Regards

Am 21.05.2012 um 19:27 schrieb David Cole :

> The install rule:
> 
>   install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION 
> $CustomDir)
> 
> doesn't make sense because $CustomDir is not known at CMake-time or even at 
> build-time or install-time. It's not known except to NSIS at packaging time.
> 
> make install runs before NSIS runs.
> 
> Sounds like you need a completely custom installer -- if you have installed 
> files that are not contained within the make install tree prefix, then you 
> cannot use the recursive "install all files from one root" technique in the 
> NSIS script that CPack uses by default.
> 
> 
> We generally encourage and expect a "re-locatable" install tree to be used 
> with the CPack built NSIS installers. (i.e. -- no matter where the end-user 
> finally installs your package, they will be able to run the installed 
> programs just fine.) That's why the entire install tree is copied using the 
> following:
> 
>   this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", 
> "File /r \"${INST_DIR}\\*.*\"");
> 
> That results in the following generated in project.nsi:
> 
>   File /r "${INST_DIR}\*.*"
> 
> which installs all files and directories recursively (from your make install 
> tree) to the installation directory chosen by the end user of your 
> installation program.
> 
> 
> This stuff is not easy, especially when we can't see your code.
> 
> Cheers, (& good luck),
> David
> 
> 
> On Mon, May 21, 2012 at 12:39 PM, NoRulez  wrote:
> Hi,
> 
> I know that the install commands collect files and copy them into the 
> temporary cpack directory for the specified generator.
> How is it possible to install an application for example into those folders:
> C:\myapp
> C:\somefolder
> 
> I defined 'Var CustomDir="C:\somefolder"' in the NSIS template.
> 
> When I then use the following in the CMakeLists.txt:
> install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION 
> $CustomDir)
> 
> Then the files are installed in 
> _CPACK_PACKAGES/NSIS/myproject_1.0.0.1/$CustomDir.
> The generated project.nsi has the content: $INSTDIR\$CustomDir\...
> 
> How can I avoid that $INSTDIR\ is added, or did I need to use the install 
> command in a different way?
> 
> Thanks in advance
> 
> Best Regards
> NoRulez
> 
> --
> 
> 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
> 
--

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] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread David Cole
The install rule:

  install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION
$CustomDir)

doesn't make sense because $CustomDir is not known at CMake-time or even at
build-time or install-time. It's not known except to NSIS at packaging time.

make install runs before NSIS runs.

Sounds like you need a completely custom installer -- if you have installed
files that are not contained within the make install tree prefix, then you
cannot use the recursive "install all files from one root" technique in the
NSIS script that CPack uses by default.


We generally encourage and expect a "re-locatable" install tree to be used
with the CPack built NSIS installers. (i.e. -- no matter where the end-user
finally installs your package, they will be able to run the installed
programs just fine.) That's why the entire install tree is copied using the
following:

  this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL",
"File /r \"${INST_DIR}\\*.*\"");

That results in the following generated in project.nsi:

  File /r "${INST_DIR}\*.*"

which installs all files and directories recursively (from your make
install tree) to the installation directory chosen by the end user of your
installation program.


This stuff is not easy, especially when we can't see your code.

Cheers, (& good luck),
David


On Mon, May 21, 2012 at 12:39 PM, NoRulez  wrote:

> Hi,
>
> I know that the install commands collect files and copy them into the
> temporary cpack directory for the specified generator.
> How is it possible to install an application for example into those
> folders:
> C:\myapp
> C:\somefolder
>
> I defined 'Var CustomDir="C:\somefolder"' in the NSIS template.
>
> When I then use the following in the CMakeLists.txt:
> install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION
> $CustomDir)
>
> Then the files are installed in
> _CPACK_PACKAGES/NSIS/myproject_1.0.0.1/$CustomDir.
> The generated project.nsi has the content: $INSTDIR\$CustomDir\...
>
> How can I avoid that $INSTDIR\ is added, or did I need to use the install
> command in a different way?
>
> Thanks in advance
>
> Best Regards
> NoRulez
>
> --
>
> 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
>
--

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

[CMake] CPack: Installing applications in separate folders (NSIS)

2012-05-21 Thread NoRulez
Hi,I know that the install commands collect files and copy them into the temporary cpack directory for the specified generator.How is it possible to install an application for example into those folders:C:\myappC:\somefolderI defined 'Var CustomDir="C:\somefolder"' in the NSIS template.When I then use the following in the CMakeLists.txt:install(FILES ${CMAKE_SOURCE_DIR}/somefolder/myfile.txt DESTINATION $CustomDir)Then the files are installed in _CPACK_PACKAGES/NSIS/myproject_1.0.0.1/$CustomDir.The generated project.nsi has the content: $INSTDIR\$CustomDir\...How can I avoid that $INSTDIR\ is added, or did I need to use the install command in a different way?Thanks in advanceBest RegardsNoRulez--

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