[CMake] [cmake-developers] CPack [WiX] Customizations of individual features/components
Stuermer, Michael SP/HZA-ZSEP
michael.stuermer at schaeffler.com
Fri Sep 30 05:59:11 EDT 2016
Hello Roman,
directories are added automatically to the directories.wxs file if you use the install() command in cmake and set the DESTINATION to some subfolder:
install(FILES <myfiles>
DESTINATION "my/sufolder/path")
To add completely new directories I'd suggest to use CPACK_WIX_EXTRA_SOURCES and use a <DirectoryRef> element where you can place your new directories in. Untested example how to add a directory (not sure if it works exactly like this):
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="my_dir_id" Name="my_dir"/>
</DirectoryRef>
</Fragment>
</Wix>
I'm not sure if patching of <Directory> elements is possible/implemented in cpack and I believe using the extra sources mechanism is more convenient.
PS: if you want to use the CPACK_WIX_PATCH_FILE nevertheless and you have many framents to patch, CPACK_WIX_PATCH_FILE also accepts a list of filenames so you can split up your patches in an arbitrary number of files.
best regards,
Michael
> -----Original Message-----
> From: cmake-developers [mailto:cmake-developers-bounces at cmake.org]
> On Behalf Of Roman Wüger
> Sent: Friday, September 30, 2016 8:44 AM
> To: CMake Developer MailingList; CMake MailingList
> Subject: [cmake-developers] CPack [WiX] Customizations of individual
> features/components
>
> Hello,
>
> I want to customize some with CPack generated *.wxs files.
>
> For example: directories.wxs is generated with only the TARGET_DIR.
>
> How can I add an additional directory in this file and use the newly added
> directory in the components (features.wxs)?
>
> I read about CPACK_WIX_PATCH_FILE. Maybe it is possible to do so with it,
> but if so how?
>
> Thanks in advance
>
> Regards
> Roman
> --
>
> 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://public.kitware.com/mailman/listinfo/cmake-developers
> .
More information about the CMake
mailing list