2007-11-14 22:18:48 -05:00
|
|
|
|
; Script generated with the Venis Install Wizard & modified by defnax
|
|
|
|
|
|
|
|
|
|
; Define your application name
|
|
|
|
|
!define APPNAME "RetroShare"
|
|
|
|
|
!define VERSION "0.3.52a"
|
|
|
|
|
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
|
|
|
|
|
|
|
|
|
; Main Install settings
|
|
|
|
|
Name "${APPNAMEANDVERSION}"
|
|
|
|
|
InstallDir "$PROGRAMFILES\RetroShare"
|
|
|
|
|
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
|
|
|
|
OutFile "RetroShare_${VERSION}_setup.exe"
|
|
|
|
|
BrandingText "${APPNAMEANDVERSION}"
|
|
|
|
|
; Use compression
|
|
|
|
|
SetCompressor LZMA
|
|
|
|
|
|
|
|
|
|
; Modern interface settings
|
2008-01-13 21:15:57 -05:00
|
|
|
|
!include Sections.nsh
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!include "MUI.nsh"
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
;Interface Settings
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!define MUI_ABORTWARNING
|
2008-01-13 17:48:38 -05:00
|
|
|
|
;!define MUI_HEADERIMAGE
|
|
|
|
|
;!define MUI_HEADERIMAGE_BITMAP "retroshare.bmp" ; optional
|
|
|
|
|
|
|
|
|
|
# MUI defines
|
|
|
|
|
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
|
|
|
|
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
|
|
|
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
2008-01-13 17:48:38 -05:00
|
|
|
|
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
|
|
|
|
!define MUI_FINISHPAGE_LINK_LOCATION "http://sourceforge.net/forum/forum.php?forum_id=618174"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\RetroShare.exe"
|
2008-01-13 17:48:38 -05:00
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
|
|
|
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
|
|
|
|
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
|
|
|
|
!define MUI_LANGDLL_REGISTRY_ROOT HKLM
|
|
|
|
|
!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
|
|
|
|
|
!define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Defines the un-/installer logo of RetroShare
|
2008-01-13 21:15:57 -05:00
|
|
|
|
!insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp"
|
2008-01-13 17:48:38 -05:00
|
|
|
|
!insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp"
|
|
|
|
|
|
|
|
|
|
; Set languages (first is default language)
|
|
|
|
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
|
|
|
ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll"
|
|
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
|
;Configuration
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
|
|
|
|
|
;!insertmacro MUI_RESERVEFILE_SPECIALBITMAP
|
|
|
|
|
|
|
|
|
|
LicenseLangString myLicenseData 1033 "license\license.txt"
|
|
|
|
|
LicenseLangString myLicenseData 1031 "license\license-GER.txt"
|
|
|
|
|
|
|
|
|
|
LicenseData $(myLicenseData)
|
|
|
|
|
|
|
|
|
|
# Installer pages
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
2008-01-13 17:48:38 -05:00
|
|
|
|
!insertmacro MUI_PAGE_LICENSE "$(myLicenseData)"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
# Installer languages
|
|
|
|
|
!insertmacro MUI_LANGUAGE English
|
|
|
|
|
!insertmacro MUI_LANGUAGE German
|
|
|
|
|
|
|
|
|
|
;Component-selection page
|
|
|
|
|
;Titles
|
|
|
|
|
|
|
|
|
|
LangString sec_main ${LANG_ENGLISH} "Program Files"
|
|
|
|
|
LangString sec_data ${LANG_ENGLISH} "Program Skins"
|
|
|
|
|
LangString sec_shortcuts ${LANG_ENGLISH} "Shortcuts"
|
|
|
|
|
LangString sec_link ${LANG_ENGLISH} "File Association"
|
|
|
|
|
LangString sec_autostart ${LANG_ENGLISH} "Auto Startup"
|
|
|
|
|
LangString DESC_sec_main ${LANG_ENGLISH} "Installs the RetroShare program files."
|
|
|
|
|
LangString DESC_sec_data ${LANG_ENGLISH} "Installs RetroShare Skins"
|
|
|
|
|
LangString DESC_sec_shortcuts ${LANG_ENGLISH} "Create RetroShare shortcut icons."
|
|
|
|
|
LangString DESC_sec_link ${LANG_ENGLISH} "Associate RetroShare with .pqi file extension"
|
|
|
|
|
LangString DESC_sec_autostart ${LANG_ENGLISH} "Auto-Run and Login at Startup"
|
|
|
|
|
LangString LANGUAGEID ${LANG_ENGLISH} "1033"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LangString sec_main ${LANG_GERMAN} "Programmdateien"
|
|
|
|
|
LangString sec_data ${LANG_GERMAN} "Programm Skins"
|
|
|
|
|
LangString sec_shortcuts ${LANG_GERMAN} "Shortcuts"
|
|
|
|
|
LangString sec_link ${LANG_GERMAN} ".pqi links annehmen"
|
|
|
|
|
LangString sec_autostart ${LANG_GERMAN} "AutoStart bei SystemStart"
|
|
|
|
|
LangString DESC_sec_main ${LANG_GERMAN} "Installiert die erforderlichen Programmdateien."
|
|
|
|
|
LangString DESC_sec_data ${LANG_GERMAN} "Installiert RetroShare Skins"
|
|
|
|
|
LangString DESC_sec_shortcuts ${LANG_GERMAN} "Erstellt eine RetroShare Verkn<6B>pfung als Desktop und/oder Schnellstart Icon."
|
|
|
|
|
LangString DESC_sec_link ${LANG_GERMAN} "RetroShare erlauben .pqi dateien anzunehmen"
|
|
|
|
|
LangString DESC_sec_autostart ${LANG_GERMAN} "AutoStart und Login bei Windows SystemStart"
|
|
|
|
|
LangString LANGUAGEID ${LANG_GERMAN} "1031"
|
|
|
|
|
|
|
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
LangString TEXT_FLocations_TITLE ${LANG_ENGLISH} "Choose Default Save Locations"
|
|
|
|
|
LangString TEXT_FLocations_SUBTITLE ${LANG_ENGLISH} "Choose the folders to save your downloads to."
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
Section $(sec_main) sec_main
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
; Set Section properties
|
|
|
|
|
SetOverwrite on
|
|
|
|
|
|
|
|
|
|
; Clears previous error logs
|
|
|
|
|
Delete "$INSTDIR\*.log"
|
|
|
|
|
|
|
|
|
|
; Set Section Files and Shortcuts
|
|
|
|
|
SetOutPath "$INSTDIR\"
|
|
|
|
|
File /r "release\*"
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
|
|
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
|
SectionEnd
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
Section $(sec_data) sec_data
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
; Set Section properties
|
|
|
|
|
SetOverwrite on
|
|
|
|
|
|
|
|
|
|
; Set Section Files and Shortcuts
|
|
|
|
|
SetOutPath "$APPDATA\RetroShare\"
|
2008-01-13 09:21:48 -05:00
|
|
|
|
;File /r "data\*"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
; We're not ready for external skins...
|
|
|
|
|
; Set Section qss
|
|
|
|
|
; SetOutPath "$INSTDIR\qss\"
|
|
|
|
|
; File /r release\qss\*.*
|
|
|
|
|
|
|
|
|
|
; Set Section skin
|
|
|
|
|
; SetOutPath "$INSTDIR\skin\"
|
|
|
|
|
; File /r release\skin\*.*
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
Section $(sec_link) sec_link
|
2007-11-14 22:18:48 -05:00
|
|
|
|
; Delete any existing keys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Write the file association
|
|
|
|
|
WriteRegStr HKCR .pqi "" retroshare
|
|
|
|
|
WriteRegStr HKCR retroshare "" "PQI File"
|
|
|
|
|
WriteRegBin HKCR retroshare EditFlags 00000100
|
|
|
|
|
WriteRegStr HKCR "retroshare\shell" "" open
|
|
|
|
|
WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\RetroShare.exe" "%1"`
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
SectionGroup $(sec_shortcuts) sec_shortcuts
|
|
|
|
|
Section StartMenu SEC0001
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
|
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
2008-01-13 21:15:57 -05:00
|
|
|
|
CreateShortCut "$SMPROGRAMS\${APPNAME}\$(^UninstallLink).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
2007-11-14 22:18:48 -05:00
|
|
|
|
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
Section Desktop SEC0002
|
|
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
Section Quicklaunchbar SEC0003
|
|
|
|
|
|
2008-01-13 09:21:48 -05:00
|
|
|
|
|
|
|
|
|
CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\RetroShare.exe" "" "$INSTDIR\RetroShare.exe" 0
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
2008-01-13 17:48:38 -05:00
|
|
|
|
SectionGroupEnd
|
2008-01-13 09:21:48 -05:00
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
Section $(sec_autostart) sec_autostart
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroRun" "$INSTDIR\${APPNAME}.exe -a"
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
Section -FinishSection
|
|
|
|
|
|
|
|
|
|
WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
|
|
|
|
|
WriteRegStr HKLM "Software\${APPNAME}" "Version" "${VERSION}"
|
|
|
|
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
|
|
|
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
|
|
|
|
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
|
;Descriptions
|
|
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
2008-01-13 17:48:38 -05:00
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_main} $(DESC_sec_main)
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_data} $(DESC_sec_data)
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_shortcuts} $(DESC_sec_shortcuts)
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_link} $(DESC_sec_link)
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${sec_autostart} $(DESC_sec_autostart)
|
2007-11-14 22:18:48 -05:00
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
|
|
|
|
|
|
|
|
;Uninstall section
|
|
|
|
|
Section "Uninstall"
|
|
|
|
|
|
|
|
|
|
; Remove file association registry keys
|
|
|
|
|
DeleteRegKey HKCR .pqi
|
|
|
|
|
DeleteRegKey HKCR retroshare
|
|
|
|
|
|
|
|
|
|
; Remove program/uninstall regsitry keys
|
|
|
|
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
|
|
|
|
DeleteRegKey HKLM SOFTWARE\${APPNAME}
|
|
|
|
|
|
|
|
|
|
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroRun"
|
|
|
|
|
|
|
|
|
|
; Remove files and uninstaller
|
|
|
|
|
Delete $INSTDIR\RetroShare.exe
|
|
|
|
|
Delete $INSTDIR\*.dll
|
|
|
|
|
Delete $INSTDIR\*.dat
|
|
|
|
|
Delete $INSTDIR\*.txt
|
|
|
|
|
Delete $INSTDIR\*.ini
|
|
|
|
|
Delete $INSTDIR\*.log
|
|
|
|
|
|
|
|
|
|
Delete $INSTDIR\uninstall.exe
|
|
|
|
|
|
|
|
|
|
; Remove the kadc.ini file.
|
|
|
|
|
; Don't remove the directory, otherwise
|
|
|
|
|
; we lose the XPGP keys.
|
|
|
|
|
; Should make this an option though...
|
|
|
|
|
Delete $APPDATA\RetroShare\kadc.ini
|
|
|
|
|
|
|
|
|
|
; Remove shortcuts, if any
|
|
|
|
|
Delete "$SMPROGRAMS\${APPNAME}\*.*"
|
|
|
|
|
|
2008-01-13 09:51:53 -05:00
|
|
|
|
; Remove desktop shortcut
|
2007-11-14 22:18:48 -05:00
|
|
|
|
Delete "$DESKTOP\${APPNAME}.lnk"
|
2008-01-13 09:51:53 -05:00
|
|
|
|
|
|
|
|
|
; Remove Quicklaunch shortcut
|
|
|
|
|
Delete "$QUICKLAUNCH\${APPNAME}.lnk"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
; Remove directories used
|
|
|
|
|
RMDir "$SMPROGRAMS\${APPNAME}"
|
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
Function .onInit
|
|
|
|
|
|
2008-01-13 17:48:38 -05:00
|
|
|
|
InitPluginsDir
|
|
|
|
|
Push $R1
|
2008-01-13 21:15:57 -05:00
|
|
|
|
File /oname=$PLUGINSDIR\spltmp.bmp "gui\images\splash.bmp"
|
2008-01-13 17:48:38 -05:00
|
|
|
|
advsplash::show 1200 1000 1000 -1 $PLUGINSDIR\spltmp
|
|
|
|
|
Pop $R1
|
|
|
|
|
Pop $R1
|
|
|
|
|
!insertmacro MUI_LANGDLL_DISPLAY
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
;This was written by Vytautas - http://nsis.sourceforge.net/archive/nsisweb.php?page=453
|
|
|
|
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "RetroShare") i .r1 ?e'
|
|
|
|
|
Pop $R0
|
|
|
|
|
StrCmp $R0 0 +3
|
|
|
|
|
MessageBox MB_OK "The ${APPNAME} installer is already running."
|
|
|
|
|
Abort
|
|
|
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 21:15:57 -05:00
|
|
|
|
# Installer Language Strings
|
|
|
|
|
# TODO Update the Language Strings with the appropriate translations.
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
2008-01-13 21:15:57 -05:00
|
|
|
|
LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall"
|
|
|
|
|
LangString ^UninstallLink ${LANG_GERMAN} "Deinstallieren"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; eof
|