CPack/WiX shortcuts with custom arguments

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CPack/WiX shortcuts with custom arguments

Cook, Steven (G&I)

Hi,

 

I’m attempting to transition from NSIS to WiX for our Windows installer and have been unable to find a way to create customised shortcuts with WiX (I would like to specify both the working directory and command line parameters).

 

Some approaches I’ve tried are:

·         Specifying CPACK_PACKAGE_EXECUTABLES, and then using CPACK_WIX_PATCH_FILE to modify the shortcut. This approach doesn’t work because the patching mechanism can only add new XML tags; it is unable to add or modify properties on existing tags.

·         Creating the shortcut myself via CPACK_WIX_EXTRA_SOURCES. This doesn’t work because PROGRAM_MENU_FOLDER is not defined in directories.wxs unless cpack is creating shortcuts itself. And I can’t define this directory myself because the patching mechanism doesn’t allow modifications to the top level TARGETDIR directory.

 

Ideas of things that might work but which are not ideal:

·         Create an unwanted shortcut with cpack and then define my own shortcuts with CPACK_WIX_EXTRA_SOURCES. But then there is an unwanted shortcut.

·         Create separate .bat files for each start menu item so that working directory and command line parameters are not required.

 

Is there anything else I can try?

 

Thanks

Steve


--

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:
https://cmake.org/mailman/listinfo/cmake