[CMake] CPACK WIX shortcuts

Tiago Macarios tiagomacarios at gmail.com
Thu Nov 3 14:32:47 EDT 2016


Hi Nils,

Here are all the versions of things involved:
Windows10 1607 14393.351
cmake 3.6.3
wix 3.10.3
VS 2015 Update 3 14.0.25431.01

I modified the test to be self contained:
==================================================
cmake_minimum_required(VERSION 3.6)
add_executable(h-w hw.cpp)

install(TARGETS h-w DESTINATION bin)

install(FILES hw.cpp DESTINATION src)

set_property(INSTALL "bin/$<TARGET_FILE_NAME:h-w>"
    PROPERTY CPACK_START_MENU_SHORTCUTS "Hello World"
)

set_property(INSTALL "src/hw.cpp"
    PROPERTY CPACK_START_MENU_SHORTCUTS "Source Code" "Same Source Code"
)

include(CPack)
==================================================

And I am building it like so:
mkdir build
cd build
cmake ..
cmake --build . --config Release
cpack -G WIX

If I understood the test correctly I should have two folders in the start
menu:
- "Hello World"
- "Source Code"
I don't see any of them after installing. AFAICT no other new folders are
created either.

If I go into the folder with the WIX generated input I don't see any
Shortcut directives
http://wixtoolset.org/documentation/manual/v3/xsd/wix/shortcut.html
cd _CPack_Packages/win32/WIX
cat *wxs *wxi | grep Shortcut
# Returns empty

Also, if I open the msi with Orca I don't see the shortcut table.

I am probably doing something wrong, if you could help me I would
appreciate. Zip files with project + build folder is here:
https://www.dropbox.com/s/4a889ijqnocllcb/wix.zip?dl=0

Tiago

On Thu, Nov 3, 2016 at 1:15 AM, Nils Gladitz <nilsgladitz at gmail.com> wrote:

> On 11/03/2016 12:23 AM, Tiago Macarios wrote:
>
> Hi,
>>
>> I am trying to create an installer with CPACK and WIX as generator.
>> Everything works fine except that I cannot get start menu shortcuts to work.
>>
>> I was using almost the same code as the link below (which seems to be the
>> unit tests for this feature), then I tried to build the unit test and I
>> still don't see the shortcut directives on the wix files.
>>
>> Am I doing something wrong, or is this a regression?
>>
>
> Which CMake version are you actually using?
> This feature was implemented in CMake 3.3.0.
>
>
>> https://github.com/ngladitz/cmake-wix-testsuite/blob/d01013e
>> 2066e68088b4f56a8ab7750eb3cea7089/property_start_menu_
>> shortcuts/CMakeLists.txt
>>
>
> This still works for me using CMake 3.7.0-rc2.
>
> CMake 3.7.0-rc2's own windows installer uses the same feature for the
> start menu shortcut to the documentation which also seems to work for me.
>
> Nils
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161103/7292c5ba/attachment.html>


More information about the CMake mailing list