Jump to content

uTorrent Installer


SK

Recommended Posts

Since I can't find one I made a basic one for personal use. I guess there are simular people who would like an installer so ive decided to share it out.

If the dev team don't want me to do this please delete this thread and I will only use it for personal use.

Download Here

Link to comment
Share on other sites

Sure, ive actually edited it since posting the above so this script below is simular but adds some features.

;NSIS Modern User Interface
;uTorrent Script
;Written by SK

;--------------------------------
;Include Modern UI

!include "MUI.nsh"

;--------------------------------
;General

;Name and file
!define VERSION "1.1.3"
Name "uTorrent"
OutFile "uTorrent ${VERSION}.exe"

;Default installation folder
InstallDir "$PROGRAMFILESuTorrent"

;Get installation folder from registry if available
InstallDirRegKey HKCU "SoftwareuTorrent" ""

;--------------------------------
;Interface Settings

!define MUI_ICON "${NSISDIR}ContribGraphicsIconsorange-install.ico"
!define MUI_UNICON "${NSISDIR}ContribGraphicsIconsorange-uninstall.ico"

;Show warning message when attempting to close the installer
!define MUI_ABORTWARNING
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}ContribGraphicsHeaderorange.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}ContribGraphicsWizardorange.bmp"

;Don't jump to finish page when install is complete
!define MUI_FINISHPAGE_NOAUTOCLOSE

!define MUI_FINISH
!define MUI_FINISHPAGE_RUN_PARAMETERS "$INSTDIRuTorrent.exe"
!define MUI_HEADERIMAGE_UNBITMAP "${NSISDIR}ContribGraphicsHeaderorange-uninstall.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}ContribGraphicsWizardorange-uninstall.bmp"

;Don't jump to finish page when uninstall is complete
!define MUI_UNFINISHPAGE_NOAUTOCLOSE

;--------------------------------
;General Attributes

;Change installer branding text
BrandingText "uTorrent - v${VERSION}"

;Always show installtion details on install and uninstall
ShowInstDetails show
ShowUninstDetails show

;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

Section "uTorrent Executable" SecMain

SetOutPath "$INSTDIR"

;ADD YOUR OWN FILES HERE...
FILE uTorrent.exe

;Store installation folder
WriteRegStr HKCU "SoftwareuTorrent" "" $INSTDIR

;Create uninstaller
WriteUninstaller "$INSTDIRUninstall.exe"

;Disable user selection
SectionIn RO

SectionEnd


Section "Start Menu Shortcuts" SecStartMenu

CreateDirectory "$SMPROGRAMSuTorrent"
CreateShortCut "$SMPROGRAMSuTorrentuTorrent.lnk" "$INSTDIRuTorrent.exe" "" "$INSTDIRuTorrent.exe" 0
CreateShortCut "$SMPROGRAMSuTorrentUninstall.lnk" "$INSTDIRuninstall.exe" "" "$INSTDIRuninstall.exe" 0

SectionEnd

Section "Quick Launch Shortcuts" SecQuickLaunch

CreateShortcut "$QUICKLAUNCHuTorrent.lnk" "$INSTDIRuTorrent.exe" "" "$INSTDIRuTorrent.exe" 0

SectionEnd

;--------------------------------
;Discriptions Section

LangString DESC_SecMain ${LANG_ENGLISH} "Main Program files are mandatory"
LangString DESC_SecStartMenu ${LANG_ENGLISH} "Optional Start Menu Shortcuts"
LangString DESC_SecQuickLaunch ${LANG_ENGLISH} "Optional Quick Start Shortcut"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain)
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_SecStartMenu)
!insertmacro MUI_DESCRIPTION_TEXT ${SecQuickLaunch} $(DESC_SecQuickLaunch)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;--------------------------------
;Uninstaller Section

Section "Uninstall"

;ADD YOUR OWN FILES HERE...

Delete "$INSTDIRuTorrent.exe"
Delete "$INSTDIRUninstall.exe"


; Remove shortcuts, if any

Delete "$SMPROGRAMSuTorrent*.*"
Delete "$QUICKLAUNCHuTorrent.lnk"


; Remove directories used
RMDir "$SMPROGRAMSuTorrent"
RMDir "$INSTDIR"

DeleteRegKey /ifempty HKCU "SoftwareuTorrent"

SectionEnd

You could actually edit it and get rid of the modern UI to make a much smaller installer.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...