Skip to content

Commit

Permalink
move CurrentVersion test to CurrentVersion reg key only adoptium#300
Browse files Browse the repository at this point in the history
  • Loading branch information
douph1 committed Apr 16, 2021
1 parent 410956c commit 9cab86f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wix/Main.wxs.template
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@
<RegistryValue Root="HKMU" Key="SOFTWARE\Classes\{vendor}.jarfile\shell\open\command" Type="string" Value="&quot;[INSTALLDIR]bin\javaw.exe&quot; -jar &quot;%1&quot; %*" KeyPath="no" />
</Component>
<Component Id="SetOracleJavaSoftKeys" Guid="*">
<RegistryValue Root="HKLM" Key="SOFTWARE\JavaSoft\[ORACLE_JAVASOFT_BASE_KEY]" Name="CurrentVersion" Type="string" Value="[ORACLE_VERSION_KEY]" KeyPath="yes" />
<RegistryValue Root="HKLM" Key="SOFTWARE\JavaSoft\[ORACLE_JAVASOFT_BASE_KEY]\[ORACLE_VERSION_KEY]" Name="JavaHome" Type="string" Value="[INSTALLDIR]" KeyPath="no" />
<Condition Level="0"><![CDATA[JAVASOFT_CURRENTVERSION <> "1.8" AND JAVASOFT_CURRENTVERSION > $(var.ProductMajorVersion)]]>
<RegistryValue Root="HKLM" Key="SOFTWARE\JavaSoft\[ORACLE_JAVASOFT_BASE_KEY]" Name="CurrentVersion" Type="string" Value="[ORACLE_VERSION_KEY]" KeyPath="no" />
</Condition>
<RegistryValue Root="HKLM" Key="SOFTWARE\JavaSoft\[ORACLE_JAVASOFT_BASE_KEY]\[ORACLE_VERSION_KEY]" Name="JavaHome" Type="string" Value="[INSTALLDIR]" KeyPath="yes" />
<?if $(env.PRODUCT_CATEGORY)="jre"?>
<RegistryValue Root="HKLM" Key="SOFTWARE\JavaSoft\[ORACLE_JAVASOFT_BASE_KEY]\[ORACLE_VERSION_KEY]" Name="RuntimeLib" Type="string" Value="[INSTALLDIR][DLL_PATH]" KeyPath="no" />
<!-- Oracle dont set RuntimeLib for JDK .. because JRE is "private" JRE so no ?else? -->
Expand Down Expand Up @@ -202,7 +204,6 @@
<!-- As Oracle, don't override if current value is already bigger ( newer java ): "a value that is the highest installed version on the system"
Note !! : the reg key is not removed during uninstall if any other installer reference it
-->
<Condition Level="0"><![CDATA[JAVASOFT_CURRENTVERSION <> "1.8" AND JAVASOFT_CURRENTVERSION > $(var.ProductMajorVersion)]]></Condition>
<ComponentRef Id="SetOracleJavaSoftKeys" />
</Feature>
<?if $(env.Platform)=x64?>
Expand Down

0 comments on commit 9cab86f

Please sign in to comment.