From 5e2d38ef190a69c49862a3669e0693f422105ebe Mon Sep 17 00:00:00 2001 From: pca Date: Sat, 30 Apr 2011 19:32:07 +0000 Subject: [PATCH] Windows Installer: - fix for firewall Vista/Win7 - update to JRE 1.6 u25 - TODO: fix for firewall WinXP and setting for uPnP (Port 1900) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7689 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- addon/download.php | 8 ++++---- build.nsi | 33 +++++++++++++++++---------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/addon/download.php b/addon/download.php index 4d91f636c..e1c902fb3 100644 --- a/addon/download.php +++ b/addon/download.php @@ -17,12 +17,12 @@ $_GET['yacyrevnr'] not used yet if ($_GET['what'] == 'jre') { if($_GET['version'] == 32) - // jre-6u24-windows-i586.exe - header('Location: http://javadl.sun.com/webapps/download/AutoDL?BundleId=47364'); + // jre-6u25-windows-i586.exe + header('Location: http://javadl.sun.com/webapps/download/AutoDL?BundleId=48343'); if($_GET['version'] == 64) - // jre-6u24-windows-x64.exe - header('Location: http://javadl.sun.com/webapps/download/AutoDL?BundleId=47155'); + // jre-6u25-windows-x64.exe + header('Location: http://javadl.sun.com/webapps/download/AutoDL?BundleId=48346'); } diff --git a/build.nsi b/build.nsi index 66408e812..5c77fb233 100755 --- a/build.nsi +++ b/build.nsi @@ -2,6 +2,7 @@ ; ---------------------------------------- ;(C) 2004-2006 by Alexander Schier ;(C) 2008-2010 by David Wieditz +;(C) 2011- by Rene Kluge /*---------------------------------------- MANUALS http://nsis.sourceforge.net/Docs/ @@ -41,12 +42,12 @@ InstallDirRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" !define RecommendSpace "30" ; some string for Firewall -!define WinXPAddFwRule 'netsh firewall add portopening protocol=tcp port=8090 name=YaCy mode=enable' -!define WinXPDelFwRule 'netsh firewall del portopening protocol=tcp port=8090' -!define WinVistaAddFwRule 'netsh advfirewall firewall add rule name="YaCy" dir=in action=allow protocol=tcp localport=8090' -!define WinVistaDelFwRule 'netsh advfirewall firewall del rule name="YaCy"' -var WinAddFwRule -var WinDelFwRule +!define WinXPAddFwRulePort 'netsh firewall add portopening protocol=tcp port=8090 name=YaCy mode=enable' +!define WinXPDelFwRulePort 'netsh firewall del portopening protocol=tcp port=8090' +!define WinVistaAddFwRulePort 'netsh advfirewall firewall add rule name="YaCy" program="%SystemRoot%\System32\javaw.exe" dir=in action=allow protocol=tcp localport=8090' +!define WinVistaDelFwRulePort 'netsh advfirewall firewall del rule name="YaCy"' +var WinAddFwRulePort +var WinDelFwRulePort ;requested execution level on Vista / 7 @@ -164,7 +165,7 @@ Section "YaCy" WriteUninstaller "uninstall.exe" SectionEnd -Section "Sun Java" Sec_Java_id +Section "Java (Oracle JRE)" Sec_Java_id SectionIn 1 RO SetShellVarContext current Call GetJRE @@ -267,15 +268,15 @@ Function .onInit ${If} ${IsWinVista} ${OrIf} ${IsWin7} - StrCpy $WinAddFwRule '${WinVistaAddFwRule}' - StrCpy $WinDelFwRule '${WinVistaDelFwRule}' + StrCpy $WinAddFwRulePort '${WinVistaAddFwRulePort}' + StrCpy $WinDelFwRulePort '${WinVistaDelFwRulePort}' ReadRegDWORD $FirewallServiceStart HKLM "SYSTEM\CurrentControlSet\services\MpsSvc" "Start" ${EndIf} ${If} ${IsWinXP} ${AndIf} ${AtLeastServicePack} 2 - StrCpy $WinAddFwRule '${WinXPAddFwRule}' - StrCpy $WinDelFwRule '${WinXPDelFwRule}' + StrCpy $WinAddFwRulePort '${WinXPAddFwRulePort}' + StrCpy $WinDelFwRulePort '${WinXPDelFwRulePort}' ReadRegDWORD $FirewallServiceStart HKLM "SYSTEM\CurrentControlSet\services\SharedAccess" "Start" ${EndIf} @@ -386,11 +387,11 @@ FunctionEnd Function OpenFirewall var /global ExecErrorCode ; run netsh - nsExec::ExecToStack '$WinAddFwRule' + nsExec::ExecToStack '$WinAddFwRulePort' pop $ExecErrorCode ; if run without error register for uninstall and clear finish page ${If} $ExecErrorCode = "0" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "DelFwRule" '$WinDelFwRule' + WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "DelFwRulePort" '$WinDelFwRulePort' IntOp $FirewallServiceStart 0 + 0 ${Else} IntOp $FirewallServiceStart 3 + 0 @@ -407,9 +408,9 @@ FunctionEnd Function un.CloseFirewall ; get string for closing port from registy - ReadRegStr '$WinDelFwRule' HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "DelFwRule" + ReadRegStr '$WinDelFwRulePort' HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "DelFwRulePort" ; if found > run netsh to close port - ${IfNot} '$WinDelFwRule' == '' - nsExec::ExecToStack '$WinDelFwRule' + ${IfNot} '$WinDelFwRulePort' == '' + nsExec::ExecToStack '$WinDelFwRulePort' ${EndIf} FunctionEnd