سؤال

Microsoft is moving away from the Visual Studio built-in MSI setup projects. WiX seems to be one alternative. But the tutorials I've found for WiX are all about five years old. For example, WiX: Hints for New Users (Part 1 of 3) is one from 2007.

  1. Are there newer/better tutorials for WiX?

    That article and others mention Votive as a way to create and edit WiX files.

  2. Is Votive still an active project?

    WixEdit claims to be the only active project for a WiX editor, but it isn't integrated into Visual Studio.

  3. Should I use WixEdit or Votive?

هل كانت مفيدة؟

المحلول

Here's an answer I've posted before here. I'm not going to update it except to add Joy of Setup (from bob-arnson) and all the links in his blog sidebar will also be of use, less so in learning from scratch but very useful in knowing more once you get up to speed.

I dove into WiX about 4-5 years ago and it took me a good 6+ months before I felt I knew what I was doing and 12+ months to feel confident. There is a LOT that could be done to make it easier to get started from scratch - but the problem that most people don't realise is that if first you learn Windows Installer/MSI, then WiX is damn simple.


Go pick up a copy of The Definitive Guide to Windows Installer. I've lost count of how many times I've recommended it to people who are getting stuck on the concepts and are struggling to understand how Windows Installer works. Make sure you grab the Windows Installer SDK as well.

Getting to grasp with Windows Installer is the first stage of your learning, once that's sunk in you'll understand how InstallShield works (or doesn't work as the case may be..). Wise, InstallShield, etc try to shield you from the underlying concepts and have their own trickery/hacks to get around the limitations of Windows Installer.

Stage two (if you're serious about understanding Windows Installer) is learning WiX (The WiX Tutorial isn't too bad, although it's a bit out of date and targeted at WiX 2.0 rather than 3.0) and joining the wix-users mailing list. Don't join the users list until you've finished the book mentioned above, you'll be well in over your head. Questions from those who don't understand the Windows Installer concepts largely go ignored, however questions from people who have done their homework will find it a great resource.

What's not covered in the book is Vista, Robert Flamings blog entries on Understanding UAC and Vista (written when Vista was in it's beta stage) are the best information you'll find on the topic.

One thing that both the Windows Installer and WiX teams is really good at is keeping the documentation (Help files) up to date. Whenever I'm working on setups I'll generally have Wix.chm and Msi45.chm open on one monitor ;)

Along with the documentation, blogs from people on the WiX and Windows Installer teams are great for learning new tricks, etc. Far too many to list here, but once you know the terminology you'll find most of them popping up in google results.

If this all seems too much, then check out NSIS. Great for simple "I just need to copy files" type installations, not so great for enterprise deployments. If you're torn between the two then maybe go take a look at Rob Mensching's old blog when setup isn't just xcopy. Articles there are probably what convinced me that diving in and learning the underlying Windows Installer concepts would pay off in the long run. And it has :)

Update - since my original post, WiX: A Developers Guide to Windows Installer XML has been released and is also a good resource for beginners. (I didn't find it that great myself though.) I still suggest reading The Definitive Guide to Windows Installer as a starting point. Windows Installer and WiX isn't something you just pick up in a few days, it'll take a few months.

نصائح أخرى

Download WiX and look at the tutorials in the manual (which is also installed as a .chm). When you install WiX, it will install the necessary files and templates so that it integrates nicely with Visual Studio.

Note: Every tool in WiX begins with a letter that helps signify its use. Votive is just the piece that integrates with Visual Studio.

Examples:

  • Votive = Visual Studio
  • Burn = Bootstrapper / Bundle
  • Candle = Compiler
  • Light = Linker

I used the book WiX: A Developer's Guide to Windows Installer XML to get up to speed with WiX.

You can get Visual Studio integration from the WiX home at CodePlex.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top