Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
19Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Windows Installer XML 3

Windows Installer XML 3

Ratings:

4.5

(4)
|Views: 7,344|Likes:
Published by Lee Wiscovitch

More info:

Published by: Lee Wiscovitch on May 01, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/12/2013

pdf

text

original

 
WiX Help
This documentation contains information about the WiX toolset. See the following topics for more detailed information:
Overview 
About WiX 
Using WiX on the Command Line 
Using WiX in Visual Studio 
WiX Schema Reference 
Advanced WiX Topics 
Additional Resources 
Introduction to WiX and the WiX Visual Studio package
What is WiX?
TheWindows Installer XML (WiX) platformis a set of tools and specifications that allow you to easily create Windows Installer database files. The WiX tools model the traditional compile and link model used tocreate executables from source code. For WiX, source code is written in XML files. These files are validated against a schema, wix.xsd, then processed by a preprocessor, compiler, and linker to create the desiredresult. The WiX platform has been designed to allow for the easy creation of multiple Windows Installer databases from a small set of source files.
What is the WiX Visual Studio package?
TheWiX Visual Studio packageallows you to create WiX projects, to edit WiX source code using IntelliSense, and to build your project in the Visual Studio IDE.
Getting Started Learning WiX
There are several options available to get started learning how to use WiX.
Tutorials
If you prefer to learn from a tutorial, the following options are available:
Introductory tutorials:
 
Using the WiX Toolset to Integrate Setup into Your Development Process 
Automate Releases With MSBuild And Windows Installer XML 
Comprehensive tutorial:
 http://www.tramontana.co.hu/wix/  
Audio-Visual
If you prefer to learn from audio-visual presentations, the following options are available:
Blog introduction with video 
Video on Channel 9 
MSDN Radio broadcast 
Help Documentation
If you prefer to learn from help documentation, the WiX 2.0 documentation is published on SourceForge athttp://wix.sourceforge.net/manual-wix2/wix_index.htm
 
, and the WiX 3.0 documentation is available in thefile WiX.chm that is installed as a part of WiX3.msi.
Community
If you prefer to learn by interacting with the community, there is a WiX users mailing list athttp://wix.sourceforge.net/mailinglists.html#wix-users.
Integrated Development Environment
If you prefer to learn by using an integrated development environment, there is an overview of WiX editors athttp://robmensching.com/blog/archive/2007/11/20/WiX-editors.aspx.
Reverse Engineering
If you prefer to learn by working backward from a Windows Installer package you have already created, you can run theWiX decompiler(Dark) to convert your .msi or .msm package into WiX authoring and thenrecompile it using theWiX compiler(Candle) andWiX linker(Light).
Reading Source Code
If you prefer to learn by reading code, WiX is an open source project, and you can look at the source code by reviewing theHow to be a Windows Installer XML Developertopic.
Fix a Bug, Write a Feature
If you prefer to learn by writing code, you can review the following WiX issue trackers:
Bugs
-http://sourceforge.net/tracker/?group_id=105970&atid=642714 
Features
-http://sourceforge.net/tracker/?group_id=105970&atid=642717 For WiX development assistance, there is a WiX developer mailing list athttp://sourceforge.net/mailarchive/forum.php?forum_name=wix-devs.
About WiX
Windows Installer XML, or WiX, provides a schema that describes a Windows Installer database (MSI or MSM), as well as tools to convert the XML description files into a usable database. The WiX tools model thetraditional compile and link model used to create executables from source code. This section provides an introduction on the tools and concepts as well as an overview of the file types in WiX.
 Note: This document assumes you have a working knowledge of the Windows Installer database format.
 
File Types 
Tools and Concepts 
WiX File Types
There are many file types in WiX that are generated from different tools in the toolset. At the highest level, all input files and intermediate files for WiX are XML files. The output is in the form of standard Windows
 
Page 1of 136WiX Help5/1/2008file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhD3BB.htm
 
Installer database files.Source files (.wxs and .wxi) are compiled, producing object files (.wixobj). These objects files are then consumed by the linker, which produces Windows Installer database files (.msi or .msm). This is analogous to theC++ model of compiling source code to object files, then linking to produce executables.There are more advanced file types that are supported in WiX. The details of these file types are listed in theList of file typestopic.
Overview
Windows Installer XML Files - .wxs & .wixobj
A .wxs file is the extension used by all source files in the Windows Installer XML system. These .wxs files are analogous to .cpp files for C++ or .cs files for C#. The .wxs files are preprocessed and then compiled intoWiX object files, which use the extension .wixobj. When all of the source files have been compiled into object files, the linker is used to collect the object files together and create a Windows Installer database. Moredetails on the compiler and linker are provided later in this topic.
Structure of .wxs files
All .wxs files are well-formed XML documents that contain a single root element named <Wix/>. The rest of the source file may or may not adhere to the WiX schema before preprocessing. However, after beingreprocessed all source files must conform to the WiX schema or they will fail to compile.The root <Wix> element can contain at most one of the following two elements as children: <Product>, <Module>. However, there can be an unbounded number <Fragment> elements as children of the root <Wix>element. When a source file is compiled into an object file, each instance of these elements creates a new section in the object file. Therefore, these three elements are often referred to as section elements.It is important to note, that there can be only one <Product> or <Module> section element per source file because they are compiled into special sections called entry sections. Entry sections are used as starting points inthe linking process. Sections, entry sections, and the entire linking process are described in greater detail later in this document.The children of the section elements define the contents of the Windows Installer database. You’ll recognize <Property> elements that map to entries in the Property table and a hierarchy of <Directory> elements thatbuild up the Directory table. Most elements contain an “Id” attribute that will act as the primary key for the resulting row in the Windows Installer database. In most cases, the “Id” attribute also defines a symbol whenthe source file is compiled into an object file.
Symbols and references
Every symbol in an object file is composed of the element name plus the unique identifier from the “Id” attribute. Symbols are important because they can be referenced by other sections from any source file. Forexample, a <Directory> structure can be defined in a <Fragment> in one source file and a <Component> can be defined under a different source file’s <Fragment>. By making the <DirectoryRef> element a parent of the <Component> an explicit reference is created that references the symbol defined by a <Directory> in the first source file. The linker is then responsible for stitching the symbol and the reference together in a singleWindows Installer database. In some cases, implicit references are generated by the compiler while processing a source file. These implicit references behave identically to explicit references.In addition to the simple references described above, WiX supports specific complex references. Complex references are used in cases where the linker must generate extra information to link the symbol and referencetogether. The perfect example of a complex reference is in the Windows Installer’s Feature/Component relationship. When a <Component> is referenced explicitly by a <Feature> through a <ComponentRef> element,the linker must take the <Feature>’s symbol and the <Component>’s symbol and add an entry to the FeatureComponents table.This Feature/Component relationship is even more complex because certain elements in a <Component>, for example <Shortcut>, have references back to the primary Feature associated with the Component. Thesereferences from a child element of a <Component> are called reverse references or sometimes feature backlinks. Processing complex references and reverse references is probably the most difficult work the linker hasto do.
Structure of the .wixobj file
A .wixobj file is created by the compiler for each source file compiled. The .wixobj file is an XML document that follows the objects.xsd schema defined in the WiX project. As stated above the .wixobj file containsone or more sections that, in turn, contain symbols and references to other symbols.While the symbols and references are arguably the most important pieces of data in the .wixobj file, they are rarely the bulk of the information. Instead, most .wixobj files are composed of <table>, <row> and <field>elements that provide the raw data to be placed in the Windows Installer database. In many cases, the linker will not only process the symbols and references but also use and update the raw data from the .wixobj file. Itis interesting to note that the object file schema, objects.xsd, uses camel casing where the source file schema, wix.xsd, uses Pascal casing. This was a conscious choice to indicate that the object files are not intended tobe edited by the user. In fact, all schemas that define data to be processed only by the WiX tools use camel casing.
List of file types
The following list describes the supported file types in WiX:
Include Files (.wxi)
A .wxi file is analogous to .h files for C++. The root element of this file is <Include/>. Everything under the root element will be inserted when this file is included in another source or include file.
Localization Files (.wxl)
A .wxl file contains a set of strings used for localizing a product into a specified culture. The root element of this file is <WixLocalization/>. The culture is specified by setting the Culture attribute on the<WixLocalization/> element.
ExtensionTypeDescription
.wxiInclude FileA .wxi file is analogous to .h files for C++. The root element of this file is <Include>. Everything under the root element will be inserted inline when this file is includedin another source or include file..wxlLocalization FileA .wxl file contains a set of strings used for localizing a product into a specified culture. The root element of this file is <WixLocalization>. The culture is specified bysetting the Culture attribute on the <WixLocalization> element..wxsSource File A .wxs file as analogous to a .cpp file for C++. The Root element of this file is <Wix>..wixobjObject FileA .wixobj file is created by the compiler for each source file compiled. The .wixobj file contains one or more sections that, in turn, contain symbols and references toother symbols..wixout XML Output File A .wixout file is created by the linker which represents the result of linking a set of object files. The .wixout is an XML representation of the final output..wixlib WiX Library File A .wixlib file is a library of setup functionality that can be easily shared across different WiX-based packages by including it when linking the setup package..wixpdb Debug File A .wixpdb file is created by the linker for each final output. It contains the debugging information..wixmsp XML Patch File A .wixmsp file is the XML output generated by linking object files in a patch build..wixmst Transform File A .wixmst file is an XML representation of the difference between a pair of final outputs or XML outputs..msi Windows Installer InstallationPackageAn installation package file (.msi) is the basic unit of installation for the Windows Installer. For more information on .msi files, see theWindows Installerdocumentation..msm Windows Installer MergeModuleA merge module file (.msm) is used to share setup logic across different .msi packages. A merge module can be created by one development team, then merged intoanother development team's .msi package. For more information on .msm files, see theWindows Installer documentation..mst Windows Installer Transform A transform file (.mst) is used to apply changes to an .msi file. For more information on .mst files, see theWindows Installer documentation..pcpWindows Installer PatchCreation Process FileA patch creation properties file (.pcp) is used as an input to the patch building tools provided in the Windows Installer SDK. For more information on .pcp files, see theWindows Installer documentation.
 
Page 2of 136WiX Help5/1/2008file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhD3BB.htm
 
Source Files (.wxs)
All .wxs files are well-formed XML documents that contain a single root element named <Wix/>. The rest of the source file may or may not adhere to the WiX schema before preprocessing. However, after beingreprocessed all source files must conform to the WiX schema or they will fail to compile.The root <Wix/> element can contain at most one of the following two elements as children: <Product/>, <Module/>. However, there can be an unbounded number <Fragment/> elements as children of the root <Wix/>element. When a source file is compiled into an object file, each instance of these elements creates a new section in the object file. Therefore, these three elements are often referred to as section elements.It is important to note, that there can be only one <Product/> or <Module/> section element per source file because they are compiled into special sections called entry sections. Entry sections are used as starting pointsin the linking process. Sections, entry sections, and the entire linking process are described in greater detail later in this document.The children of the section elements define the contents of the Windows Installer database. You’ll recognize <Property/> elements that map to entries in the Property table and a hierarchy of <Directory/> elements thatbuild up the Directory table. Most elements contain an “Id” attribute that will act as the primary key for the resulting row in the Windows Installer database. Note, in the first release of the WiX schema the primary keywas represented by the text of the element. This location for the primary key was undesirable for several reasons and has been moved to the “Id” attribute. In most cases, the “Id” attribute also defines a symbol when thesource file is compiled into an object file.
Object Files (.wixobj)
A .wixobj file is created by the compiler for each source file compiled. The .wixobj file is an XML document that follows the objects.xsd schema defined in the WiX project. As stated above the .wixobj file containsone or more sections that, in turn, contain symbols and references to other symbols.While the symbols and references are arguably the most important pieces of data in the .wixobj file, they are rarely the bulk of the information. Instead, the majority of most .wixobj files are composed of , and elements that provide the raw data to be placed in the Windows Installer database. In many cases, the linker will not only process the symbols and references but also use and update the raw data from the .wixobjfile.It is interesting to note that the object file schema, objects.xsd, uses camel casing where the source file schema, wix.xsd, uses Pascal casing. This was a conscious choice to indicate that the object files are not intendedto be edited by the user. In fact, all schemas that defines data to be processed only by the WiX tools use camel casing.
Windows Installer Installation Packages
An installation package file (.msi) is the basic unit of installation for the Windows Installer. For more information on .msi files, see theWindows Installer documentation.
Windows Installer Merge Modules
A merge module file (.msm) is used to share setup logic across different .msi packages. A merge module can be created by one development team, then merged into another development team's .msi package. For moreinformation on .msm files, see theWindows Installer documentation.
Tools and Concepts
This section explores the concepts of the preprocessor, compiler, and linker. In addition, it provides a complete list of tools that WiX offers.
List of tools 
Preprocessor 
Compiler (Candle) 
Linker (Light) 
Decompiler (Dark) 
Visual Studio package (Votive) 
Diagram
Below is a diagram showing the relationship of all of the WiX tools and the output that they generate.
List of Tools
 
Page 3of 136WiX Help5/1/2008file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hhD3BB.htm

Activity (19)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
automationqtp123 liked this
Dan liked this
guganesan liked this
Lynn Zhang liked this
briscoegj liked this
Ascari Vitalis liked this
Axel Wolters liked this
currentmichel liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->