Git Product home page Git Product logo

paraffin's Introduction

Paraffin - Making WiX Easier

Windows Installer XML is a fanstastic tool for building installers. One small weakness with WiX is keeping your file fragments up to date. While the Heat tool creates the fragments easily, you have to manually edit the .WXS when adding and removing files. Paraffin has been around for a while, but my original requirements sum up the project nicely.

My goal for PARAFFIN was that it would build immediately consumable WiX fragments with a minimum of fuss on your part. I wanted PARAFFIN to meet the following requirements for initially creating a .WXS fragment for a directory:

  • PARRAFIN.EXE created unique values to the Component, Directory, and File elements Id attribute so you do not have to worry about conflicts across large projects
  • PARAFIN.EXE creates a ComponentGroup element in the output file with all Component elements in the file automatically specified with ComponentRef values
  • You can optionally exclude specific file extensions from being added to the .WXS fragment
  • You can optionally exclude directories from inclusion by specifying a partial name
  • You can optionally specify if you want GUID values automatically generated for all components
  • You can optionally specify multiple files per Component (the default is one file per component)
  • You can optionally specify that you do not want to recurse directories other than the one specified
  • You can optionally specify an alias for the directory name when setting the File element Source attribute so you do not have hard coded drive and directory names in the output .WXS file

After you've created a .WXS fragment with PARAFFIN, you don't want to have to edit the fragment manually, so I wanted PARAFFIN to meet the following requirements for creating an updated output file from an existing .WXS fragment:

  • The updated output is written to a .PARAFFIN file so the original .WXS fragment is not disturbed
  • All command line options specified when creating the initial .WXS fragment are automatically set when updating a file created by PARAFFIN
  • Any new directories and files found are automatically added to the output file
  • Any directories and files that are no longer part of the directory structure are removed from the output file

Since the original release of Paraffin a few other requirements have been added:

  • You can specify the directory reference when initially creating the WXS file
  • Directories and files can be excluded by name or regular expression
  • Support for adding fragment information through .ParaffinMold files so you can more easily support installation options such as services
  • Adding include files to the top of the produced .WXS file
  • Specifying the DiskID is supported so you can handle giant installers easier
  • Full upport for minor upgrades with transitive properties set so you can remove files on the minor upgrade and produce the zero byte files so your installer builds
  • Support for reporting if subsequent runs of Paraffin are reporting different output (i.e., adding or removing files)

Getting Started with Paraffin

Obviously, a prior working knowledge of WiX is required so head over to the WiX Tutorial for more information. After downloading the project, look at the Zen of Paraffin document in the root directory.

Where Can I Get a Pre-Built Version of Paraffin?

Head right on over to the Releases page and grab the latest. It is hard to believe that I started this project before GitHub supported Releases!

Want to Contribute?

Have at it! Fork away and have fun, but do send me the patches so I can put your cool features into the master branch. All you need is any version of Visual Studio 2017.

Have a Question?

Feel free to email me (john AT wintellect.com) or on the project discussions.

Special Thanks!

I greatly appreciate everyone using Paraffin and especially those of you who have contributed code or bug reports. Who knew a little project I did to learn LINQ to XML could be so useful to so many?

paraffin's People

Contributors

cameroncros avatar johnwintellect avatar zimfromirk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paraffin's Issues

NAnt task

A custom NAnt task would help especially that NAnt is pretty good with filesets. There are already NAnt tasks for candle and light.

-update defaults to Wix4

Hi and thanks for an awesome tool.
I just started playing with it and found an issue with the Wix4 flag with update.

var wix4Usage = options.Descendants(WIX4);
if (wix4Usage.Count()==1)
    {
        argValues.WiX4 = true;
    }

This will be true since the option is set as <WiX4>false</WiX4> in the wxs file CommandLineOptions

Latest version download

I find this page a great improvements over the blog, but could you please include the latest binary version for download?

Ideally a change log would be welcome.

Upload to NuGet.org

Would help to be able to include Paraffin in the project via NuGet package from NuGet.org - so one doesn't need to install the utility on build nodes.

Would be a simple "tools" package, like https://www.nuget.org/packages/NuGet.CommandLine - a nuspec something like...

