Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Total MSI File size exceeding 2GB

$
0
0
You can add as many Media elements as you need with XML post-processing:
project.WixSourceGenerated += Compiler_WixSourceGenerated;
...
staticvoid Compiler_WixSourceGenerated(XDocument document)
{
    document.Root
            .Select("Product")
            .AddElement("Media", "Id=1; Cabinet=MyProduct1.cab; EmbedCab=no")
            .AddElement("Media", "Id=2; Cabinet=MyProduct2.cab; EmbedCab=no")
            .AddElement("Media", "Id=3; Cabinet=MyProduct3.cab; EmbedCab=no");
...
And when you add a file you can always pass the desired media id:
new File(@"Files\Bin\MyApp.exe") { AttributesDefinition = "DiskId=2" }
But I cannot say I like this solution. The MediaTemplate element is much more elegant approach as it (with a single element) defines the splitting algorithm without explicit mapping cabs and files.

Approach is the same:
document.Root.Select("Product/Media").Remove(); //don't need it any more
document.Root.Select("Product")
             .AddElement("MediaTemplate", "MaximumCabinetSizeForLargeFileSplitting=2048");
You can even drop the MaximumCabinetSizeForLargeFileSplitting=2048 as it is a default value anyway.


I think it is a good feature to go to default features set. Please log the feature request on GitHub and I will implement it as something like this:
project.MediaTemplate = new MediaTemplate{MaximumCabinetSizeForLargeFileSplitting=2048};
//or
project.Cabs = MediaTemplate.Default; 
Please use GitHub for any further discussions: https://github.com/oleg-shilo/wixsharp

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>