[jsword-svn] r2324 - trunk/bibledesktop/etc/installer/win32

dmsmith at crosswire.org dmsmith at crosswire.org
Mon Jan 18 14:11:00 MST 2016


Author: dmsmith
Date: 2016-01-18 14:11:00 -0700 (Mon, 18 Jan 2016)
New Revision: 2324

Modified:
   trunk/bibledesktop/etc/installer/win32/BibleDesktop.nsi
Log:
Changed BibleDesktop.exe to have it look for 64-bit java and then 32-bit java.

Modified: trunk/bibledesktop/etc/installer/win32/BibleDesktop.nsi
===================================================================
--- trunk/bibledesktop/etc/installer/win32/BibleDesktop.nsi	2015-09-21 17:22:08 UTC (rev 2323)
+++ trunk/bibledesktop/etc/installer/win32/BibleDesktop.nsi	2016-01-18 21:11:00 UTC (rev 2324)
@@ -7,6 +7,7 @@
 !define PRODUCT_NAME "BibleDesktop"
 !define PRODUCT_VERSION "@release.version@"
 !define CLASS "org.crosswire.bibledesktop.desktop.Desktop"
+!verbose 3
 
 ;!define JRE_VERSION "1.5.0"
 ;!define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=11027"
@@ -25,7 +26,7 @@
 Icon "${PRODUCT_NAME}.ico"
 OutFile "${PRODUCT_NAME}.exe"
 BrandingText " "
-; Under Windows Vista run this as a user.
+; Under Windows Vista/7/8/10 run this as a user.
 RequestExecutionLevel user
 
 AutoCloseWindow true
@@ -33,12 +34,18 @@
 
 Section ""
 
+  SetRegView 64
   Call FindJRE
   Pop $R0
 
   ${If} $R0 == "No"
-    MessageBox MB_OK "Could not find Java.$\rPlease install Java and try again."
-    Quit
+    SetRegView 32
+    Call FindJRE
+    Pop $R0
+    ${If} $R0 == "No"
+      MessageBox MB_OK "Could not find Java.$\rPlease install Java and try again."
+      Quit
+    ${EndIf}
   ${EndIf}
 
   SetOutPath $EXEDIR
@@ -100,11 +107,17 @@
 FunctionEnd
 
 Function .onInit
+  SetRegView 64
   Call FindJRE
   pop $HasJRE
 
   ${If} $HasJRE == "No"
-    Call GetJRE
+    SetRegView 32
+    Call FindJRE
+    pop $HasJRE
+    ${If} $HasJRE == "No"
+      Call GetJRE
+    ${EndIf}
   ${EndIf}
 
   SetSilent silent
@@ -165,6 +178,8 @@
 
 Function FindJRE
 ;
+; Need to SetRegView 64 before calling this to find 64 bit Java
+; Need to setRegView 32 before calling this to find 32 bit Java
 ;  Find JRE (javaw.exe) and put it on the stack
 ;  1 - in ..\Java\Win32\jre*
 ;  2 - in .\jre directory (JRE Installed with application)




More information about the jsword-svn mailing list