diff options
| author | lotus <lotus@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2010-08-26 16:53:20 +0000 |
|---|---|---|
| committer | lotus <lotus@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2010-08-26 16:53:20 +0000 |
| commit | d5ccbb99f934e3e2c9578799a645c9feace852ff (patch) | |
| tree | aefce39c70d5d0b63b4cc7a4dc40c5c017af3e02 | |
| parent | 4f22e2df410ce454bcddbdd4a54afec1d8dfbe05 (diff) | |
the Windows installer now always requires admin level for installation (Vista/7)
unfortunately some users seem to forget to manually install the downloaded Java runtime and therefore could not start YaCy
- added concept to always distribute the latest Java version via external php script
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7076 6c8d7289-2bf4-0310-a012-ef5d649a1542
| -rw-r--r-- | addon/download.php | 27 | ||||
| -rwxr-xr-x | build.nsi | 18 |
2 files changed, 37 insertions, 8 deletions
diff --git a/addon/download.php b/addon/download.php new file mode 100644 index 000000000..0f9367a9a --- /dev/null +++ b/addon/download.php @@ -0,0 +1,27 @@ +<?php +/* +This file serves the latest Java version locations for the Windows installer. + +JAVA VERSION +http://www.java.com/de/download/manual.jsp BundleId +1 / +2 + +$_GET['what'] should be 'jre' +$_GET['version'] 32 or 64 (bit) +$_GET['yacyrevnr'] not used yet + +*/ + + +if ($_GET['what'] == 'jre') { + + if($_GET['version'] == 32) + // jre-6u18-windows-i586.exe + header('Location: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37718'); + + if($_GET['version'] == 64) + // jre-6u18-windows-x64.exe + header('Location: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37401'); + +} + +?> @@ -1,7 +1,7 @@ ;yacy.nsi
; ----------------------------------------
;(C) 2004-2006 by Alexander Schier
-;(C) 2008 by David Wieditz
+;(C) 2008-2010 by David Wieditz
/*----------------------------------------
MANUALS
http://nsis.sourceforge.net/Docs/
@@ -36,8 +36,8 @@ OutFile "RELEASE\WINDOWS\yacy_v@REPL_VERSION@_@REPL_DATE@_@REPL_REVISION_NR@.exe InstallDir "$PROFILE\YaCy"
InstallDirRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "UninstallString"
-;requested execution level on Vista
-RequestExecutionLevel user
+;requested execution level on Vista / 7
+RequestExecutionLevel admin
SetCompressor /SOLID LZMA
!insertmacro MUI_RESERVEFILE_LANGDLL ;loads faster
@@ -48,7 +48,9 @@ SetCompressor /SOLID LZMA !define JRE_VERSION6 "1.6"
!define JRE_32 "http://javadl.sun.com/webapps/download/AutoDL?BundleId=37718" ;jre-6u18-windows-i586.exe
-!define JRE_64 "http://javadl.sun.com/webapps/download/AutoDL?BundleId=37401" ;jre-6u18-windows-x64.exe
+!define JRE_64 "http://javadl.sun.com/webapps/download/AutoDL?BundleId=37401" ;jre-6u18-windows-x64.exe +;!define JRE_32 "http://yacyweb.de/download.php?what=jre&version=32&yacyrevnr=@REPL_REVISION_NR@"
+;!define JRE_64 "http://yacyweb.de/download.php?what=jre&version=64&yacyrevnr=@REPL_REVISION_NR@"
; ----------------------------------------
; GENERAL APPEARANCE
@@ -205,7 +207,7 @@ SectionEnd ; FUNCTIONS
Function GetJRE
-; based on http://nsis.sourceforge.net/Simple_Java_Runtime_Download_Script
+; based on http://nsis.sourceforge.net/Simple_Java_Runtime_Download_Script
${If} ${RunningX64}
StrCpy $3 ${JRE_64}
${Else}
@@ -214,7 +216,7 @@ Function GetJRE userInfo::getAccountType
Pop $0
- StrCmp $0 "Admin" download
+ StrCmp $0 "Admin" download ; download without message if admin
MessageBox MB_ICONEXCLAMATION "$(noAdminForJava)" /SD IDOK
download:
SetShellVarContext all
@@ -225,7 +227,7 @@ Function GetJRE StrCmp $R0 "success" +3
MessageBox MB_OK "Download failed: $R0" /SD IDOK
Return
- StrCmp $0 "Admin" install
+ StrCmp $0 "Admin" install ; install if admin
CreateShortCut "$DESKTOP\Install Java for YaCy.lnk" "$2"
Return ; don't delete if not admin
install:
@@ -238,4 +240,4 @@ Function DetectJRE StrCmp $2 ${JRE_VERSION6} doneDetectJRE
Call GetJRE
doneDetectJRE:
-FunctionEnd
\ No newline at end of file +FunctionEnd |
