Wintellect Blogs

Paraffin 3.7 – Support for WiX 4.0

John Robbins

14 Mar , 2017  

After a couple of requests, I added WiX 4.0 support to my Paraffin project, the file harvester, which makes maintaining installer projects a lot easier. As part of this update, I moved the code to Visual Studio 2017 and moved to .NET Framework 4.6.2. I nearly went down the path of making a .NET Core version of the console application, but will save that for another day.

Instead of rehashing the scope and purpose of Paraffin here, head over to your favorite search engine and search “Wintellect Paraffin” and you will find all the links that show how to use it. Also, if you don’t want to mess with compiling the application, head on over to the Releases tab page on the Git Hub project page and you can download the compiled binary along with it’s PDB file.

Thanks so much for using Paraffin! Who knew that a quick sample I wrote to learn about LINQ to XML would grow into a useful utility.… Read more

Wintellect Blogs

Paraffin Bug Fix and Future Ideas

John Robbins

15 Nov , 2012  

Things have slowed down enough I was able to get around to fixing a small bug in Paraffin where I was accidentally including .ParaffinMold files in the .WXS output. Also, as I finally caught up with the cool kids and finally started using ReSharper. Since I love fixing bugs at compile time instead of runtime, I looked through the errors ReSharper reported and fixed all the ones that wouldn’t destabilize the code too much. You can always grab the latest Paraffin on GitHub: https://github.com/Wintellect/Paraffin.

(Moving to ReSharper has been interesting because I’m so used to using Visual Studio without it. There’s a lot of cheese moving going on but I’m slowly getting used to the ReSharper power. Yesterday in my Mastering .NET Performance Tuning virtual session someone commented that watching me struggle with the new keystrokes was like watching an old dog learn new tricks. That made me laugh out loud.)

For a while I’ve had two code changes people have submitted for Paraffin. In the end, I decided not to include them for now but thought it was important to get some more feedback from Paraffin users. The first change was from Jean-Francois Montpetit and was about making the .ParaffinMold files more useful.… Read more

,

Wintellect Blogs

Paraffin 3.6–Now Keeping Custom Added Namespaces

John Robbins

19 Jan , 2012  

Paraffin 3.6 can be downloaded here: http://www.wintellect.com/CS/files/folders/18310/download.aspx

Dan Gough had an excellent feature request to have Paraffin copy over any manually added namespaces to the .WXS file like the following. Previously, Paraffin ignored them, but no more.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Wix xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
  3.      xmlns="http://schemas.microsoft.com/wix/2006/wi">

I updated Paraffin to copy over any namespaces added to the Wix element when creating the .PARAFFIN file. If you were having Paraffin inject additional elements with a .ParaffinMold file, now it’s easier than ever to keep your WiX fragments up to date.

When adding custom namespaces, put them before the default xmlns="http://schemas.microsoft.com/wix/2006/wi" as I’ve shown in the snippet above. With LINQ to XML, the xmlns attribute is special and does not show up in the Attributes collection so there’s no way I can sort it with the rest of the values. When generating the output XML file, XDocument always puts the xmlns attribute last. I tried all sorts of tricks to get it placed first but never got them to work.

There’s no trouble if you place your custom namespaces after the default xmlns, but in the .PARAFFIN file they will always appear first so you’ll see more changes when you diff the .WXS and .PARAFFIN file.… Read more

,

Wintellect Blogs

Zen of Paraffin

John Robbins

31 Aug , 2010  

With Paraffin 3.5, I included this document, but thought it would be worth posting as well for those of you that aren’t familiar with Paraffin. You can download the lastest release here: http://www.wintellect.com/CS/files/folders/18310/download.aspx

Introduction

When building WiX-based installers, you quickly run into the problem of maintaining the list of files you want to install. The HEAT tool that comes with WiX does a great job creating the initial fragments, but doesn’t have any support for what happens during normal development: you’re adding and removing files all the time. For many installs, HEAT works fine, but if you have an installer that’s installing hundreds to hundreds of thousands of files, the thought of maintaining those fragments of XML by hand would fill anyone with dread.

A few years ago, I was running into that same trouble with my WiX installers right around the time .NET 3.0 and LINQ were starting their beta testing. Seeing a need to scratch my itch, I dove in and created Paraffin. The idea was simple, you could maintain your fragments without breaking component rules as files were added and removed from your installer. Paraffin has grown as more people have started using it and suggest features. Thanks to everyone who’s used Paraffin!… Read more

,

Wintellect Blogs

Paraffin 3.5 – Now with Better Minor Upgrade Support

John Robbins

31 Aug , 2010  

Slowly but surely I’m getting through the list of feature requests everyone’s been asking for. This release of Paraffin brings support for the trick outline by Vagmi Mudumbai (http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx) of allowing minor upgrades (AKA patches) to remove files by setting the transitive bit on the component and adding a conditional element that evaluates to false.

<Component Id="comp_F5B392C05B5249C2AB34810BE4A6163F"
           Guid="FD9D7BF4-550A-47E2-85A3-634D77F609FB"
           Transitive="yes">
  <File Id="file_81DD236ED61B4BBEB445FAB9E9C2DAB2"
        Checksum="yes"
        KeyPath="yes"
        Source=".\Temp\a.exe" />
  <Condition>1 = 0</Condition>
</Component>

So if you need to delete A.EXE on a minor upgrade, delete A.EXE from disk and run Paraffin with the new –PatchUpdate switch. The output .PARAFFIN file will have the following in it for A.EXE

Those of you who’ve looked at Vagmi’s trick are wondering about the other piece that needs to be there; the file. But you deleted the file. If you build with WiX, you’ll get an error because the File element must point to a file to put in the output .MSP. To keep the patch file small, you should have a zero byte file called A.EXE to make everything work.… Read more

,

Wintellect Blogs

Paraffin 3.13 and an Ask for Help

John Robbins

8 Jul , 2010  

Before I get into the quick new features for Paraffin 3.13 (download here), I need to ask for your help. Pretty much from the first day I released Paraffin, I’ve been consistently getting the following question:

I want to be able to uninstall obsolete components during minor upgrades.

For this I would like to have an additional option, which does not remove missing/deleted files from the .Paraffin file. Instead it should generate the code according to http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx.

Paraffin should set component to transitive and use a false condition. If a file does not exist it should use a 0-byte dummy file.

I think that’s a great feature, but being mostly a Windows Installer neophyte, I have no idea what that’s supposed to look like in actual WiX format. If one of you WiX ninjas can give me a functioning sample of an installer with a functioning patch using the above trick in WiX, I’ll get that feature worked into Paraffin.

While I think major upgrades are the way to go because they are easier to manage, I know there are some of you using Paraffin where patching is a requirement. Shoot that sample to john @ this company’s domain.… Read more

,

Wintellect Blogs

Paraffin 3.12: A Bug Fix and Three New Features

John Robbins

11 May , 2010  

After a bit of rest and relaxation, Paraffin, my tool to make managing your Windows Installer XML (WiX) fragments easier makes a surprise appearance back on my blog. If you’re not familiar with Paraffin search this blog for numerous entries. Grab the latest version here. The relevant changes are as follows.

  • I moved everything over to Visual Studio 2010 and .NET 4.0. I put the Visual Studio 2008 compatible project files for Paraffin and the Paraffin Installer into a VS2008Projects directory. Right now none of the code takes advantage of any .NET 4.0 features but as I add features in the future, I probably will use .NET 4.0 things if it makes sense.
  • There was a bug in how I handled .ParaffinMold files if the –multiple switch was used to put multiple files into a single component. That’s been fixed.
  • The new –DiskId switch lets you specify the value of the Component DiskId element so you can split your installers into several packages.
  • The new –IncludeFile switch lets you include processing directives into the output .WXS file. This way if you have a set of common WiX preprocessor defines you can include that file. The include files you specified are not checked or validated in any way.
Read more

,

Wintellect Blogs

Paraffin 3.11: Fixed Directory Reference Option

John Robbins

12 Aug , 2009  

Sam reported a bug in Paraffin where I wasn’t handling the –dirref option correctly. How embarrassing! It was a quick fix so grab the updated code and binary here. As always, please let me know if you have feature suggestions or bug reports for Paraffin.… Read more

Wintellect Blogs

Paraffin3.1: New and Improved!

John Robbins

28 Jun , 2009  

Aren’t “New and Improved” the most over used, and contradictory, terms in the marketer’s dictionary? How can something and be new, but yet improved because if it is improved that cancels out the new. My point is that I want to tout an updated release of Paraffin, but I guess I’m being too much of an engineer instead of a marketer which is not a good idea when you something new and improved. Argh! I don’t think I’m helping myself here much. How about I express it this way; Paraffin has some improved things and some new things both of which I think users will greatly appreciate.

For those of you wondering what Paraffin does it’s a tool I wrote to help produce Windows Installer XML (WiX) fragments of files in your installations. The big feature of Paraffin is that is automates the management of your files because it keeps consistent the component ids and GUIDs as well as file and directory ids as you add files to your installer. Component GUID management is one of the biggest pain points on any WiX projects, especially those that have many files to install.

For background, I’ll refer you to the WiX 3.0 documentation, as well as the articles I wrote on the motivation behind Paraffin, Part 1, Part 2, and Part 3.… Read more

,

Wintellect Blogs

Paraffin 3.0 – Now with Full WiX 3.0 Support

John Robbins

22 Dec , 2008  

Congratulations to the WiX team on hitting the Beta milestone for WiX 3.0! Now that code and schema changes are on the ramp down on the project, I thought it was the time to update my Paraffin tool to offer full support for WiX 3.0. If you didn’t see the original set of blog posts I wrote about Paraffin (Part 1, Part 2, and Part 3.) the quick answer is that manually creating and hand maintaining your WiX fragments is enough to make any developer cry. I wrote Paraffin with the idea that it would do the hard work of creating and maintaining those fragments easier. With any tool of this sort, I have to caution you that you can completely break Windows Installer’s component rules if you are not paying attention. This is especially true if you remove files from your install.

The 3.0 release of Paraffin creates WiX 3.0 compatible fragments only. I bumped the version number up to match the version of WiX it supports. (If you are still using WiX 2.0, keep using the 1.04 version.) However, if you have WiX 2.0 files you created with Paraffin 1.04, Paraffin 3.0 will properly update those files to WiX 3.0.… Read more