Re: [CMake] CPack WIX examples
On 2014-09-25 17:34, jmerkow wrote: Thanks a lot this worked! Are there any plans to add the functionality for adding registry entries into the WIX xml directly? Looking at the source code, it looks like it would be somewhat painless. If no one is already working on this, I'll work on contributing the code myself, in the near future. I was planning on extending the patch mechanism for the Product element following up on a request that was part of a different issue: http://public.kitware.com/Bug/view.php?id=15165#c36863 Which I think would also match this use case? Unless you were thinking about adding these somewhere else or in an entirely different way? Nils -- 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
Re: [CMake] CPack WIX examples
Thanks a lot this worked! Are there any plans to add the functionality for adding registry entries into the WIX xml directly? Looking at the source code, it looks like it would be somewhat painless. If no one is already working on this, I'll work on contributing the code myself, in the near future. -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588600.html Sent from the CMake mailing list archive at Nabble.com. -- 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
Re: [CMake] CPack WIX examples
On 24.09.2014 23:20, jmerkow wrote: Ok, I've double checked everything and I'm not sure whats going on. I was looking in files.wxs (in _CPack_Packages/win64/WIX) for the component ID, and i've tried a few different ones. I also dropped the config file step and used your example patch.xml: Still nothing added when I search file.wxs for FOOBAR or anything else that should be added with the fragment injection. I am still curious as to why the component id's look so different between your tests and whats being generated in my file.wxs. That seems to leave the older version question Is this feature new with 3+? I am using CMake 2.8.12.2 Yes, 2.8.12 does not have CPACK_WIX_PATCH_FILE yet: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:CPackWIX You would need 3.0: www.cmake.org/cmake/help/v3.0/module/CPackWIX.html The WIX generator is still relatively new and hasn't had as much time as the other generators to settle yet. I am still in progress of adding features as requests come in which means that many of the more recent additions will require a more current CMake version. Nils -- 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
Re: [CMake] CPack WIX examples
I forgot to mention that I double checked that this particular code was being executed. I started changing the name (and adding a time stamp) to the msi in the same section of code to double check. Here is it is (its at send of my code for cpack): ... if(WIN32) if(MSVC) set(CPACK_GENERATOR "WIX") set(CPACK_WIX_PRODUCT_GUID "---") set(CPACK_WIX_UPGRADE_GUID "---") SET(CPACK_PACKAGE_FILE_NAME "myproj-${myproj_FULL_VERSION}-Win-x64_${TIMESTAMP}_NewTest") set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/patch.xml") endif() endif() include(CPack) -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588595.html Sent from the CMake mailing list archive at Nabble.com. -- 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
Re: [CMake] CPack WIX examples
Ok, I've double checked everything and I'm not sure whats going on. I was looking in files.wxs (in _CPack_Packages/win64/WIX) for the component ID, and i've tried a few different ones. I also dropped the config file step and used your example patch.xml: Still nothing added when I search file.wxs for FOOBAR or anything else that should be added with the fragment injection. I am still curious as to why the component id's look so different between your tests and whats being generated in my file.wxs. That seems to leave the older version question Is this feature new with 3+? I am using CMake 2.8.12.2 -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588594.html Sent from the CMake mailing list archive at Nabble.com. -- 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
Re: [CMake] CPack WIX examples
On 24.09.2014 21:26, jmerkow wrote: Am I obtaining the id wrong? The documentation is a little confusing compared to whats being generated. so I'm not sure exactly sure if I have the proper id. Is there a way to get the Id from the in cmake to configure the file directly? Maybe there is another issue entirely? After running CPack with the WIX generator you will have a "_CPack_Packages\\WIX" directory. Within are all the WIX sources and everything else used to build the installer. In "files.wxs" you can find all the component definitions and their IDs. Here you can also find your patch fragments (if they are being successfully applied). Using a non existent ID in a patch file should generate an error at CPack time. If you are currently successfully generating an installer with an invalid ID that might indicate that the patch file isn't being used at all. Is it possible that you are using an older CMake release or that you are setting CPACK_WIX_PATCH_FILE after or outside the context of your include(CPack)? CPack only sees the options that make it to CPackConfig.cmake which is generated by include(CPack). Nils -- 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
Re: [CMake] CPack WIX examples
Ok I'm going the fragment injection route, but having some issues. So I found the component id for the target that these registry values will be needed by in files.wxs: In this case its 'CMP_ID_1', using the first cmp id seemed like a safe bet in general to have it referenced by a feature. So a configurable patch.xml.in looks something like: ... There are just a few in there to test the process. In CMake, i configure and add it the file to CPACK_WIX_PATCH_FILE: configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/registry-patch.xml.in "${TEMP_DIR}/registry-patch.xml" @ONLY) set(CPACK_WIX_PATCH_FILE "${TEMP_DIR}/registry-patch.xml") Then I generate the msi using cpack. However the resulting msi doesn't set any registry entries, I also don't see any of the entries anywhere in the resulting xml. I did notice that in the documentations [1] and in your example your component id is more complex.. It looks to be something like (and I'm abusing cmake generator expressions for brevity) Id='CM_CP_@cmake_component@.@TARGET_FILE_DIR:tgt@.@TARGET_FILE_DIR:tgt@'. I tried an Id of this nature as well (i.e. ) but this also did not work. Am I obtaining the id wrong? The documentation is a little confusing compared to whats being generated. so I'm not sure exactly sure if I have the proper id. Is there a way to get the Id from the in cmake to configure the file directly? Maybe there is another issue entirely? -Jameson [1] http://www.cmake.org/cmake/help/v3.0/module/CPackWIX.html?highlight=cpack_wix_patch [2] https://github.com/ngladitz/cmake-wix-testsuite/tree/master/fragment_injection -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588591.html Sent from the CMake mailing list archive at Nabble.com. -- 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
Re: [CMake] CPack WIX examples
On 24.09.2014 02:40, jmerkow wrote: It seems the best way to do this would be to override the template with a number of configurable entries? So I could add something like (there's about 15 of em): I wanted to check to see if there was a way to handle this directly from CMake. The elements will require a parent and that component needs to be referenced by an existing feature. I've used CPACK_WIX_PATCH_FILE (e.g. the fragment_injection example) to insert similar content into existing components. The patch file could also be configured by configure_file(). If you need this to be an independent I suppose you could use your own template, add the (and its childen) to the element and add a reference to it from within the existing element. Nils -- 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
Re: [CMake] CPack WIX examples
Thanks a lot for your help! Those examples are excellent. I have a follow up questions for creating the installer, though. We have a number of registry entries that need to be created for the software to run in 'release mode'. In our current system we add registry entries into the wxs, but I don't see a way to do that with cmake/cpack easily. We add a few lines, such as: We use these registry entries as anchors for the locations for software assets. It seems the best way to do this would be to override the template with a number of configurable entries? So I could add something like (there's about 15 of em): I wanted to check to see if there was a way to handle this directly from CMake. -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588576.html Sent from the CMake mailing list archive at Nabble.com. -- 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
Re: [CMake] CPack WIX examples
On 09/23/2014 04:34 PM, jmerkow wrote: Hello I am working on creating an msi installer using cpack with the WIX installer (converting from old system). Im having some trouble finding some good resources to do this. My project needs to set a number of registry entries. We have a few components, and licenses that are installed along with our software. I also don't completely understand the example for CPACK_WIX_PATCH_FILE in the documentation for adding components, etc. I thought it would be helpful to see some of this in action and I was hoping someone could point me to an example or two of a project that uses CPack WIX generators to get me going. I searched github and around the CMake website, and couldn't find any projects that use WIX. I've got some tiny example projects (actually manual test cases): https://github.com/ngladitz/cmake-wix-testsuite Each sub directory should contain a self contained project usually exercising one specific feature of the WIX generator. Nils -- 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
[CMake] CPack WIX examples
Hello I am working on creating an msi installer using cpack with the WIX installer (converting from old system). Im having some trouble finding some good resources to do this. My project needs to set a number of registry entries. We have a few components, and licenses that are installed along with our software. I also don't completely understand the example for CPACK_WIX_PATCH_FILE in the documentation for adding components, etc. I thought it would be helpful to see some of this in action and I was hoping someone could point me to an example or two of a project that uses CPack WIX generators to get me going. I searched github and around the CMake website, and couldn't find any projects that use WIX. -Jameson -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561.html Sent from the CMake mailing list archive at Nabble.com. -- 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