Visio WiX Setup project in Visual Studio Galery

The Visio Wix setup project was improved a bit. To simplify things, I’ve published it as a project template for Visual Studio in Visual Studio Galery. This is the first time I publish anything in Visual Studio Galery, so that was a bit interesting how to make the wheels rolling:

11-05-2013 4-19-38

In fact, this turned out to be rather easy actually. A good introduction how to publish stuff to Visual Studio Galery can be found on codeproject. That article gives a good  overview, how it all fits together. Anyways, the main result is that now it is possible to create an WiX-based installer project for Visio just like any other project in Visual Studio, please check out the video in the post.

Note that you must have WiX installed to be able to use this project template =)

Getting started:

http://www.youtube.com/watch?v=-LkSCQTp3D8

Adding new stencil to the project:

http://www.youtube.com/watch?v=BuUByjrRswA

The source code for the template itself is in the github repository (note that compiling that code will require you to install Visual Studio SDK).

The intaller project itslef should work properly out-of-the-box for Visio 2007, 2010, 2013, any language, both 32-bit and 64-bit. For Visio 2003 (does anybody still have it?) you have to modify the publication code (guids). It is a bit odd that you can specify "any target language" for Visio 2007 and later but not for Visio 2003 (now templates does exactly this – so taht it should with all language versionsions of Visio).

I think in the future the template can be improved a bit more to support localization, so that installer runs by default using the target system language. Also, it might be interesting to build  specialized WIX extension for Visio I think =)

The basic benefits of building installer with WiX are:

  • You are using the single solution, where you can include both your code and stencils / templates.
  • You can store all your source code, including installer code (whcih is plain text), in a version control system and therefore easily track hsitory of changes.
  • You build MSI installer, which is primary Windows deployment technology. MSI installer can be easily used e.g. in corporate environment to deploy data using group policies.
  • Compared to e.g. built-in Visual Studio deployment project, you can make a flexible user interface, to allow user select what to install (e.g. metric / US stencils/templates)
  • You get upgrades "out of the box".
  • Microsoft uses this technology itself to install stuff  – e.g. VisioSDK was (most probably) built with WIX actually =)

Some technical details of intereset.

Please mind that I have only found this official KB832029 about Windows Installer tables for Visio 2007. So basically the rest of information may not be absolutely accurate. But anyways, here is the brief description of the Visio PublishComponent table for templates and stencils used in the installer, for all current versions of Visio:

Column Format Description
Component ID <guid> For templates:
All versions: {CF1F488D-8D6F-499C-A78D-026E1DF38100}
Visio 2007: {6D9D8B6F-D0EF-4BC0-8DD4-09DD6CE2B000}
Visio 2010: {6D9D8B6F-D0EF-4BC0-8DD4-09DD6CE2B100}
Visio 2013: {6D9D8B6F-D0EF-4BC0-8DD4-09DD6CE2B200}
For stencils:
All versions: {CF1F488D-8D6F-499C-A78D-026E1DF38101}
Visio 2007: {6D9D8B6F-D0EF-4BC0-8DD4-09DD6CE2B001}
Visio 2010: {6D9D8B6F-D0EF-4BC0-8DD4-09DD6CE2B101}
Visio 2013: {6D9D8B6F-D0EF-4BC0-8DD4-09DD6CE2B201}
Qualifier LanguageId\FileName For Visio 2007 and above, you may specify ‘1’ as LocaleId to install the template for all languages. For Visio 2003 and below, you MUST specify all languages for which you want to install templates explicitly (add one row per language)
AppData Stencils:
MenuPath|AltNames|QuickShapeCount|Bits
Templates:
MenuPath|AltNames|FeaturedTemplate|Bits
– MenuPath: path in the menu. Use backslashes as level separator.
– AltNames: list of alternative stencil names. You will be able to refer the stencil from e.g. API using these names.
– QuickShapeCount: Number of “quick shapes”. First N shapes specified by this number will be regarded as “quick shapes”. Only makes sense for Visio 2010 and above.
– Bits: For which Visio to register the stencil (-1 = all, 32 = 32bit, 64 = 64bit). Only makes sense for Visio 2010 and above.
– Featured template: Show template on the StartPage. Only makes sense for Visio 2007. For later versions the template will be shown on start page anyways.

Leave a Reply