Commit 44a2bfa4 authored by petter's avatar petter

32/64 Bit Unterstuetzung

git-svn-id: 0463f305-d864-43cb-8a47-61cf597d4139
parent c6c08798
...@@ -21,12 +21,23 @@ BrandingText " " ...@@ -21,12 +21,23 @@ BrandingText " "
!define JRE_VERSION "1.7" !define JRE_VERSION "1.7"
!define JRE_URL_64 "" !define JRE_URL_64 ""
!define JRE_URL_32 "" !define JRE_URL_32 ""
!define JRE_URL "" Var JRE_URL
Function .onInit Function .onInit
; Install to the correct directory on 32 bit or 64 bit machines
IfFileExists $WINDIR\SYSWOW64\*.* Is64bit Is32bit
SetRegView 32
StrCpy $JRE_URL "$JRE_URL_32"
GOTO End32Bitvs64BitCheck
SetRegView 64
StrCpy $JRE_URL "$JRE_URL_64"
FunctionEnd FunctionEnd
Function DetectJRE Function DetectJRE
...@@ -43,7 +54,7 @@ Function DownloadJRE ...@@ -43,7 +54,7 @@ Function DownloadJRE
be downloaded and installed" be downloaded and installed"
StrCpy $2 "$TEMP\Java Runtime Environment.exe" StrCpy $2 "$TEMP\Java Runtime Environment.exe"
nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2 nsisdl::download /TIMEOUT=30000 $JRE_URL $2
Pop $R0 ;Get the return value Pop $R0 ;Get the return value
StrCmp $R0 "success" +3 StrCmp $R0 "success" +3
MessageBox MB_OK "Download failed: $R0" MessageBox MB_OK "Download failed: $R0"
...@@ -74,14 +85,14 @@ Function GetJRE ...@@ -74,14 +85,14 @@ Function GetJRE
ClearErrors ClearErrors
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
MessageBox MB_ICONSTOP "Query Registry for $R1"
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome" ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
MessageBox MB_ICONSTOP "Query Registry for $R0"
StrCpy $R0 "$R0\bin\javaw.exe" StrCpy $R0 "$R0\bin\javaw.exe"
IfFileExists $R0 JreFound
IfErrors GoodLuck JreFound
StrCpy $R0 "javaw.exe"
GoodLuck: GoodLuck:
MessageBox MB_ICONSTOP "Cannot find appropriate Java Runtime Environment." MessageBox MB_ICONSTOP "Cannot find appropriate Java Runtime Environment. (Searching for $R0)"
Abort Abort
JreFound: JreFound:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment