[wix-users] Need help with building msi with dynamic filenames in wix

Christopher Painter chrpai at iswix.com
Thu May 14 06:52:54 PDT 2020


I use MSBuild / .SLN / .WIXPROJ and don't call candle and light directly.  On the rare occassions I use heat ( pretty much whenever NodeJS get's involved)  I simply create an empty fragment that will have those components and reference it into my directory structure and feature tree.   Then I'll put a simple  Prebuild event in the .WIXPROJ to call heat and populate the fragment with the dynamically discovered files.

I generally discourage this but some scenarios don't leave many other choices.

This does mean you'll need to use major upgrades with remove existing products scheduled early in the sequence.

FWIW I answered a question just like this yesterday on Stack Overflow.  No upvotes of course. 😉

https://stackoverflow.com/questions/61778213/wix-installer-copy-dynamically-named-angular-files



________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of David Jones via wix-users <wix-users at lists.wixtoolset.org>
Sent: Thursday, May 14, 2020 8:04 AM
To: Nick Elmer via wix-users <wix-users at lists.wixtoolset.org>
Cc: David Jones <david.jones at kaddatechnologies.com>
Subject: Re: [wix-users] Need help with building msi with dynamic filenames in wix

That is what we currently do, however we are running into the issue of the files being cached and the old versions showing after deployment.

I looked into the heat.exe file and it works but the next issue I am running into is how to use the heat.exe file in Jenkins pipeline. Is there any documentation on how to make wix toolset commands work in pipeline builds?

On May 14, 2020, 8:01 AM, at 8:01 AM, Nick Elmer via wix-users <wix-users at lists.wixtoolset.org> wrote:
>You can have the webpack config remove hashes so that you have just the
>static file names.
>https://stackoverflow.com/questions/59367080/angular-7-build-how-to-remove-output-hash-and-defaultview1module1-file
>
>
>-----Original Message-----
>From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of
>Edwin Castro via wix-users
>Sent: Wednesday, May 13, 2020 5:03 PM
>To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>Cc: Edwin Castro <egcastr at gmail.com>
>Subject: Re: [wix-users] Need help with building msi with dynamic
>filenames in wix
>
>Beware the component rules!
>
>https://docs.microsoft.com/en-us/windows/win32/msi/what-happens-if-the-component-rules-are-broken
>
>
>http://robmensching.com/blog/posts/2003/10/18/component-rules-101/
>
>--
>Edwin G. Castro
>
>On Wed, May 13, 2020 at 10:15 AM david.jones--- via wix-users <
>wix-users at lists.wixtoolset.org> wrote:
>
>> I have an angular project that uses dynamic files when deployed to
>> production
>>
>> These files have hashes appended to them and are all stored in a
>> folder called "dist"
>>
>>
>>
>> How can I build the wix config file(that packages these files into an
>
>> MSI) with these dynamically named files?
>>
>>
>>
>> My current .wxs file looks similar to this
>>
>>
>>
>> <Component Id="Comp1" Guid="AF2333223-ADS23-123S-12313123123"
>> WIN64="yes">
>>
>> <File Id="file2" Name="runtime.js" DiskId="1" Source="runtime.js" />
>>
>> <File Id="file3" Name="main.js" DiskId="1" Source=" main.js" />
>>
>> <File Id="file4" Name="scripts.js" DiskId="1" Source=" scripts.js" />
>>
>> <File Id="file5" Name="polyfills.js" DiskId="1" Source="
>polyfills.js"
>> />
>>
>> </Component>
>>
>>
>>
>> The files are dynamically named and would look like this
>>
>> runtime.12334323234.js
>>
>> main.4234jkdf2343243.js
>>
>>
>>
>> How can I setup my wix config file to grab dynamic files to copy into
>
>> the MSI package instead of these hardcoded files? Will wix respond to
>
>> wildcard characters? Like if I tell it to grab Source=" scripts.*.js"
>will it work?
>>
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>
>____________________________________________________________________
>WiX Toolset Users Mailing List provided by FireGiant
>http://www.firegiant.com/
>
>____________________________________________________________________
>WiX Toolset Users Mailing List provided by FireGiant
>http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list