<?xml version="1.0" encoding="utf-8"?>
<package  xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata minClientVersion="3.3">
    <id>Wintellect.Paraffin</id>
    <title>Paraffin</title>
    <description>Making WiX Easier.</description>
    <version>3.7.1</version>
    <authors>Wintillect</authors>
    <copyright>Copyright © Wintillect</copyright>
    <releaseNotes></releaseNotes>
    <tags></tags>
    <license  type="expression">CPL-1.0</license>
  </metadata>
  <files>
    <file src="Release\*" target="tools"  />
  </files>
</package>

and running 'nuget pack' on the nuspec.

What this does is unpack and make the files available on the PATH during the build process.

How to deal with libraries comming from nugets in different projects

I have the following problem.
I need to install, in the same target directory, a bunch of project outputs coming from Nugets installed in several VS projects.

I used Paraffin to generate a .wxs file for each project output.
Then I added a reference to each component group in the main .wxs file.

At compile time, I have the following error, in this case with the Newtonsoft.Json library:

Error 176 ICE30: The target file 'xowlw3w9.xml|Newtonsoft.Json.xml' is installed in '[TARGETDIR]\bla' by two different components on an LFN system: 'comp_4EBFB24CB01B40B3B5E1D2117246A5EC' and 'comp_F28FDFC3F35B442681E0E33172052746'. This breaks component reference counting.

It seems that a new GUID is used each time the initial file is created with Paraffin.
Would it be a good idea to always use the GUID embedded in the library that is used to match a corresponding symbol file ?

Empty Directories not being created via paraffin

I am using paraffin to harvest a directory tree. This is working very nicely, except that the empty directory is shown in the output fragment as:-

and so doesn't get created when the msi is run.
Can paraffin be updated to have an equivalent to the heat tool's -ke (Keep empty directories.) parameter?

Is there another way of getting the to be included.

I have tried using a .ParaffinMold file in the empty directory to add in a fragment like heat generates.
The fragment is included in the output when there are files in the directory, but not when there are no files.

Option to process *only* files given with -includeFile

-ext doesn't support the extension '*' and listing all possible extensions is tedious and error-prone.
-regExExclude excludes even files given explicitly with -includeFile.

At least the latter should be changed so that files given explicitly on the command line (with -if) are always included, no matter what.

Allow saving .paraffin files to different location

Our build system has a folder where we store 'generated' files. This folder is marked as not to be checked in to source control as the contents are created when the solution is built.

It would be nice for Parrafin to be able to optionally save .paraffin files to a different location

Plans to make a NuGet package?

Hi John,

Are there any plans to make a NuGet package wrapper so that Paraffin can be included in a project as a build tool?

Thanks!

Use of "alias" parameter causes "dirExclude" and "RegExExclude" to be ignored

Hello,

in my Wix/Paraffin Experiments I use the "alias" parameter because I work on different computers with different drive configuration. I encountered the problem that since I introduced the alias parameter all my settings with "dirExclude" are ignored. A workaround with "regexexclude" also failed.
The parameters are not even mentioned in the leading comments of every wxs file, so it seems it is a bug when interpreting the parameters.

regards,
HH

-update incorrect if directory tree includes subfolders with the same name

Paraffin version 3.13.1

Doing an update for a wxs file generated for a directory with subdirectories similar to the following:
Help
+--help
| +--images
+--images

Id for the element for the second "images" folder gets set to the Id of the fist (resulting in a LGHT0091 Duplicate symbol error in WiX).

Output folder for .PARAFFIN file

Hi,
We're just getting into using paraffin, looks good! It would be great if it was possible to specify the output path for the resulting file during -update though, or am I missing something?

Add note about KeyPath setting in readme

If someone updates an old .WXS file that was created with a pre 3.5 version of Paraffin, the KeyPath attribute is moved because it's better that it be on the File instead of Component element. If the installer schedules the RemoveExistingProducts after InstallFinalize this will break the installer. While very few installers does this scheduling, those that do and have had the KeyPaths moved will no install correctly.

[Enhancement] Allow Grouping of Folder Contents into Individual ComponentGroups

It would be very useful if each 1st level folder off of the root folder could be grouped into its own ComponentGroup. This would allow consumers of the generated Wix to pick and choose individual folders that are autogenerated (and maintained via update) to include in various products without having to run paraffin for each explicit directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.