MantisBT - CMake
View Issue Details
0013789CMakeCPackpublic2012-12-12 19:032013-06-03 09:05
Eric LaFranchi 
David Cole 
highfeaturealways
closedfixed 
WindowsWindows*
CMake-2-8 
CMake 2.8.11CMake 2.8.11 
0013789: WIX additional support for Product Icon, UI Dialog and UI Banner
CMake 2.8.11 work in progress branch. The WIX support works fine, no issues.
I want to propose a straight forward addition for the 2.8.11 release.

1. Offer the option to set the application icon that appears in "Uninstall or change a program" (add/remove programs).
2. Offer the option to set the UI Banner and UI Dialog images.
Latest source. Windows XP or later 32/64 bit system.

Create a WIX package and then examine the "Uninstall or change a program" (add/remove programs) and notice the default WIX icon.
The installer uses WIX default images for initial UI dialog and the UI banner.
I did not update the tests; set the variables is optional and someone will need to manually run the installer to see if they work correctly.

New CMake variables:
CPACK_WIX_PRODUCT_ICON
CPACK_WIX_UI_BANNER
CPACK_WIX_UI_DIALOG

Documentation:
CPACK_WIX_PRODUCT_ICON -- icon used to the left of the application entry in add/remove programs.
CPACK_WIX_UI_BANNER -- 493 by 58 pixels, this bitmap will appear at the top of all but the first page of the installer.
CPACK_WIX_UI_DIALOG -- 493 by 312 pixels, this bitmap will appear on the first page of the installer.

Two files are updated: cmCPackWIXGenerator.cxx and WIX.template.in.

Diffs attached.
No tags attached.
has duplicate 0013828closed Nils Gladitz Need additional functionality for WiX packager 
diff CMake-WIX-Feature-Request.diff (1,513) 2012-12-12 19:03
https://public.kitware.com/Bug/file/4588/CMake-WIX-Feature-Request.diff
patch 0001-CMake-Nightly-Date-Stamp.patch (659) 2012-12-13 21:58
https://public.kitware.com/Bug/file/4590/0001-CMake-Nightly-Date-Stamp.patch
diff CMake-WIX-Feature-Request-2.diff (2,604) 2012-12-13 21:59
https://public.kitware.com/Bug/file/4591/CMake-WIX-Feature-Request-2.diff
patch 0001-WIX-Product-Icon-UI-Banner-UI-Dialog-support.patch (3,121) 2012-12-14 15:55
https://public.kitware.com/Bug/file/4594/0001-WIX-Product-Icon-UI-Banner-UI-Dialog-support.patch
Issue History
2012-12-12 19:03Eric LaFranchiNew Issue
2012-12-12 19:03Eric LaFranchiFile Added: CMake-WIX-Feature-Request.diff
2012-12-12 23:01David ColeNote Added: 0031874
2012-12-13 02:52Eric NOULARDNote Added: 0031875
2012-12-13 21:58Eric LaFranchiFile Added: 0001-CMake-Nightly-Date-Stamp.patch
2012-12-13 21:59Eric LaFranchiFile Added: CMake-WIX-Feature-Request-2.diff
2012-12-13 22:00Eric LaFranchiNote Added: 0031881
2012-12-13 22:01Eric LaFranchiNote Edited: 0031881bug_revision_view_page.php?bugnote_id=31881#r978
2012-12-14 01:59Eric NOULARDNote Added: 0031883
2012-12-14 06:13David ColeAssigned To => David Cole
2012-12-14 06:13David ColeStatusnew => assigned
2012-12-14 06:14David ColeTarget Version => CMake 2.8.11
2012-12-14 15:55Eric LaFranchiFile Added: 0001-WIX-Product-Icon-UI-Banner-UI-Dialog-support.patch
2012-12-14 15:57Eric LaFranchiNote Added: 0031900
2012-12-20 11:06Eric NOULARDCategoryCMake => CPack
2012-12-28 15:41David ColeNote Added: 0031952
2012-12-28 15:43David ColeNote Added: 0031953
2012-12-28 15:43David ColeStatusassigned => resolved
2012-12-28 15:43David ColeFixed in Version => CMake 2.8.11
2012-12-28 15:43David ColeResolutionopen => fixed
2013-01-03 10:46Eric NOULARDRelationship addedhas duplicate 0013828
2013-06-03 09:05Robert MaynardNote Added: 0033177
2013-06-03 09:05Robert MaynardStatusresolved => closed

