First problem: As near as I can tell from your source code, the "QtDir" component is in the <Directory Id="Qt4Dir" Name="gcc4"> directory. You could use "[QtDir]" instead of "[$QtDir]" (referring to the Id of the directory instead of the "directory of the component") because directory Ids become properties where the values are the full directory paths (ending in a backslash ("\") character).
Second problem: If you need separate qt.conf files in each product's installation directory, they should live in a component under that product's installation directory instead of being shared. Third problem: You could sequence them right before/after the RemoveIniValues and WriteIniValues standard actions. Remember that your custom actions need to be "deferred". -----Original Message----- From: Alessandro Morelli [mailto:atanva...@gmail.com] Sent: Wednesday, February 03, 2010 3:35 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Some questions regarding shared components, custom actions and properties Hi all, I'm trying to code an installer for my applications and the framework they use and since I reuse the framework a lot, I'd like to concoct a wixlib with all the necessary pieces So far, I managed to structure a single wxs which seems to do the job, but I'm stumbling on some problems. I want to deploy the framework and the supporting libs once, so I created a hierarchy under CommonFIlesFolder: <Directory Id="CommonFilesFolder" Name="CFiles"> <Directory Id="QtCommonDir" Name="Qt4"> <Directory Id="Qt4Dir" Name="gcc4"> <Directory Id="Qt4Bin" Name="bin"> <Component Id="QtCore4.dll" Guid="D842C046-04F7-4EFB-AC83-BE2ADB20FCA2"> <File Id="QtCore4.dll" Name="QtCore4.dll" Source="..\..\..\Qt\2010.01\qt\bin\QtCore4.dll" DefaultLanguage="0" /> </Component> </Directory> <Directory Id="Qt4Libs" Name="lib"> <Component Id="mingwm10.dll" Guid="F732AB20-7554-44E6-9A1B-3547CF809B6D"> <File Id="mingwm10.dll" Name="mingwm10.dll" Source="..\..\..\Qt\2010.01\qt\bin\mingwm10.dll" /> </Component> <Component Id="libgcc_s_dw2_1.dll" Guid="17235686-4DDC-40CA-9D54-4483BA19F26B"> <File Id="libgcc_s_dw2_1.dll" Name="libgcc_s_dw2-1.dll" Source="..\..\..\Qt\2010.01\qt\bin\libgcc_s_dw2-1.dll" /> </Component> </Directory> <Directory Id="Qt4Plugins" Name="plugins"> </Directory> <Component Id="QtDir" Guid="B09DC47D-C5AE-4614-8D6A-437227391ADB"> <IniFile Id="qt.conf" Action="createLine" Key="Prefix" Name="qt.conf" Section="Paths" Value="[$QtDir]" Directory="INSTALLDIR" /> <CreateFolder /> </Component> </Directory> </Directory> </Directory> The components under this tree will be shared by all my apps, installed under ProgramFilesFolder: <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="VendorDir" Name="$(var.VendorName)"> <Directory Id="INSTALLDIR" Name="$(var.ProductName)"> <Component Id="Placeholder" Guid="306202B5-2936-4513-AD1E-42C6230AB8CA"> <File Id="README" Name="README" Source="..\..\..\Qt\2010.01\qt\README" /> </Component> <Component Id="application" Guid="A4301F50-DCD7-417E-B67A-C3DDB4DD80D6"> <File Id="QtInfo.exe" Name="QtInfo.exe" Source="..\..\QtInfo\release\QtInfo.exe" KeyPath="yes" /> <RegistryKey Action="createAndRemoveOnUninstall" Id="AppPaths" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\$(var.Executable)" Root="HKLM"> <RegistryValue Action="write" Id="default" Type="string" Value="[#QtInfo.exe]" /> <RegistryValue Action="write" Name="Path" Type="string" Value="[$application];[$QtDir]bin;[$QtDir]lib" /> </RegistryKey> </Component> </Directory> </Directory> </Directory> First problem: To specify the application paths, under the application component, I refer to the QtDir component, soliciting an ICE69 warning and I'm not sure how to avoid it or if I can live with it, since docs say that [$component] may evaluate to null in certain circumstances. I tried using properties, but I'm failing to understand fully the mechanism. Second problem: I'm not sure where to put the qt.conf <IniFile>. Currently, I have it under a shared component, but I'm not sure if I'm violating the component rules since the ini file gets created in a different path for each Product Third problem: The qt.conf is *almost* an ini file, but values are C-style escaped strings, so backslashes must be repeated. I'd like to create a custom action to produce the qt.conf file, but I'm not sure, after reading the docs, where to put it in terms of execute sequence and how to access the relevant informations (component paths and such). What would be an appropriate course of action in these circumstances? Am I trying a too complex project, given my level (un)familiarity with MSI? Any help appreciated, --alex ---------------------------------------------------------------------------- -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users