<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, <br>
<br>
Thanks you for the answer,<br>
Actually i choose to not alterate the NSIS.template.in file.<br>
<br>
I perfer adding my own custom commands that will modify the <b>project.nsi
</b>file used<br>
to generate the installer : <br>
Here is what i did to custom my cpack installer, it may help someone...<br>
<br>
To create a sub-directory in your project start menu&nbsp; folder <br>
this command was useful :<br>
<br>
<pre>SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS 
&nbsp; " CreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\YourDirectory\\\"")</pre>
<br>
To put a shortcut to a file , in the subdirectory "Your directory" <br>
<br>
<pre>SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS&nbsp; 
    " CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\YourDirectory\\\\shortcut.lnk\\\"&nbsp; \\\"$INSTDIR\\\\bin\\\\file.exe\\" \n ")</pre>
<br>
Don't forget to tell cpack to add the "shortcut.lnk"&nbsp; in the uninstall
routine by doing this : <br>
<br>
<pre>SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS   
    "${UNINSTALL_LIST} \n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\YourDirectory\\\\shortcut.lnk\\\"

</pre>
You have also to remove the "YouDirectory" when uninstalling : <br>
<br>
<pre>SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  "${UNINSTALL_LIST} \n RMDir&nbsp; \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\YourDirectory\\\" ")</pre>
<br>
It works fine for win7 and XP.<br>
Regards,<br>
Otmane<br>
<br>
<br>
David Cole a &eacute;crit&nbsp;:
<blockquote
 cite="mid:AANLkTim9J+Q2aa0DKk+YKoOCWiHK-p1s384FwPJj+BX6@mail.gmail.com"
 type="cite">
  <pre wrap="">On Mon, Dec 6, 2010 at 3:37 AM, Otmane Lahlou <a
 class="moz-txt-link-rfc2396E" href="mailto:otmane.lahlou@c-s.fr">&lt;otmane.lahlou@c-s.fr&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

I've got no answer for this,

Can someone tell me whether doing this with CMake is possible.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
Yes, it is possible. I do not have time to go into details and tell
you exactly how to do it, but if the built-in functionality provided
by CPACK_PACKAGE_EXECUTABLES and CPACK_NSIS_MENU_LINKS do not give you
sufficient control, you can always customize the NSIS input file that
CPack uses to tell NSIS how to build the installer.

See these threads that talk about customizing NSIS.template.in:
<a class="moz-txt-link-freetext"
 href="http://www.cmake.org/pipermail/cmake/2007-January/012649.html">http://www.cmake.org/pipermail/cmake/2007-January/012649.html</a>
<a class="moz-txt-link-freetext"
 href="http://www.cmake.org/pipermail/cmake/2010-July/037862.html">http://www.cmake.org/pipermail/cmake/2010-July/037862.html</a>
<a class="moz-txt-link-freetext"
 href="http://www.mail-archive.com/cmake@cmake.org/msg13128.html">http://www.mail-archive.com/cmake@cmake.org/msg13128.html</a>
<a class="moz-txt-link-freetext"
 href="http://www.mail-archive.com/cmake@cmake.org/msg28390.html">http://www.mail-archive.com/cmake@cmake.org/msg28390.html</a>

( All found by googling for "customize cpack nsis template" )


HTH,
David


  </pre>
  <blockquote type="cite">
    <pre wrap="">Thanks
Otmane


Otmane Lahlou a &eacute;crit :
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi List,

When packaging my project, i want my project in the start menu to be
organised
in several directories &nbsp;:

In &nbsp;the windows StartMenu i'd like to have something like that :

StartMenu -&gt; Programs -&gt; MyProject -&gt; &nbsp; Directory1 -&gt; {My stuffs 1}

&nbsp;Directory2 -&gt; {My stuffs 2}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Uninstall

Here what i did : - I edit the variable CPACK_PACKAGE_EXECUTABLES with the
executables name and their label :
&nbsp; "exe1" &nbsp;"Description of exe1"
&nbsp; &nbsp;....
- In case of Windows, i &nbsp;used CPACK_NSIS_MENU_LINKS to have my shortcuts
in the startmenu.
&nbsp;Here is the point; i did not succed to use this macro to get the
subdirectories organisation.
&nbsp;but i have all the executables in the root directory MyProject :

&nbsp;StartMenu -&gt; Programs -&gt; MyProject -&gt; &nbsp; My stuffs 1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; My
stuffs 2

Uninstall

Any hints to do that?
Thanks

Otmane
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated"
 href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext"
 href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at:
<a class="moz-txt-link-freetext"
 href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext"
 href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>


      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated"
 href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext"
 href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at:
<a class="moz-txt-link-freetext"
 href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext"
 href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>