Notes
(0031874)
David Cole   
2012-12-12 23:01   
Can you re-do the diff as a *.patch file as produced by "git format-patch -1" -- that way, your authorship information is preserved without me having to do anything special. I can just run "git am -3 0001-your-commit.patch" and it's all quite simple...

Thanks.
(0031875)
Eric NOULARD   
2012-12-13 02:52   
Hi Eric,

The documentation of the new variables should be put in:
./Modules/CPackWIX.cmake

as others.

That way they will get handled by
cpack --help-variable[-list] automatically.
(0031881)
Eric LaFranchi   
2012-12-13 22:00   
(edited on: 2012-12-13 22:01)
Add documentation as Eric suggested.
Uploaded a new set of diffs.
To be honest, I don't understand git format-patch, so let me know what might not be correct.

(0031883)
Eric NOULARD   
2012-12-14 01:59   
Hi Eric,

For using "git format -1" as suggested by David you need to:

1) clone CMake git master.
   
   git clone git://cmake.org/cmake.git [^]
   
   see indication http://www.cmake.org/Wiki/CMake/Git [^]

2) create your local branch from there

   git checkout -b CPackWIX-Improvement

3) Do your modification and commit them in your local branch
   
   git commit -a ...
   

4) Then in the end you'll be able to use

   git format-patch -1

   which means "produce a patch which consist in the last commit of this
                local tree".


The idea is that if you use this process the patch will contains all needed informations: patch content AND proper authorship Name, E-mail etc... you did setup with git.

Hopes this helps.
(0031900)
Eric LaFranchi   
2012-12-14 15:57   
Thanks for the straight forward directions (new to git).
Patch attached.
(0031952)
David Cole   
2012-12-28 15:41   
Did the test pass for you with this change? And can you build a WiX installer with this patch applied...?

I got the following test failure when I ran the CPackWiXGenerator test:

-- Running WiX Tool: wixcop C:/Users/davidcole/Dashboards/My Tests/CMake Win32-vs9-Release/Tests/CPackWiXGenerator/_CPac
k_Packages/win32//WIX//main.wxs
-- wixcop Output:
Windows Installer Xml Cop version 3.6.3303.0
Copyright (C) Outercurve Foundation. All rights reserved.

C:\Users\davidcole\Dashboards\My Tests\CMake Win32-vs9-Release\Tests\CPackWiXGenerator\_CPack_Packages\win32\WIX\main.wx
s(28) : error WXCP0007 : The whitespace preceding this node is incorrect. (WhitespacePrecedingNodeWrong)
C:\Users\davidcole\Dashboards\My Tests\CMake Win32-vs9-Release\Tests\CPackWiXGenerator\_CPack_Packages\win32\WIX\main.wx
s(29) : error WXCP0007 : The whitespace preceding this node is incorrect. (WhitespacePrecedingNodeWrong)
C:\Users\davidcole\Dashboards\My Tests\CMake Win32-vs9-Release\Tests\CPackWiXGenerator\_CPack_Packages\win32\WIX\main.wx
s(33) : error WXCP0007 : The whitespace preceding this node is incorrect. (WhitespacePrecedingNodeWrong)
C:\Users\davidcole\Dashboards\My Tests\CMake Win32-vs9-Release\Tests\CPackWiXGenerator\_CPack_Packages\win32\WIX\main.wx
s(37) : error WXCP0007 : The whitespace preceding this node is incorrect. (WhitespacePrecedingNodeWrong)

CMake Error at C:/Users/davidcole/Dashboards/My Tests/CMake/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake:54 (messa
ge):
  WiX wixcop failed: 2
Call Stack (most recent call first):
  C:/Users/davidcole/Dashboards/My Tests/CMake/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake:66 (run_wix_command)


After adjusting the whitespace in the template input file, the test passed just fine. So I pushed it to stage and merged it to 'next' -- as long as the dashboards look good tomorrow and moving forward, we should be able to merge this to master for the upcoming 2.8.11 release.

Here's the commit now in 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3793dca08a41fd9199e65ff834b839b4f65397c7 [^]
(0031953)
David Cole   
2012-12-28 15:43   
Expecting resolved in 2.8.11 as long as the dashboards look good tomorrow. (See previous note)
(0033177)
Robert Maynard   
2013-06-03 09:05   
Closing resolved issues that have not been updated in more than 4 months.