aboutsummaryrefslogtreecommitdiff
path: root/contrib/bundle.nsi
blob: 55f6b5fa3044f006ceea799e7757e1397c3bdc13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
!include "MUI.nsh"
!include "LogicLib.nsh"
!include "FileFunc.nsh"
  
!define VERSION "0.2.1.13"
!define INSTALLER "TorBundle.exe"
!define WEBSITE "https://www.torproject.org/"
!define LICENSE "LICENSE"
 
SetCompressor /SOLID BZIP2
RequestExecutionLevel user
OutFile ${INSTALLER}
InstallDir "$LOCALAPPDATA\TorInstPkgs"
SetOverWrite on
Name "Tor ${VERSION} Bundle"
Caption "Tor ${VERSION} Bundle Setup"
BrandingText "Tor Bundle Installer"
CRCCheck on
XPStyle on
ShowInstDetails hide
VIProductVersion "${VERSION}"
VIAddVersionKey "ProductName" "Tor"
VIAddVersionKey "Comments" "${WEBSITE}"
VIAddVersionKey "LegalTrademarks" "Three line BSD"
VIAddVersionKey "LegalCopyright" "�2004-2011, Roger Dingledine, Nick Mathewson, The Tor Project, Inc."
VIAddVersionKey "FileDescription" "Tor is an implementation of Onion Routing. You can read more at ${WEBSITE}"
VIAddVersionKey "FileVersion" "${VERSION}"

!define MUI_ICON "torinst32.ico"
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

Section "Tor" Tor
	SectionIn RO
	SetOutPath $INSTDIR
	Call ExtractPackages
        Call RunInstallers
	Call LaunchVidalia
SectionEnd

Function ExtractPackages
	File "license.msi"
	File "tor.msi"
	File "torbutton.msi"
	File "thandy.msi"
	File "polipo.msi"
	File "vidalia.msi"
        File "tbcheck.bat"
FunctionEnd

Function RunInstallers
	ExecWait 'msiexec /i "$INSTDIR\license.msi" /qn'
	ExecWait 'msiexec /i "$INSTDIR\tor.msi" NOSC=1 /qn'
	ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
	ExecWait 'msiexec /i "$INSTDIR\polipo.msi" NOSC=1 /qn'
	ExecWait 'msiexec /i "$INSTDIR\torbutton.msi" /qn'
	ExecWait 'msiexec /i "$INSTDIR\vidalia.msi" /qn'
        ExpandEnvStrings $0 %COMSPEC%
        Exec '"$0" /C "$INSTDIR\tbcheck.bat"'
FunctionEnd

Function LaunchVidalia
	SetOutPath "$LOCALAPPDATA\Programs\Vidalia"
	Exec 'vidalia.exe -loglevel info -logfile log.txt'
FunctionEnd