WiX: Functional Preprocessing

This post was moved here.

Comments (7)
  1. Albert van Peppen says:

    I think this is a welcom extension to WiX.

    But will it be possible to make your extensions in some form of extension DLL? (Kinda plug-in)

    This way it would be possible, for example, to put GUIDs in a database and you can use your extension to WiX (candle i suppose) to read the correct GUID based on the parameters in the function.

    I would welcome this because i would like to store my component GUIDs per version of my product in a database so it would easy the auto generating of MSI files on a daily base with new files automatically added.

  2. Peter Marcu says:

    Yes, the correct way to implement a function is in a preprocessor extension. This would be part of the same dll that a compiler extension is implemented in. Just identify which namespaces you want the preprocessor to pass to you extension to resolve and then write your function to get the guids however you need to get them out of your system.

    Would a blog entry on how to implement a preprocessor extension be helpful?

  3. Albert van Peppen says:

    I think this would be very usefull. It may save a lot of time if it is described.

    (I think documentation will always be hard for a project like WiX, since you can write entire books about it 😉 )

  4. Atul says:

    nice to read about Functional Preprocessing.but can you tell me that how can i use given  command :

    candle.exe [-?] [-nologo] [-out outputFile] sourceFile [sourceFile …]

    at the place of [-?] i want to use ‘-d’ .but i am not getting exactly the use of this ‘-d’ .

    can you make me understand through an example??

  5. -d is used to pass variables in the "var" namespace. For example: If you pass -dTEST=test on the command line. You could use "$(var.TEST)" in your authoring and it would be replaced by the preprocessor to equal "test" before your authoring is sent to the compiler.

  6. The authors of WiX have made it easy for you to do some of your own preprocessing on your WiX files before

  7. In my last blog post , I showed how easy it is to extend WiX, and make a simple preprocessor extension. 

Comments are closed.

Skip to main content