In my wix installer I need to install some kind of addon dlls to a directory. There could be many addons, all are installed to the same directory. Each addon is a feature which could be chosen or not. Each addon is installed together with referenced dlls. The referenced dlls can be the same (both: name and contents) for two or more components. So it could be something like this:
Addon1:
Addon1.dll
Reference1.dll
Reference2.dll
Addon2:
Addon2.dll
Reference2.dll
Reference3.dll
If both features are selected, the installation result is:
Addon1.dll
Addon2.dll
Reference1.dll
Reference2.dll
Reference3.dll
I would like to make a separate fragment for each addon so that I can manage features properly. I can harvest files for each addon but the problem here are the same file names. A wix project containing such fragments doesn't compile.
I would like to avoid placing shared reference dlls to another common fragment because there could be many addons with very different dependencies between references.
Is there any way to dial with it differently?
This is something I would do manually without automatic harvesting. Unless you have hundreds of AddOns this really isn't going to be much extra work and if you harvest them using heat and then embed the resulting wxs files into your project with some modification, it won't be too difficult at all. I suppose this will add more overhead if the AddOns change frequently but I would imagine that this won't happen all that often.
Related
Is it possible to make a WiX installation bundle with size of total .msi's and exe's inside bundle more than 2GB? Currently in my .wxs template I have a <chain> inside of a <bundle> that contains multiple <MsiPackage>'es. I haven't created that WiX template on my own, I'm just improving/fixing bugs in a legacy project, so I am not very proficient with the WiX toolset. Anyway, then I create a .wixobj out of that .wxs template with candle.exe and this .wixobj I feed to light.exe. It seems that if total size of content to link is more than 2GB light.exe fails with error:
error LGHT0306 : An error (E_FAIL) was returned while finalizing a CAB
file. This most commonly happens when creating a CAB file with more
than 65535 files in it. Either reduce the number of files in your
installation package or split your installation package's files into
more than one CAB file using the Media element.
I looked for solution and one suggestion was to use <MediaElement> but that one is only available in a <product> tag which I guess I cannot use in my situation, because the bundle that I am cooking has a custom bootstrapper embedded, and as far as I understood wix product template is not about bootstrapper applications. Another opinion that I found was that you can't create WiX bundle with size of single package more than 2GBs, but that is not exactly my case, because each package I am bundling is no more than 700MBs.
I have already tried separating <MsiPackage>s into <PackageGroup>'s in separate <Fragment>'s which was referenced in <Bundle>'s <chain> in <PackageGroupRef>, but it didn't help, light.exe throws the same error. I have also found a suggestion to try to put packages into separate <Container>s in <bundle>, but I didn't manage to try it because I didn't understand how to do it, WiX bundle documentation just mentions that the are some containers but never actually gave an advice on how to use them.
I am using WiX 3.11
UPD: I just wanted to add some clarifications.
My goal is to make a bundle what would be a single .exe file with all related .cab's and other stuff embedded into the final bundle, so delivering bundle that consist of .exe bootstrapper and multiple external .cab file isn't really a preferred option even though it might be x times faster unless this is the only solution in my case.
UPD 2:
It seems that yet you can assemble a bundle with 2 GBs + size, it won't start. Maybe because the output executable is x86, and windows can't launch x86 executables over 2gbs size. I didn't manage to make an x64 bundle, maybe that would work, but I never found how to do it. Guess the only option is to let users download missing content and make bundle only contain essential parts. Thanks everyone for help.
Compressed bundles cannot be bigger than 2GB. Burn supports containers up to 2GB each and only one container can be attached to the bundle .exe itself.
Bob's answer is still correct for v3.
Support for multiple attached containers was recently added in v4 (#6144). That allows a single file bundle to be larger than 2GB. v4 also added support for x64 (and ARM64) bundles, which allows the bundle to be larger than the x86 maximum.
A related open feature request is #6521 where WiX would automatically split payloads across containers so that the user doesn't have to manually create new containers to avoid the cabinet limitations for size or number of files.
I would like to create a script that will update files in the (default) install location with files from the source location where needed, based on the .wxs files that I have. I need to get this info from the wxs files, because the installation dir structure differs from the source location dir structure.
This would speed up my development cycle by not requiring a complete MSI uninstall/install when I have only recompiled one DLL for instance.
Is there functionality available in the Wix toolset that can give me a list of corresponding source and destination paths or would I have to implement everything including parsing of the Wix XML files myself?
I did not see anything relevant in the List of Tools section of the Wix documentation.
Alternative Approach: I would suggest using the commercial file and directory syncing and comparison tool Beyond Compare to copy files to the destination directory with ease if this is just for QA. I guess you can use post build steps too, but Beyond Compare is very nice and reliable. It has the features you need for just about anything related to comparison of files and folders (not affiliated). You can let the application just sit there and you can do a full comparison on the fly whenever needed. Essential software for deployment people. Alternatives exist of course (list).
I am new to WiX, but need a complicated scenario!
I manage a modular web application containing multiple WCF Library (i.e. module), and need to put every module as a feature in the final setup.
So I managed a WiX Setup Library for every module which genrates .wixlib files, and a single WiX Setup who references the .wixlib projects, and also will be a one-to-one relation between modules (i.e. .wixlib) and features in the final setup.
The problem arises when there is same files shared among .wixlibs, due to similar File/#Id and Componend/#Id which will be there for those shared files.
P.S: I have used WaX as engine to build .wxs files, which simply uses file name as File/#Id and Component/#Id in the .wxs files.
I beleive there could be two possible workarounds (I could achevei non of them!)
Some way to force WaX generate randome File/#Id and Component/#Id for every file.
The could be a way in Lit.exe (who builds .wixlib) to append a random id to File/#Id and Component/#Id while compiling and generating final .wixlib files.
Any sort of help will be appreciated.
I am receiving an ICE30 when I am trying to compile my WiX installer project. The complete error is below:
ICE30: The target file 'DPFPSH~1.DLL|DPFPShrNET.dll' is installed in
'[TARGETDIR]\Windows\DPDrv\' by two different components on an SFN system:
'DPFPShrNET.DA2BFC77_FAFE_41D1_8BB6_134232B2EADC' and
'DPFPShrXTypeLibNET.51D3E534_F1F9_4BC6_BFC5_B27F733081C7'. This breaks component reference
counting.
Now the peculiar thing is that these two components belong to two different merge modules, DPOTDotNet.msm and DPOTShrDotNet.msm. When viewed in Orca, the two components in question, DPFPShrNet (which is part of DPOTShrDotNet.msm) has a dll of the same name associated with it (DPFPShrNet.dll as seen in the file table), while DPFPShrXTypeLibNet also has a one dll of the same name associated with it (DPFPShrXTypeNet.dll). I do not see two DPFPShrNet.dll's being installed as the error says.
We are migrating away from InstallShield and into WiX, and the InstallShield ism file references these two merge modules and they both install correctly using that method. Is there some reason why WiX thinks two files of the same name are being installed? As soon as I remove DpOTShrDotNet.msm from my project, it compiles correctly, but I am missing the DPFPShrNet.dll in the GAC after I install.
ICE's are validation (unit tests) not compilation. Some of the ICEs are known to have bugs / design shortfalls. You should be able to ignore this one. Third party merge modules can be problematic though so you might want to look for an exe/msi redist installer for these components instead. Another possibility is to wrap these MSM's into their own MSI's and use WiX burn chainer to link it all together. This provides some separation / firewall / mitigation to the risks.
I am in the process of learning WIX all thanks to MS for removing such a nice tool (vdproj) from the latest versions of visual studio.
I have come to know that I can add my files (and dlls) to distribute in WIX using that tag. It is OK. But in vdproj it was very easy to add all files. I just need to right click in file view, and select 'add project output'. This was enough to add dozen of files that were required for my application. In visual studio 2012, and using WIX 3.7, what options do I have to automatically list all those dlls that are required by my application?
There is no automatic method that could be written that wouldn't require you to remove some items and redirect some items to other folders. In the simple case, you wouldn't need an automatic method anyway.
In your WiX Setup project, add a reference to each project you want to include the output from. In the properties for a reference, set Harvest to True and Project Output Groups as desired.
Because project harvesting doesn't work in some corner cases, it is disabled by default. You must enable it in your project file. (See the references.)
Build and you will have ComponentGroups generated for your harvested projects. The script file is in the obj folder (since it's not a file you want to keep in source control).
For example, for the project ConsoleApplication1, add a ConsoleApplication1.Binaries ComponentGroupRef to a Feature. By default, all such components are placed into INSTALLFOLDER. If you want them elsewhere, you can change the ItemGroup metatdata or one of the properties that affect the HavestProjects target.
Unless you have many project references that change often, there is no need to automate this.
References: WiX.chm
HarvestProjects Target
Using Project References and Variables