!endif\r
###########\r
\r
+Var ConsoleHandle ; to save console handle\r
+\r
section\r
- ${GetParameters} $R0\r
- ${GetExePath} $R1\r
- ${TimeStamp} $0\r
- SetRegView 64\r
-\r
- StrCpy $1 "SOFTWARE\JavaSoft\Java Runtime Environment"\r
- StrCpy $2 0\r
- ReadRegStr $2 HKLM "$1" "CurrentVersion"\r
- StrCmp $2 "" DetectTry2\r
- ReadRegStr $5 HKLM "$1\$2" "JavaHome"\r
- StrCmp $5 "" DetectTry2\r
- goto done\r
-\r
- DetectTry2:\r
- ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"\r
- StrCmp $2 "" NoJava\r
- ReadRegStr $5 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"\r
- StrCmp $5 "" NoJava done\r
-\r
- done:\r
- StrCpy $2 '-path "$R1"'\r
- StrCpy $INSTDIR "$TEMP\tizensdk_$0"\r
- RMDir /r $INSTDIR\r
- SetOutPath $INSTDIR\r
- SetOverwrite on\r
- File /r "img\*.exe"\r
- File /r "img\*.conf"\r
- File /r "img\*.jar"\r
- DetailPrint "install manager will be executed"\r
- ExecWait '"$INSTDIR\javacheck.exe"' $1\r
- ${If} $1 != 0\r
- goto NoEnv\r
- ${EndIf}\r
- ${If} $R0 == ""\r
- Exec "$INSTDIR\InstManager.exe $2"\r
- ${Else}\r
- StrCpy $3 "$2 $R0"\r
- Exec "java -jar $INSTDIR\InstallManager.jar $3"\r
- ${EndIf}\r
- SetAutoClose true\r
- return\r
-\r
- NoEnv:\r
- MessageBox MB_ICONEXCLAMATION "Cannot execute Java even if it was installed. Check environment variables or Java version(over 1.6) please." \r
- SetAutoClose true\r
- return\r
-\r
- NoJava:\r
- MessageBox MB_ICONEXCLAMATION "You must have either a Java Runtime Environment (JRE) or a Java Development Kit (JDK) in version 6 installed on your computer."\r
- SetAutoClose true\r
- return\r
-sectionEnd\r
+ ${GetParameters} $R0\r
+ ${GetExePath} $R1\r
+ ${TimeStamp} $0\r
+ SetRegView 64\r
+\r
+ StrCpy $1 "SOFTWARE\JavaSoft\Java Runtime Environment"\r
+ StrCpy $2 0\r
+ ReadRegStr $2 HKLM "$1" "CurrentVersion"\r
+ StrCmp $2 "" DetectTry2\r
+ ReadRegStr $5 HKLM "$1\$2" "JavaHome"\r
+ StrCmp $5 "" DetectTry2\r
+ goto done\r
+\r
+DetectTry2:\r
+ ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"\r
+ StrCmp $2 "" NoJava\r
+ ReadRegStr $5 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"\r
+ StrCmp $5 "" NoJava done\r
+\r
+done:\r
+ StrCpy $2 '-path "$R1"'\r
+ StrCpy $INSTDIR "$TEMP\tizensdk_$0"\r
+ RMDir /r $INSTDIR\r
+ SetOutPath $INSTDIR\r
+ SetOverwrite on\r
+ File /r "img\*.exe"\r
+ File /r "img\*.conf"\r
+ File /r "img\*.jar"\r
+ DetailPrint "install manager will be executed"\r
+ ExecDos::exec '"$INSTDIR\javacheck.exe"' "" ""\r
+ Pop $1\r
+ ${If} $1 != 0\r
+ goto NoEnv\r
+ ${EndIf}\r
+\r
+ ${If} $R0 == ""\r
+ Exec "$INSTDIR\InstManager.exe $2"\r
+ ${Else}\r
+ StrCpy $3 "$2 $R0"\r
+ System::Call 'kernel32::GetStdHandle(i -11)i.r0' ;try to get stdout\r
+ System::Call 'kernel32::AttachConsole(i -1)i.r1' ;attach to parent console\r
+ Exec "java -jar $INSTDIR\InstallManager.jar $3"\r
+ ${EndIf}\r
+SetAutoClose true\r
+return\r
+\r
+NoEnv:\r
+ MessageBox MB_ICONEXCLAMATION "Cannot execute Java even if it was installed. Check environment variables or Java version(over 1.6) please." \r
+SetAutoClose true\r
+return\r
+\r
+NoJava:\r
+ MessageBox MB_ICONEXCLAMATION "You must have either a Java Runtime Environment (JRE) or a Java Development Kit (JDK) in version 6 installed on your computer."\r
+SetAutoClose true\r
+return\r
+\r
+sectionEnd
\ No newline at end of file
!endif\r
###########\r
\r
+Var ConsoleHandle ; to save console handle\r
+\r
section\r
- ${GetParameters} $R0\r
- ${GetExePath} $R1\r
- ${TimeStamp} $0\r
-\r
- StrCpy $1 "SOFTWARE\JavaSoft\Java Runtime Environment"\r
- StrCpy $2 0\r
- ReadRegStr $2 HKLM "$1" "CurrentVersion"\r
- StrCmp $2 "" DetectTry2\r
- ReadRegStr $5 HKLM "$1\$2" "JavaHome"\r
- StrCmp $5 "" DetectTry2\r
- goto done\r
-\r
- DetectTry2:\r
- ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"\r
- StrCmp $2 "" NoJava\r
- ReadRegStr $5 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"\r
- StrCmp $5 "" NoJava done\r
-\r
- done:\r
- StrCpy $2 '-path "$R1"'\r
- StrCpy $INSTDIR "$TEMP\tizensdk_$0"\r
- RMDir /r $INSTDIR\r
- SetOutPath $INSTDIR\r
- SetOverwrite on\r
- File /r "img\*.exe"\r
- File /r "img\*.conf"\r
- File /r "img\*.jar"\r
- DetailPrint "install manager will be executed"\r
- ExecWait '"$INSTDIR\javacheck.exe"' $1\r
- ${If} $1 != 0\r
- goto NoEnv\r
- ${EndIf}\r
- ${If} $R0 == ""\r
- Exec "$INSTDIR\InstManager.exe $2"\r
- ${Else}\r
- StrCpy $3 "$2 $R0"\r
- Exec "java -jar $INSTDIR\InstallManager.jar $3"\r
- ${EndIf}\r
- SetAutoClose true\r
- return\r
-\r
- NoEnv:\r
- MessageBox MB_ICONEXCLAMATION "Cannot execute Java even if it was installed. Check environment variables or Java version(over 1.6) please." \r
- SetAutoClose true\r
- return\r
-\r
- NoJava:\r
- MessageBox MB_ICONEXCLAMATION "You must have either a Java Runtime Environment (JRE) or a Java Development Kit (JDK) in version 6 installed on your computer."\r
- SetAutoClose true\r
- return\r
+ ${GetParameters} $R0\r
+ ${GetExePath} $R1\r
+ ${TimeStamp} $0\r
+\r
+ StrCpy $1 "SOFTWARE\JavaSoft\Java Runtime Environment"\r
+ StrCpy $2 0\r
+ ReadRegStr $2 HKLM "$1" "CurrentVersion"\r
+ StrCmp $2 "" DetectTry2\r
+ ReadRegStr $5 HKLM "$1\$2" "JavaHome"\r
+ StrCmp $5 "" DetectTry2\r
+ goto done\r
+\r
+DetectTry2:\r
+ ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"\r
+ StrCmp $2 "" NoJava\r
+ ReadRegStr $5 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"\r
+ StrCmp $5 "" NoJava done\r
+\r
+done:\r
+ StrCpy $2 '-path "$R1"'\r
+ StrCpy $INSTDIR "$TEMP\tizensdk_$0"\r
+ RMDir /r $INSTDIR\r
+ SetOutPath $INSTDIR\r
+ SetOverwrite on\r
+ File /r "img\*.exe"\r
+ File /r "img\*.conf"\r
+ File /r "img\*.jar"\r
+ DetailPrint "install manager will be executed"\r
+ ExecDos::exec '"$INSTDIR\javacheck.exe"' "" ""\r
+ Pop $1\r
+ ${If} $1 != 0\r
+ goto NoEnv\r
+ ${EndIf}\r
+\r
+ ${If} $R0 == ""\r
+ Exec "$INSTDIR\InstManager.exe $2"\r
+ ${Else}\r
+ StrCpy $3 "$2 $R0"\r
+ System::Call 'kernel32::GetStdHandle(i -11)i.r0' ;try to get stdout\r
+ System::Call 'kernel32::AttachConsole(i -1)i.r1' ;attach to parent console\r
+ Exec "java -jar $INSTDIR\InstallManager.jar $3"\r
+ ${EndIf}\r
+SetAutoClose true\r
+return\r
+\r
+NoEnv:\r
+ MessageBox MB_ICONEXCLAMATION "Cannot execute Java even if it was installed. Check environment variables or Java version(over 1.6) please." \r
+SetAutoClose true\r
+return\r
+\r
+NoJava:\r
+ MessageBox MB_ICONEXCLAMATION "You must have either a Java Runtime Environment (JRE) or a Java Development Kit (JDK) in version 6 installed on your computer."\r
+SetAutoClose true\r
+return\r
+\r
sectionEnd\r