diff --git a/addon/installer/logo.bmp b/addon/installer/logo.bmp
new file mode 100644
index 000000000..20809eeca
Binary files /dev/null and b/addon/installer/logo.bmp differ
diff --git a/addon/installer/network.bmp b/addon/installer/network.bmp
new file mode 100644
index 000000000..1647673b2
Binary files /dev/null and b/addon/installer/network.bmp differ
diff --git a/build.nsi b/build.nsi
index d98e512e3..f77e5897c 100755
--- a/build.nsi
+++ b/build.nsi
@@ -1,44 +1,150 @@
;yacy.nsi
-;--------
+; ----------------------------------------
;(C) 2004-2006 by Alexander Schier
;(C) 2008 by David Wieditz
+/*----------------------------------------
+MANUALS
+http://nsis.sourceforge.net/Docs/
+http://nsis.sourceforge.net/Docs/Modern%20UI%202/Readme.html
+----------------------------------------
+COMMAND LINE OPTIONS (case sensitive):
+/S - silent install/uninstall
+/D="C:\yacy" - installation folder
+----------------------------------------*/
-!define JRE_VERSION6 "1.6"
-!define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=23112" ;jre-6u7-windows-i586-p.exe
+; ----------------------------------------
+; MODERN UI
-Name "YaCy"
-Icon "RELEASE\MAIN\addon\YaCy.ico"
-UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
+!include MUI2.nsh
-;requested execution level on Vista
-RequestExecutionLevel user
+; ----------------------------------------
+; GENERAL
+Name "YaCy @REPL_VERSION@"
OutFile "RELEASE\WINDOWS\yacy_v@REPL_VERSION@_@REPL_DATE@_@REPL_REVISION_NR@.exe"
+
+;default installation folder
InstallDir "$PROFILE\YaCy"
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "UninstallString"
+;requested execution level on Vista
+RequestExecutionLevel user
+
SetCompressor /SOLID LZMA
+!insertmacro MUI_RESERVEFILE_LANGDLL ;loads faster
-InstType /CUSTOMSTRING=Custom
+; ----------------------------------------
+; JAVA VERSION
-#InstType "Minimal"
-InstType "Normal"
-#InstType "Full"
+!define JRE_VERSION6 "1.6"
+!define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=23112" ;jre-6u7-windows-i586-p.exe
-; The text to prompt the user to enter a directory
-ComponentText "This will install YaCy v@REPL_VERSION@ (Build @REPL_DATE@) on your computer. Select which optional things you want to be installed."
-; The text to prompt the user to enter a directory
-DirText "Choose a directory to install into:"
+; ----------------------------------------
+; GENERAL APPEARANCE
-LicenseText "You must agree to this license to install YaCy."
-LicenseData "gpl.txt"
+!define MUI_ICON "RELEASE\MAIN\addon\YaCy.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
-Section "Binaries (required)"
- SectionIn 1 2 3 RO
-
- ;clear old shortcuts
+!define MUI_WELCOMEFINISHPAGE_BITMAP "RELEASE\MAIN\addon\installer\network.bmp"
+
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "RELEASE\MAIN\addon\installer\logo.bmp"
+!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
+
+!define MUI_ABORTWARNING ;display warning before aborting installation
+
+; ----------------------------------------
+; INSTALLER PAGES
+
+!insertmacro MUI_PAGE_WELCOME
+
+!insertmacro MUI_PAGE_LICENSE gpl.txt
+
+!define MUI_COMPONENTSPAGE_NODESC
+!insertmacro MUI_PAGE_COMPONENTS
+ComponentText "YaCy v@REPL_VERSION@ (Build @REPL_DATE@)"
+
+!insertmacro MUI_PAGE_DIRECTORY
+
+!insertmacro MUI_PAGE_INSTFILES
+
+!insertmacro MUI_PAGE_FINISH
+
+; ----------------------------------------
+; UNINSTALLER PAGES
+
+!insertmacro MUI_UNPAGE_CONFIRM
+
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; ----------------------------------------
+; LANGUAGES
+
+!insertmacro MUI_LANGUAGE "English"
+!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_LANGUAGE "German"
+!insertmacro MUI_LANGUAGE "Spanish"
+!insertmacro MUI_LANGUAGE "SpanishInternational"
+!insertmacro MUI_LANGUAGE "SimpChinese"
+!insertmacro MUI_LANGUAGE "TradChinese"
+!insertmacro MUI_LANGUAGE "Japanese"
+!insertmacro MUI_LANGUAGE "Korean"
+!insertmacro MUI_LANGUAGE "Italian"
+!insertmacro MUI_LANGUAGE "Dutch"
+!insertmacro MUI_LANGUAGE "Danish"
+!insertmacro MUI_LANGUAGE "Swedish"
+!insertmacro MUI_LANGUAGE "Norwegian"
+!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
+!insertmacro MUI_LANGUAGE "Finnish"
+!insertmacro MUI_LANGUAGE "Greek"
+!insertmacro MUI_LANGUAGE "Russian"
+!insertmacro MUI_LANGUAGE "Portuguese"
+!insertmacro MUI_LANGUAGE "PortugueseBR"
+!insertmacro MUI_LANGUAGE "Polish"
+!insertmacro MUI_LANGUAGE "Ukrainian"
+!insertmacro MUI_LANGUAGE "Czech"
+!insertmacro MUI_LANGUAGE "Slovak"
+!insertmacro MUI_LANGUAGE "Croatian"
+!insertmacro MUI_LANGUAGE "Bulgarian"
+!insertmacro MUI_LANGUAGE "Hungarian"
+!insertmacro MUI_LANGUAGE "Thai"
+!insertmacro MUI_LANGUAGE "Romanian"
+!insertmacro MUI_LANGUAGE "Latvian"
+!insertmacro MUI_LANGUAGE "Macedonian"
+!insertmacro MUI_LANGUAGE "Estonian"
+!insertmacro MUI_LANGUAGE "Turkish"
+!insertmacro MUI_LANGUAGE "Lithuanian"
+!insertmacro MUI_LANGUAGE "Slovenian"
+!insertmacro MUI_LANGUAGE "Serbian"
+!insertmacro MUI_LANGUAGE "SerbianLatin"
+!insertmacro MUI_LANGUAGE "Arabic"
+!insertmacro MUI_LANGUAGE "Farsi"
+!insertmacro MUI_LANGUAGE "Hebrew"
+!insertmacro MUI_LANGUAGE "Indonesian"
+!insertmacro MUI_LANGUAGE "Mongolian"
+!insertmacro MUI_LANGUAGE "Luxembourgish"
+!insertmacro MUI_LANGUAGE "Albanian"
+!insertmacro MUI_LANGUAGE "Breton"
+!insertmacro MUI_LANGUAGE "Belarusian"
+!insertmacro MUI_LANGUAGE "Icelandic"
+!insertmacro MUI_LANGUAGE "Malay"
+!insertmacro MUI_LANGUAGE "Bosnian"
+!insertmacro MUI_LANGUAGE "Kurdish"
+!insertmacro MUI_LANGUAGE "Irish"
+!insertmacro MUI_LANGUAGE "Uzbek"
+!insertmacro MUI_LANGUAGE "Galician"
+!insertmacro MUI_LANGUAGE "Afrikaans"
+!insertmacro MUI_LANGUAGE "Catalan"
+
+; ----------------------------------------
+; INSTALLABLE MODULES
+
+;InstType "Normal"
+
+Section "YaCy"
+ SectionIn 1 RO
SetShellVarContext current
- RMDir /r "$SMPROGRAMS\YaCy"
+ RMDir /r "$SMPROGRAMS\YaCy" ;clear old shortcuts
Delete "$QUICKLAUNCH\YaCy-Search.lnk" ;old
Delete "$DESKTOP\YaCy-Search.lnk" ;old
Delete "$SMSTARTUP\start YaCy (no console).lnk" ;old
@@ -51,12 +157,16 @@ Section "Binaries (required)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "DisplayName" "YaCy"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YaCy" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteUninstaller "uninstall.exe"
+SectionEnd
- Call DetectJRE
+Section "Java"
+ SectionIn 1 RO
+ SetShellVarContext current
+ Call DetectJRE
SectionEnd
-Section "Shortcuts in the Start Menu"
- SectionIn 1 2 3
+Section "Start Menu Group"
+ SectionIn 1
SetShellVarContext current
CreateDirectory "$SMPROGRAMS\YaCy"
CreateShortCut "$SMPROGRAMS\YaCy\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED
@@ -65,8 +175,8 @@ Section "Shortcuts in the Start Menu"
CreateShortCut "$SMPROGRAMS\YaCy\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
SectionEnd
-Section "YaCy on the Desktop"
- SectionIn 1 2 3
+Section "Desktop Icon"
+ SectionIn 1
SetShellVarContext current
CreateShortCut "$DESKTOP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED
SectionEnd
@@ -78,16 +188,18 @@ Section "YaCy in Startup"
SectionEnd
*/
+; ----------------------------------------
+; UNINSTALLER
+
Section "Uninstall"
IfFileExists "$INSTDIR\DATA\yacy.running" 0 +3
- MessageBox MB_ICONSTOP "YaCy is still running. Please stop YaCy first."
+ MessageBox MB_ICONSTOP "YaCy is still running. Please stop YaCy first." /SD IDOK
Goto nouninstall
- MessageBox MB_YESNO|MB_ICONQUESTION "Do you really want to uninstall YaCy?" IDNO nouninstall
-
SetShellVarContext current
RMDir /r "$INSTDIR\addon"
+ RMDir /r "$INSTDIR\bin"
RMDir /r "$INSTDIR\classes"
RMDir /r "$INSTDIR\defaults"
RMDir /r "$INSTDIR\htroot"
@@ -99,7 +211,7 @@ Section "Uninstall"
RMDir /r "$INSTDIR\source"
Delete "$INSTDIR\*.*"
- MessageBox MB_YESNO|MB_ICONQUESTION "Do you want to keep the Data (i.e. if you want to reinstall later)?" IDYES keepdata
+ MessageBox MB_YESNO|MB_ICONQUESTION "Keep the data?" /SD IDYES IDYES keepdata
;delete all
RMDir /r "$INSTDIR"
@@ -114,17 +226,17 @@ Section "Uninstall"
nouninstall:
SectionEnd
+; ----------------------------------------
+; FUNCTIONS
+
Function GetJRE
; based on http://nsis.sourceforge.net/Simple_Java_Runtime_Download_Script
- MessageBox MB_OK "YaCy uses Java ${JRE_VERSION6}. \
- It will now be downloaded and installed."
-
userInfo::getAccountType
Pop $0
StrCmp $0 "Admin" +3
MessageBox MB_ICONEXCLAMATION "You need Administrator privileges to install Java. \
It will now be downloaded to the shared documents folder. \
- YaCy won't run without Java."
+ YaCy won't run without Java." /SD IDOK
SetShellVarContext all
StrCpy $2 "$DOCUMENTS\Java Runtime Environment (install for YaCy).exe"
@@ -132,7 +244,7 @@ Function GetJRE
nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2
Pop $R0 ;Get the return value
StrCmp $R0 "success" +3
- MessageBox MB_OK "Download failed: $R0"
+ MessageBox MB_OK "Download failed: $R0" /SD IDOK
Return
StrCmp $0 "Admin" +3
CreateShortCut "$DESKTOP\Install Java for YaCy.lnk" "$2"
diff --git a/build.xml b/build.xml
index d00236a27..66c4c0efd 100644
--- a/build.xml
+++ b/build.xml
@@ -1039,7 +1039,7 @@
-
+