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 17, 2021
1 parent 6993710 commit f044f90
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wix/Main.wxs.template
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@

<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="SetOracleJavaSoftKeysCurrentVersion" Guid="*">
<Condition><![CDATA[JAVASOFT_CURRENTVERSION <> "1.8" AND JAVASOFT_CURRENTVERSION > $(var.ProductMajorVersion)]]></Condition>
<RegistryValue Root="HKLM" Key="SOFTWARE\JavaSoft\[ORACLE_JAVASOFT_BASE_KEY]" Name="CurrentVersion" Type="string" Value="[ORACLE_VERSION_KEY]" KeyPath="yes" />
</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" />
<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 +205,7 @@
<!-- 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="SetOracleJavaSoftKeysCurrentVersion" />
<ComponentRef Id="SetOracleJavaSoftKeys" />
</Feature>
<?if $(env.Platform)=x64?>
Expand Down

0 comments on commit f044f90

Please sign in to comment.