-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attributes inheritance in Files and DirFiles #23
Comments
The responsibility of the wild card based entities are aggregating files but not initializing them. That is why the current implementation does not allow assignment of the File properties. Though I do like your idea. Can you please log it as a dedicated enhancement request so it is not lost. Until it's implemented please use the following technique: project.ResolveWildCards();
project.AllFiles
.Where(f => f.Feature.Name == "Feature1")
.ForEach(f => f.AttributesDefinition = "File:DiskId=1;Dir:AnotherAttribute=Value");
project.AllFiles
.Where(f => f.Feature.Name == "Feature2")
.ForEach(f => f.AttributesDefinition = "File:DiskId=2;Dir:AnotherAttribute=Value"); As for Though I would rather encourage you to use project.WixSourceGenerated += doc =>
{
doc.Root.Select("Product")
.AddElement("MediaTemplate", "CabinetTemplate=cab{0}.cab, CompressionLevel=mszip");
}; |
Created issue for enhancement as required. |
Don't worry. I have already processed your issue report and the fix was done even yesterday. It's all good. Txs |
* Issue #27: Fixing AppSearch.GetProducts() crash * Added support for `MediaTemplate` element. * Added tunneling of Files and DirFiles attributes to the aggregated File items * Issue #23: Attributes inheritance in Files and DirFiles * Added Compiler.GetMappedWixConstants() for exploring WiX constants mapping * Adding %CommonAppDataFolder% to Dir.cs description * Issue #20: File.Attributes (on parent Component) after setting File.NeverOverwrite will not work
Is there a "trick" to use custom attribues with Files and DirFiles ?
I m trying to do something like this (set DiskId to all files):
For Files, as there is two wix Elements (dir and file), we should use same syntax used for file and component:
Another question, related to my DiskId use:
WixSharp support only one Media element?
This code doesn't work, only last cab is on wxs output.
I suppose only one is used , because project have a property (not a collection) project.Media.
I don't understand this limitation when I see what WixSharp is able to do! It is really extensible so I rewrite wxs after generation, but it should be natively supported. (Or there is a good reason I did'nt see ;) )
The text was updated successfully, but these errors were encountered: