MantisBT - CMake
View Issue Details
0014890CMakeCPackpublic2014-04-18 11:232015-07-08 08:57
Nicolas H. 
Nils Gladitz 
normalfeaturealways
closedfixed 
x86_64windowsall
CMake 2.8.12.2 
CMake 3.3 
0014890: cpack, wix, It's not possible to patch directories (patch attached)
on git/master/cmake 3.0
I want to create a shortcut in the startup menu, i have to declare
<Directory Id="StartupFolder" Name="Startup"/>
on TARGETDIR.
I'm not able to do that as directory cannot be patched
add SET(CPACK_WIX_PATCH_FILE test.xml)

in test.xml put
<CPackWiXPatch>
<CPackWiXFragment Id="TARGETDIR">
    <Directory Id="StartupFolder" Name="Startup"/>
</CPackWiXFragment>
</CPackWiXPatch>

directories.xml is not patched.
please be nice, it's the first time i contribute to cmake :-)
No tags attached.
patch 0001-added-patch-support-for-directories.patch (5,410) 2014-04-18 11:23
https://public.kitware.com/Bug/file/5133/0001-added-patch-support-for-directories.patch
Issue History
2014-04-18 11:23Nicolas H.New Issue
2014-04-18 11:23Nicolas H.File Added: 0001-added-patch-support-for-directories.patch
2014-04-18 11:26Brad KingAssigned To => Nils Gladitz
2014-04-18 11:26Brad KingStatusnew => assigned
2014-04-22 09:24Nils GladitzNote Added: 0035759
2014-04-22 09:24Nils GladitzSeveritymajor => feature
2015-02-23 14:24Nils GladitzNote Added: 0038026
2015-02-23 14:24Nils GladitzStatusassigned => resolved
2015-02-23 14:24Nils GladitzFixed in Version => CMake 3.3
2015-02-23 14:24Nils GladitzResolutionopen => fixed
2015-07-08 08:57Robert MaynardNote Added: 0039061
2015-07-08 08:57Robert MaynardStatusresolved => closed

Notes
(0035759)
Nils Gladitz   
2014-04-22 09:24   
Thank you for your report.

Patching "real" directories that are part of the packaged file hierarchy and as explicitly created by the WIX generator should be working (In that regard the summary is a bit misleading).
What so far is not supported is e.g. patching directories that implicitly exist and are referenced by well known windows installer properties.

I have been reluctant to allow patching these since I am more likely to break patches that make use of them when extending the WIX generator.

Your initial use case sounds valid and I would like to support it in some way.
Would it be ok to restrict patching to "TARGETDIR" for now or if I were to add explicit first level support for startup folder entries?

If I were to add TARGETDIR and/or other additional windows installer controlled directories I'd like to add explicit warnings to the documentation (or perhaps even a specific patch construct that makes the potential danger explicit) so that users are at least aware their patches might break with future releases.
(0038026)
Nils Gladitz   
2015-02-23 14:24   
http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=e6731f48 [^] implements a CPACK_STARTUP_SHORTCUTS installed file property which should cover your specific use case. I am marking this issue as resolved but feel free to open additional issues if you had additional use cases in mind which are not covered.
(0039061)
Robert Maynard   
2015-07-08 08:57   
Closing resolved issues that have not been updated in more than 4 months.