[wix-users] SetProperty and PropertyRef within Fragments...
Lewis Henderson
henderso at opentext.com
Tue Jul 19 13:19:50 PDT 2016
Thanks Rob,
I was including a <PropertyRef ... /> for each property that the Fragment actually referenced, and not for anything it didn't actually use. Since JRE_HOME was only used to set up JAVA_HOME, I didn't think to use that to bring in the java fragment. It worked like a charm.
Lewis
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Rob Mensching
Sent: Tuesday, July 19, 2016 3:55 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] SetProperty and PropertyRef within Fragments...
SetProperty is syntactic sugar for a Type51 CustomAction. So a Property doesn't exist, but a CustomAction does, usually the "SetProperty/@Id" prefixed with "Set".
However, you only need one reference into a Fragment for the rest to be referenced. So a reference to JRE_HOME will bring all that stuff in.
_____________________________________________________________
Short replies here. Complete answers over there: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=hm3fcmhWCPQEFjp7kKqujeWbrNSdIs69O0iIz16WQdM&s=GSxS8TDiHDQro0rjgUIe78I7u4Rh8kKX-tcEwp0J56M&e=
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: Tuesday, July 19, 2016 12:18 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] SetProperty and PropertyRef within Fragments...
Hello Folks,
I've been working with Wix for a while now, but I have some "bad habits", such as using Wix includes rather than Fragments. I'm working to correct this, but I've run into an issue. I have one Fragment that defines some properties using SetProperty statements, but PropertyRef statements for those properties in other Fragments (and the main .wxs file) come up unresolved from light. I can't just define a default property value (or can I), because the SetProperty statements are conditional. This code snippet may help:
<Fragment>
<Property Id="JRE_HOME" Secure="yes">
<RegistrySearch ... />
</Property>
<Property Id="JRE_JVM" Secure="yes">
<DirectorySearch Id="jre_jvm" Path="[JRE_HOME]\bin" Depth="1">
<FileSearch Name="jvm.dll" />
</DirectorySearch>
</Property>
<!-similar code for JDK_HOME and JDK_JVM -->
<SetProperty Id="JAVA_HOME" Value="JRE_HOME"
After="AppSearch">JRE_JVM</SetProperty>
<SetProperty Id="JAVA_HOME" Value="JDK_HOME"
After="AppSearch">NOT JAVA_HOME AND JDK_JVM</SetProperty>
...
</Fragment>
The conditions are actually a bit more complex as they're also enforcing a minimum version, but you get the idea. The problem is that in other files, when I have <PropertyRef Id="JAVA_HOME">, I get "error LGHT0094 : Unresolved reference to symbol 'Property:JAVA_HOME'".
Does anyone have a good workaround for this issue? Thanks for any assistance.
Lewis Henderson
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=hm3fcmhWCPQEFjp7kKqujeWbrNSdIs69O0iIz16WQdM&s=GSxS8TDiHDQro0rjgUIe78I7u4Rh8kKX-tcEwp0J56M&e=
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=hm3fcmhWCPQEFjp7kKqujeWbrNSdIs69O0iIz16WQdM&s=GSxS8TDiHDQro0rjgUIe78I7u4Rh8kKX-tcEwp0J56M&e=
More information about the wix-users
mailing list