[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] custom nsis template- "Install targets" not working
From:       Lloyd <lloydkl.tech () gmail ! com>
Date:       2014-03-27 9:19:07
Message-ID: CAA10ZTohFLJY_42REdnm6_u4G6-9qf5fN=GLJiWs1teEG3vdvA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Solved the problem.

Further verification revealed that, when I build "PACKAGE", it generates a
"install_manifest.txt" file in my build directory. It contains absolute
paths to copy of install files I mentioned using "install targets" command.
This temporary directory and its files are also created when we build the
"PACKAGE" target.

What caused all these problem is, I misread the "INSTDIR" in SetOutPath
command and "INST_DIR" in File command as the *same*

  SetOutPath "$INSTDIR"

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

tracing the INST_DIR value revealed that, it is defined in the template
as !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"


Thanks a lot,
  Lloyd




On Thu, Mar 27, 2014 at 2:05 PM, Lloyd <lloydkl.tech@gmail.com> wrote:

>
>
>> I am no NSIS expert so I can't imagine why 'File /r "${INST_DIR}\*.*"'
>> could possibly do ???
>>
>
>
> About the file command the NSIS documentation says this:
>     Adds file(s) to be extracted to the current output path ($OUTDIR).
>     If the /r switch is used, files and directories are added recursively.
>
> That is, the File command copies the files (all files as it is *.*)
> specified in the path ${INST_DIR}\*.* recursively to the current set output
> directory of the NSIS. The value of the INST_DIR variable is the directory
> which the user has selected at install time.
>
>
>
>
>>
>> So I guess that if your template does not contain such command you
>> either need it
>>
>
> I tried adding @CPACK_NSIS_FULL_INSTALL@, and it generated File /r
> "${INST_DIR}\*.*" but this causes NSIS an error. Now I am in the assumption
> that CMake copies all the files hierarchically to some temp directory and
> from that location it does the copy (this is only a wild guess).
>
>
>
>> (and should use CPACK_NSIS_FULL_INSTALL in your template) or replace
>> it with something more appropriate to you case.
>>
>>
>
> What I don't understand is, what happens to the "install targets" commands
> in the CMake file on windows platform
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>Solved the problem.</div><div><br></div>Further verification \
revealed that, when I build &quot;PACKAGE&quot;, it generates a \
&quot;install_manifest.txt&quot; file in my build directory. It contains absolute \
paths to copy of install files I mentioned using &quot;install targets&quot; command. \
This temporary directory and its files are also created when we build the \
&quot;PACKAGE&quot; target. <div> <br></div><div>What caused all these problem is, I \
misread the &quot;INSTDIR&quot; in SetOutPath command and &quot;INST_DIR&quot; in \
File command as the *same*</div><div><br></div><div>  SetOutPath \
&quot;$INSTDIR&quot;</div> <div><br></div><div>  File /r &quot;${INST_DIR}\*.*&quot; \
<br><div><br></div><div>tracing the INST_DIR value revealed that, it is defined in \
the template as !define INST_DIR &quot;@CPACK_TEMPORARY_DIRECTORY@&quot;<br></div> \
<div><br></div><div><br></div><div>Thanks a lot,</div><div>  \
Lloyd</div><div><br></div><div><br></div></div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 2:05 PM, \
Lloyd <span dir="ltr">&lt;<a href="mailto:lloydkl.tech@gmail.com" \
target="_blank">lloydkl.tech@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div \
class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px \
0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><br>
</div>I am no NSIS expert so I can&#39;t imagine why &#39;File /r \
&quot;${INST_DIR}\*.*&quot;&#39;<br> could possibly do \
???<br></blockquote><div><br></div><div><br></div></div><div><div>About the file \
command the NSIS documentation says this:</div><div>    Adds file(s) to be extracted \
to the current output path ($OUTDIR).<br> </div>
<div>    If the /r switch is used, files and directories are added \
recursively.</div></div><div><br></div><div>That is, the File command copies the \
files (all files as it is *.*) specified in the path ${INST_DIR}\*.* recursively to \
the current set output directory of the NSIS. The value of the INST_DIR variable is \
the directory which the user has selected at install time.</div> <div class="">
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 <br>
So I guess that if your template does not contain such command you<br>
either need it<br></blockquote><div><br></div></div><div>I tried adding \
@CPACK_NSIS_FULL_INSTALL@, and it generated File /r &quot;${INST_DIR}\*.*&quot; but \
this causes NSIS an error. Now I am in the assumption that CMake copies all the files \
hierarchically to some temp directory and from that location it does the copy (this \
is only a wild guess).</div> <div class="">
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 (and should use CPACK_NSIS_FULL_INSTALL in your template) or replace<br>
it with something more appropriate to you case.<br><span><font \
color="#888888"><br></font></span></blockquote><div><br></div><div><br></div></div><div>What \
I don&#39;t understand is, what happens to the &quot;install targets&quot; commands \
in the CMake file on windows platform</div>

<div>      </div></div></div></div>
</blockquote></div><br></div>



-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic