WiX 3.6: A Developer''''s Guide to Windows Installer XML doc

488 7.4K 1
WiX 3.6: A Developer''''s Guide to Windows Installer XML doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

www.it-ebooks.info WiX 3.6: A Developer's Guide to Windows Installer XML An in-and-out, to-the-point introduction to Windows Installer XML Nick Ramirez BIRMINGHAM - MUMBAI www.it-ebooks.info WiX 3.6: A Developer's Guide to Windows Installer XML Copyright © 2012 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: October 2010 Second edition: December 2012 Production Reference: 1051212 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78216-042-7 www.packtpub.com Cover Image by Abhishek Pandey (abhishek.pandey1210@gmail.com) www.it-ebooks.info Credits Author Nick Ramirez Reviewers Neil Sleightholm Martin Oberhammer Paul Michniewicz Roel van Bueren ENG. Nir Bar Acquisition Editor Usha Iyer Lead Technical Editor Dayan Hyames Technical Editor Jalasha D'costa Project Coordinator Arshad Sopariwala Proofreader Maria Gould Indexer Rekha Nair Production Coordinator Arvindkumar Gupta Cover Work Arvindkumar Gupta www.it-ebooks.info About the Author Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be a moment of terror, he has become a big fan of technologies such as WiX. Other related interests include build automation, software architecture, and playing Portal 2. Nick lives with his wife and two cats. I would like to thank the hard-working folks at Packt Publishing. Their organization and planning make all the difference! I would also like to thank the dedicated people of the WiX community, who tirelessly volunteer their time to answer questions. Finally, I would like to thank the developers who contribute source code to the WiX project. Their expertise and commitment have gone towards making the best Windows deployment tool on the market. www.it-ebooks.info About the Reviewers Neil Sleightholm is an IT consultant working in the UK. He has an engineering background with experience in software development, application architecture, electronics development, and mechanical engineering. His current focus is on conguration management, build automation, installation development, and deployment. Neil has worked with most of the Microsoft platform technologies and has programmed in C, C++, C#, Visual Basic, .NET, SQL, ASP.NET, and ASP. In the build and source control eld he has experience with NAnt, MSBuild, TeamBuild, Subversion (SVN), TFS, VSS, Mercurial, and CVS. He has written installation systems using Windows Installer, Windows Installer XML (WiX), Windows Installer Custom Actions (using DTF), dotNetInstaller, InnoSetup, and Wise Installation System. Neil has worked with open source projects and has been a contributor to Windows Installer XML (WiX), dotNetInstaller, and the AlienBBC plugin for Logitech Squeezebox. In his spare time he is a petrol head and keen motorcyclist. If you want to know more about him, you can check out his LinkedIn prole at: http://www.linkedin.com/in/neilsleightholm. Martin Oberhammer currently works as a Software Engineer at Sophos in Vancouver, BC. He studied computer science at the Johannes Kepler University in Linz, Austria, where he graduated in 2002. His rst job in software deployment was at Utimaco Safeguard AG. In 2008, he moved to the USA and then to Canada, where he now resides. Nick and Martin where at one point colleagues and created a software installer using WiX technology. www.it-ebooks.info Paul Michniewicz is a software developer and educational consultant with diverse experiences in academia, government, and industry. As a developer, Paul has spent more than 12 years in software development and testing. Much of that time was spent in conguration management where he has managed source control systems, developed build and test automation strategies, and authored several installers in the enterprise space for companies such as JetForm and Adobe. As an educational consultant, Paul has developed and delivered introductory Java courses to professionals and students. He currently runs a tutoring business where he teaches mathematics, physical sciences, and software development to students of all ages. Paul has a special interest in working with students who have developmental needs. Paul lives in Ottawa, Canada with his wife Anne and two children Zygmunt and Moira. He is currently a stay-at-home dad and homeschools his son. To know more about Paul, you can check out his LinkedIn prole at ca.linkedin.com/in/ pmichnie . Roel van Bueren works as senior consultant, trainer, and developer for ROVABU NetWorks BV and ROVABU Software BV. Roel is specialized in Software Packaging using Windows Installer and Flexera AdminStudio, Application and Desktop Management by using Microsoft System Center Conguration Manager and Novell ZENworks Conguration Management, Desktop Deployment of Microsoft Windows XP, Windows 7, and Windows 8 by using Microsoft SCCM/MDT, Novell ZENworks Conguration Management, ENGL Imaging Toolkit, and also Microsoft .NET/C# development and application virtualization. His latest projects involve "Bundle Commander" for Novell ZENworks Conguration Management and "Setup Commander" for Microsoft System Center Conguration Manager 2012, Microsoft Deployment Toolkit, and other deployment solutions such as Dell KACE and RES Automation Manager, for which customized transform les are needed to deploy MSI packages or silent switches to deploy legacy setups. www.it-ebooks.info ENG. Nir Bar is a computer engineer, and graduate of Technion – Israel Institute of Technology. Nir Bar has over 13 years experience in software and hardware development. He has worked with RAFAEL – Advanced Defense Systems, Marvell Technology Group, Agilent Technologies, Applied Materials, McKesson, and other leading high tech companies. He has worked in the Microsoft platform technologies and has programmed in C, C++, C# .NET, and SQL Server. In the Linux platform, Nir Bar has programmed in C, C++, and PERL. He is also experienced in pre-Silicon verication methodologies and tools. Currently, Nir is an independent software consultant, developer, and tutor. He consults and develops software products from the idea stage through analysis, design, development stages, and to ready-to-market products. Nir Bar tutors Windows Installer technology to Israeli software companies. To contact Nir Bar you can drop an e-mail to: nir.bar@panel-sw.co.il. To my wife Sarit and to my sons Itay and Yehonathan for their love, support, and encouragement. www.it-ebooks.info www.PacktPub.com Support les, eBooks, discount offers and more You might want to visit www.PacktPub.com for support les and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub les available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? • Fully searchable across every book published by Packt • Copy and paste, print and bookmark content • On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. www.it-ebooks.info www.it-ebooks.info [...]... What is WiX? Creating a Windows Installer, or MSI package, has always been a challenging task The package is actually a relational database that describes how the various components of an application should be unpacked and copied to the end user's computer In the past you had two options: • You could try to author the database yourself a path that requires a thorough knowledge of the Windows Installer. .. makes many of the arcane and difficult -to- understand aspects of the Windows Installer technology simple to use This book will teach you the WiX syntax so that you can create a professional-grade installer that's right for you In this chapter, we will cover the following topics: • Getting WiX and using it with Visual Studio • Creating your first WiX installer • Examining an installer database with Orca •... and followers Today, thousands use it to build Window Installer packages from simple XML elements Gone are the days when you would have had to pay for software to build an installer for you Now, you can do it yourself for cheap Not only that, but WiX has matured into a fairly slick product that's sufficiently easy to use Best of all, it has the bells and whistles you want, including functionality to. .. files are installed and the best way to organize them in your project You'll then use the tool Heat.exe to generate WiX markup Last, you'll learn about copying and moving files, and installing special-case files www.it-ebooks.info Preface Chapter 3, Putting Properties and AppSearch to Work, introduces you to Windows Installer properties, including those that are defined automatically and those that are... Logging 148 Showing a message box 149 Accessing feature and component states 150 Querying the MSI database 151 Inserting rows into the MSI database 151 Summary 153 Chapter 6: Adding a User Interface 155 Chapter 7: Using UI Controls 187 WiX standard dialog sets 155 WixUI_Advanced 156 WixUI_FeatureTree 158 WixUI_InstallDir 159 WixUI_Mondo 160 Customizing a standard dialog set 161 Creating your own dialogs 163... you'll master the technology quickly What this book covers Chapter 1, Getting Started, explains how after downloading and installing the WiX toolset, you'll start using it right away to create a simple installer Then, you'll see how to add a basic user interface to it, install it with logging turned on, and view its internal database Chapter 2, Creating Files and Directories, gives you a deeper understanding... to creating an installable package for your customers, some of which might be overlooked The following is a list of features that you get when you author a Windows Installer package with WiX: • All of your executable files can be packaged into one convenient bundle, simplifying deployment • Your software is automatically registered with Programs and Features • Windows takes care of uninstalling all of... software, the end user's computer can be rolled back to a previous state • You can create Wizard-style dialogs to guide the user through the installation Many people today simply expect that your installer will have these features Not having them could be seen as a real deficit For example, what is a user supposed to do when they want to uninstall your product but can't find it in the Programs and Features... projects, the parts can be split up into multiple XML source files to make it easier to work with Going further, if your product is made up of multiple applications that will be installed together as a suite, you can compile the different chunks into libraries that can be merged together into a single MSI file This allows each team to isolate and manage its part of the installation package [9] www.it-ebooks.info... transform file used to apply changes to an in-progress installation or to create a patch file Shine Creates a DGML diagram from an MSI Smoke.exe Runs validation checks on an MSI or MSM file Pyro.exe Creates a patch file (.msp) from wixmsp and wixmst files WixCop.exe Converts Version 2 WiX files to Version 3 WixUnit.exe Validates WiX source files Lux.exe and Nit.exe Authors and runs unit tests on custom . Bar Acquisition Editor Usha Iyer Lead Technical Editor Dayan Hyames Technical Editor Jalasha D'costa Project Coordinator Arshad Sopariwala Proofreader Maria. www.it-ebooks.info WiX 3. 6: A Developer's Guide to Windows Installer XML An in-and-out, to- the-point introduction to Windows Installer XML Nick Ramirez BIRMINGHAM

Ngày đăng: 16/03/2014, 07:20

Mục lục

  • Chapter 1: Getting Started

    • Introducing Windows Installer XML

      • What is WiX?

      • Is WiX for you?

      • Where can I get it?

      • Visual Studio package (Votive)

      • A word about GUIDs

      • Your first WiX project

        • XML declaration and Wix element

        • Putting it all together

        • Adding a user interface

        • Turning logging on during installation

        • Chapter 2: Creating Files and Directories

          • The File element

          • Copying and moving files

            • Copying files you install

            • Installing special-case files

              • Adding assembly files to the GAC

              • Installing a TrueType font

              • Creating an empty folder

              • Speeding up file installations

              • Chapter 3: Putting Properties and AppSearch to Work

                • Custom properties

                  • Declaring and setting properties

                  • Property visibility and scope

                  • Predefined Windows Installer properties

                    • Implied properties

                    • Chapter 4: Improving Control with Launch Conditions and Installed States

                      • The syntax of conditions

                        • Condition syntax

                        • Chapter 5: Understanding the Installation Sequence

                          • InstallUISequence

                            • UI standard actions

                              • FindRelatedProducts

Tài liệu cùng người dùng

Tài liệu liên quan