Commit 931ec349 authored by Administrator's avatar Administrator
Browse files

new windows installer with openjdk 12.0

parent b97b161f
Pipeline #1829 passed with stage
in 17 seconds
File added
!include "MUI.nsh" !include "MUI.nsh"
!addplugindir nsis
Icon nsis/ttt.ico Icon nsis/ttt.ico
Name "TeleTeaching Tool" Name "TeleTeaching Tool"
...@@ -15,52 +16,36 @@ BrandingText " " ...@@ -15,52 +16,36 @@ BrandingText " "
;Page directory !define JRE_VERSION "12.0"
;Page instfiles !define JRE_URL ""
;steal most recent URLs from
!define JRE_VERSION "1.7"
!define JREX_URL "ttp://"
!define JREI_URL ""
Function .onInit Function .onInit
; Install to the correct directory on 32 bit or 64 bit machines
IfFileExists $WINDIR\SYSWOW64\*.* Is64bit Is32bit
SetRegView 32
GOTO End32Bitvs64BitCheck
SetRegView 64 SetRegView 64
FunctionEnd FunctionEnd
Function DetectJRE Function DetectJRE
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\JDK" \
"CurrentVersion" "CurrentVersion"
StrCmp $2 ${JRE_VERSION} done StrCmp $2 ${JRE_VERSION} done
Call DownloadJRE Call DownloadJRE
done: done:
FunctionEnd FunctionEnd
Function DownloadJRE Function DownloadJRE
MessageBox MB_OK "TTT uses Java ${JRE_VERSION}, it will now \ MessageBox MB_OK "TTT uses Java ${JRE_VERSION}, it will now \
be downloaded and installed" be downloaded and installed -- "
StrCpy $2 "$TEMP\Java Runtime Environment.exe" StrCpy $2 "$TEMP\JDK.msi"
nsisdl::download /TIMEOUT=30000 $JRE_URL $2 inetc::get "${JRE_URL}" $2 /END
Pop $R0 ;Get the return value Pop $R0 ;Get the return value
StrCmp $R0 "success" +3 StrCmp $R0 "OK" dlok
MessageBox MB_OK "Download failed: $R0" MessageBox MB_OK "Download failed: $R0"
Quit Abort
ExecWait $2 dlok:
ExecWait '"msiexec" /i "$TEMP\JDK.msi" ADDLOCAL=all'
Delete $2 Delete $2
FunctionEnd FunctionEnd
...@@ -85,8 +70,8 @@ Function GetJRE ...@@ -85,8 +70,8 @@ Function GetJRE
IfErrors 0 JreFound IfErrors 0 JreFound
ClearErrors ClearErrors
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\JDK" "CurrentVersion"
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome" ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\JDK\$R1" "JavaHome"
StrCpy $R0 "$R0\bin\javaw.exe" StrCpy $R0 "$R0\bin\javaw.exe"
IfFileExists $R0 JreFound IfFileExists $R0 JreFound
Supports Markdown
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