.
Edit May 16, 2009: Updated the Paraffin download link to point to the updated 3.0 version..
Hi mate,
got this annoying error
"Could not load file or assembly 'System.Xml.Linq, Version=3.5.0.0 ... "
i have installed Framework 3.5 and still nothing...
can you please help?
Do you have a version that would support WIX 3.0?
the LongName attribute is not working when my master wxs uses wix 3.0
Thanks
Hello John - I downloaded your code bits and modified a bit to remove LongName attibute (it was giving compile errors if both name and longname attributes exist) and used latest xml namepace which is <Wix xmlns="">
Thanks,
-Ajay.
Hello guys,
When I executed Paraffin.exe -update ExampleFragment.wxs effectively updates the changes in the directory when add or remove files, but I have one question for this. Why the files that are .dll changes the GUI value?
Wow, when I first read this thread I was thinking strictly about process workflow and component rules. After spending the last 4 days in training updating my skills to .NET 3.5 including Linq for XML, I'm really excited to finally look into this code.
Here's what I'm thinking I want to do:
Create a VS ADDIN for launching parrafin on the currently selected WXS file in Votive.
Have Parrafin scan a directory and the fragment and report any discrepancys.
Have the user confirm the adds and deletes he wants done.
Parrafin does the work and saves the file.
Votive reloads the file and the developer can diff against source control before checking in.
Thoughts?
One more thought. How much work would it be to preserve additional element and attributes.
That is to say, someone uses parrafin to generate a fragment and then manualy decorates the xml with additional metadata such as a shortcut or serviceinstall element. Then have a subsequent run of parrafin preserve that information provided that the element/file isn't being added or removed.
Hello John -
I ve downloaded paraffin and used it to harvest files used in my setup
and i found the following things after when i tried to build my setup
1. both name and longname attributes exist in DIRECTORIES as well as in FILES.
which makes it impossible to build ....also includes lots of pain to remove it MANUALLY :)
is there a way out ??
Akash
Akash,
You've missed the point of Paraffin. It's designed to take a tree of directories and files you want to install in that same order and build a WiX fragment out of them.
If you just want the files, you'll have to do that manually. Even HEAT, which comes with WiX 3.0 does not support what you want to do.
- John Robbins
Hi John,
i did exactly the same as you mentioned above.
i have used paraffin to create wxs file of the whole directory tree which includes all the files that i need to include in my installer.
the thing is, in generated Fragment file (WXS), there exists both "name" amd "longname" in FILE as well as DIRECTORY element.
moreover, there are hudreds of files in my setup. So it makes almost impossible for me to remove it manually.
Do i need to remove longname manually or do you have other way out of this?
Please let me know if u am missin something
I have a 5000+ component installer for a web application with many nested folders of arbitrary depth. I am able to use Paraffin to successfully traverse the hierarchy and create the <Fragment> .wxs file. I had been using a XSL stylesheet to correctly create all of the required <ComponentRef>'s and the <Directory>'s in the main .wxs file. This is quite tedious as everything does not transform and compile without human intervention.
Since <FragmentRef> has long since been deprecated I am not able to simply reference the fragment file from within my main .wxs file. and can't figure out how to link the two together. I'm wondering if there is a much easier way to merge the two by simply using some kind of <xxxxRef> element in the main file to reference the contents of the fragment file where I need to. Is this something that you have experience with? In the main .wxs file, I would need to be able to materialize the contents of <ComponentGroup> and all of the <Components> and <Directory> elements from the fragment.
I have tried to use a Votive project which contains the two .wxs files thinking that they would be correctly compiled and linked together by candle and light, but I cannot get it working without having to manually (or by using XSLT) copy/paste.
Any thoughts?
-bill
Are you using the latest version of Paraffin, 3.0?. It sounds like you are not. Give that a try as it's got full WiX 3.0 support.
Bill,
At the top of the generated file Paraffin has a ComponentGroup. You just need to reference that in your main .WXS file and you automatically pull in all the individual ComponentRefs.
Hope it helps!
Yes, that does help. I was able to figure it out prior to your reply, but I do thank you for getting back with me so soon.
Take care,
-bill
Anyone know if any Nant tasks exist for Paraffin? Any interest in having them created if they don't yet exist?
Hi Bill,
I don't know of a Nant task for Paraffin. Please feel free to whip one up. :)
A small caveat to keep in mind: Component Rules are extremely fragile in Windows Installer. If you plan on doing major upgrades for everything in your project, you shouldn't run into problems automating Paraffin as part of your build. However, if you are going to use patches or not rely on major upgrades, automating Paraffin will create a serious bag of hurt in the long run.
-John Robbins
Understood. I think I could fully automate my process if Paraffin had additional logic to exclude specific file names from its traversal similar to the way the extension logic (i.e. -ext) works. More importantly, though, I need the ability to pass args that would direct Paraffin to add Permanent="yes" NeverOverwrite="yes" attributes to specific <Component>'s. All of the products my client has require certain .config files to remain untouched between upgrades and I currently need to tweak the fragment file after it is generated to include these. There are also several Windows Services that need to be configured by hand, but I suppose this could be remedied by some XSL, but having Paraffin do the heavy lifting would be nice.
I started to add the Permanent/NeverOverwrite attribute support, but got sidetracked on other things. I don't know if I will be able to get it done myself. Same goes for the Nant tasks.
Anyway, thanks for the info.
I am new to Wix and Paraffin. I have successfully generated a .wxs file using paraffin. Now I am having problem merging it into votive's product.wxs. You replied Bill Craun to reference ComponentGroup in the main .wxs. Could you please elaborate it a bit more on how can i do this.
Gulfam
I am new to Wix and Paraffin. Could you please guide me on how to reference ComponentGroup in your main .wxs, I am having a compilation error
"error LGHT0094: Unresolved reference to symbol 'WixComponentGroup:group_myProd' in section 'Product:{07AB9189-0478-45E3-ACD8-2D042B649C03}'."
Thanks.
Gulfam,
In the .WXS fragment generated by PARAFFIN, you have the following:
<Fragment>
<ComponentGroup Id="group_SOMESTUFF">
To reference it in your product .WXS do the following:
<Feature Id='MyFeature'
Title='Put title here'
Description='Put descripton here'
Display='expand'
Level='1'>
<ComponentGroupRef Id='group_SOMESTUFF'/>
Make sure both .WXS files are on the LIGHT.EXE command line.
Thanks alot for your response. I am one step ahead now :)
I am using Visual Studio 2005 (votive) to create WIX Setup. The default product.wxs file generated with the project has namespace "" and the file generated with Paraffin has a different namespace "" (the difference is only 2003 and 2006 here). So when I compile "error CNDL0199: wix element has a different namespace" error apears.
Once I edit the paraffin generated .wxs manually to fix this issue, there are some more error regarding Name and LongName attribute for all the directories, components and files...e.g.
"error CNDL0035: The Directory/@Name attribute cannot be specified when attribute LongName is present."
"error CNDL0035: The File/@Name attribute cannot be specified when attribute LongName is present."
Fixing this issue require manual editing of .wxs file, could you please help me in this.
Thank you
-Gulfam
Gulfram,
You are using the old version of Paraffin. Get the newer version here:
John Robbins
yep, my bad... things are working fine now... Thanks.
by the way, it would be great if paraffin.exe provide:
- exclude specific files (-ext will exclude all files of that extension)
- include specific files
Thank you again John.
Best Regards,
I use parafin regularly, and there is just one thing that annoys me.
It always includes the root folder in the out.
My build output looks like:
App\bin\Release\app.exe
When I specify "-dir Release", I get a top level directory called "Release" in the installation. This forces me to copy the "Release" folder to a temp location with a proper name.
Another related issue is that -dir does not correctly decode a path with a space, eg:
-dir "My Folder\Test"
Thanks for making the app, you should consider getting the application hosted at sourceforge or google code, that would make it easier to track feature requests and bug reports.
I used paraffin to create fragment project file and get compilation error as the Fragment <File> doesn't have Name and LongName defined.
Like this
<Component Id="comp_Phoenix_12" DiskId="1" KeyPath="yes" Guid="E4110B2A-A2AB-4120-9031-01841FF59E38">
<File Id="file_Phoenix_12" Source="..\Binary\New Microsoft Office Word Document.docx" />
</Component>
I have used below command line -
Paraffin.exe -dir .\ -custom EXAMPLE -g -alias ..\Example –ext .WXS ExampleFragment.wxs
For your information I have used Paraffin 3.0.0.
Have I missed something?
Santosh,
You're using Paraffin 3.0 with WiX 2.0. You need to be using the Paraffin you'll find at this link:.
I too am missing the File attribute, like Santosh is.
I am using WiX 3.0.5217.0 and Paraffin 3.0, but I'm using it with .NET 2.0. Does that matter?
Oops...
I mean the Name and LongName attribute in the <File> fragment...
Magne,
If you are missing the Name and LongName attributes in the File element, you are using WiX 2.0. My psychic abilities tell me that because WiX 3.0 does not use Name and LongName attributes any more. :)
- John Robbins.
Thanks for the quick answer :-)
Ok, I think I see what's going on here. I'm just talking about the file that Paraffin generated. That file doesn't have the Name attribute. But I haven't tried to use it in my WiX project yet because I thought there was something wrong with it since the Name attribute was missing. I didn't know that WiX 3.0 doesn't need the Name attribute any more. Thanks for clarifying that :-)
However, WiX 3.0 still supports the Name attribute if you want a different filename than that from the Source attribute. Take a look at the online help for WiX 3.0:
Sorry for wasting your time :-)
You're not wasting my time at all! I'm thrilled you're using Paraffin.
Yes, I figured most people wanted the same name of the file as the Source attribute. :) I guess if you wanted to change the name you could do some XSLT magic on the Paraffin produced file.