Excel-DNA / WiXInstaller

Template project for a WiX-based installer for an Excel-DNA add-in
MIT License
49 stars 29 forks source link

Updates for appearance changes I had to make - updating all bar one of t... #11

Closed AlanStubbs closed 9 years ago

AlanStubbs commented 9 years ago

...he standard installer title messages to be in white text to go with black graphics. Committed here for info.

Add a Post-build event to the ExcelAddInDeploy project: Cscript "{Path to WiRunSQL.vbs}\WiRunSQL.vbs" "$(TargetDir)en-us\$(TargetFileName)" "UPDATE TextStyle SET Color = 16777215 WHERE TextStyle = 'WixUI_Font_Title'". This updates the installer database after it is built and changes the colour of the title text. Note the use of ` not ' around field names. Colour value calculated as:

"65536 * blue + 256 * green + red, where red, green, and blue are each in the range of 0-255. The value must not exceed 16777215, which is the value for white. The value is 0 for black, 255 for red, 65280 for green, 16711680 for blue and 8421504 for grey. Leaving the field empty specifies the default color." - copied from http://msdn.microsoft.com/en-ca/library/windows/desktop/aa372074%28v=vs.85%29.aspx See also, http://stackoverflow.com/questions/17574141/customise-fonts-with-wix-extensions and http://msdn.microsoft.com/en-us/library/windows/desktop/aa368568%28v=vs.85%29.aspx

Following this update to all the Title fonts, one needed to be in black - hence the addition of the TextStyle element in Product.wxs which is then used in CustomMessages.wxl to create a custom message for the "WelcomeEulaDlgTitle" item. The names of these items can be found in, for example, the WixUI_en-us.wxl file in the WiX source code: http://wix.codeplex.com/SourceControl/latest#src/ext/UIExtension/wixlib/WixUI_en-us.wxl See also http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html

AlanStubbs commented 9 years ago

These are updates I had to make for a specific project and I'm adding them here as information for other users since it took a fair mount of digging around to pull all the pieces together. Please review - they might be better in a separate tutorial file or similar.

govert commented 9 years ago

Hi Alan, Could you perhaps add the information that you have in the commit comments, as comments into the relevant code files? I think the color story, in particular the reason for adding one special color style in the message file, should be visible close to where someone might see it. Likewise the script execution command and the reason for having it might go into a comment at the top of the script. I fear the commit comment might slip from view in the long term, so it helps to have the relevant information close at hand. -Govert

govert commented 9 years ago

Wonderful - thank you very much.