John McFadyen's profileJohn McFadyens Windows I...PhotosBlogGuestbookMore ![]() | Help |
|
|
June 06 Talking about Windows Installer Training
Quote Windows Installer Training June 05 Windows Installer 4.5 released
June 04 Introduction to WiXHi all, I know a bunch of people are waiting to get into this topic, so lets see how I go with the explanations. I haven't previously trained anyone with this at all so putting it into blog form could be somewhat interesting or confusing. There is a bunch of pre-requisite windows installer knowledge I will assume as well, so if I start to fast or too slow let me know. (I will try to cover this along the way if your new to Windows Installer some of my earlier blogs have covered that already) So as you are all likely aware the WiX toolset is basically an MSI to XML and XML to MSI compiler / decompiler for want of better words. For those of you who can string more code together than I can its probably a very very useful tool to get your head around. The WiX toolset is more suited to people in development roles or closely associated to software development in some way or another. One of the main benefits is it allows a great repeatable way to generate MSI's. If your in a development cycle that needs quick releases of new product source code this is an excellent way to achieve that as a result. My current role is doing just that compiling source code which is written all over the country into an MSI quickly and automated. Everyday I pull around a 1,000,000 lines of code together and compile it into assemblies then MSI's and have it deployed to large distributed server clusters inclusive of application configuration for multiple environments in a little over an hour. There is a number of different technologies at work to make all this happen and WiX is a fairly substantial part of that process. So I will attempt to explain how you can utilise WiX to do similar compilation of large projects in a series of articles. So enough of the pre amble lets get into WiX. To start of there is a number of tools included in the WiX toolset. In order to start off with basic WiX we are only going to need to of them. These are: Candle.exe and Light.exe (for some reason Rob Mensching had a fascination with lights of some sort when designing WiX most of the tools are names resembling light related names or objects) Anyway the candle tool allows a pre compilation step which converts a WiX based file into a formatted wixobj file. Light is then used to compiled the pre compiled file into an MSI file combining it with the source code to create your completed MSI. In order for the two compilers to run you need to compile a WiX source file. WiX files come in a number of different file types, however for the most part I will be discussing wxs files. So the wxs file format is simply and XML representation of your MSI database structure. So before I dig too much into the internal formatting of the file I will outline the rough concept of the process.
WXS File structure All WiX files must start with this header as a bare minimum.
Before we move onto the next step you need to be aware of the following Windows Installer terms.
Each Windows Installer application must have some specific Product based meta data stored within the <Product> Node, as such the corresponding WiX scripts should also have those same attributes. The minimum attribute set and their respective WiX attributes are:
Note: Specifying {????????-????-????-????-???????????} forces WiX to generate a new GUID each compilation, ALL GUID's should be in upper case. Putting this all together you should have something like this.
As with all Windows Installer packages you also need a package code. This is represented by the <Package> element. The package element also has a number of attributes which are required which are shown below. <Package Id="????????-????-????-????-????????????" InstallerVersion="200" Platforms="Intel" Languages="1033" Compressed="yes" SummaryCodepage="1252" Description="My Application" Comments="Hi there" Manufacturer="Installac Pty Ltd" /> Note: Using "????????-????-????-????-????????????" as the package code creates a new generated GUID each time the compiler runs. This ensures you are running with the rule of creating a new package code for each iteration of your package. You need to insert the package element into the product element and then you are ready for your first compilation. Save the file as something like testproduct.wxs. To test your compilation now you to run the first of the two compilers. candle.exe <folder path to>testproduct.wxs This will create a wixobj file which can then be used by the wix linker (light.exe) light.exe <folder path to>testproduct.wxs The result of this should be your first WiX msi. June 02 General updatehi all just a quick note to let you know about the silence.
I have written a bunch of new content, but currently in the middle of moving house so im stuck without internet (which is very painful)
I don't feel right doing this at work so your going to have to bare with me for a bit. Should be online in a week or so. At which time I will be flooding the site with more info.
|
|
|