Update the bundle installers for the MSI packages; these probably belong with the...
[tor/rransom.git] / contrib / netinst.nsi
blobef93aa07003049ae1262927b6f6c6c61369a590b
1 !include "MUI.nsh"
2 !include "LogicLib.nsh"
3 !include "FileFunc.nsh"
5 !define VERSION "0.2.1.13"
6 !define INSTALLER "TorNetInstaller.exe"
7 !define WEBSITE "https://www.torproject.org/"
8 !define LICENSE "LICENSE"
10 SetCompressor /SOLID BZIP2
11 RequestExecutionLevel user
12 OutFile ${INSTALLER}
13 InstallDir "$TEMP\TorInstTmp"
14 SetOverWrite on
15 Name "Tor Network Installer"
16 Caption "Tor Network Installer"
17 BrandingText "Tor Network Installer"
18 CRCCheck on
19 XPStyle on
20 ShowInstDetails hide
21 VIProductVersion "${VERSION}"
22 VIAddVersionKey "ProductName" "Tor"
23 VIAddVersionKey "Comments" "${WEBSITE}"
24 VIAddVersionKey "LegalTrademarks" "Three line BSD"
25 VIAddVersionKey "LegalCopyright" "©2004-2009, Roger Dingledine, Nick Mathewson, The Tor Project, Inc."
26 VIAddVersionKey "FileDescription" "Tor is an implementation of Onion Routing. You can read more at ${WEBSITE}"
27 VIAddVersionKey "FileVersion" "${VERSION}"
29 !define MUI_ICON "torinst32.ico"
30 !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
31 !insertmacro MUI_PAGE_INSTFILES
32 !insertmacro MUI_LANGUAGE "English"
34 Section "Tor" Tor
35 SectionIn RO
36 SetOutPath $INSTDIR
37 Call ExtractPackages
38 Call RunInstallers
39 Call LaunchVidalia
40 Call CleanUpTemp
41 SectionEnd
43 Function ExtractPackages
44 File "license.msi"
45 File "thandy.msi"
46 FunctionEnd
48 Function RunInstallers
49 ExecWait 'msiexec /i "$INSTDIR\license.msi" /qn'
50 ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
51 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Tor Updates" /bundleinfo/tor/win32/'
52 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
53 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
54 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
55 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Tor Updates" /bundleinfo/tor/win32/'
56 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
57 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
58 ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
59 ExpandEnvStrings $0 %COMSPEC%
60 Exec '"$0" /C "$INSTDIR\tbcheck.bat"'
61 FunctionEnd
63 Function LaunchVidalia
64 SetOutPath "$LOCALAPPDATA\Programs\Vidalia"
65 Exec 'vidalia.exe -loglevel info -logfile log.txt'
66 FunctionEnd
68 Function CleanUpTemp
69 ExecWait '"del" "$INSTDIR\license.msi"'
70 ExecWait '"del" "$INSTDIR\thandy.msi"'
71 SetOutPath $TEMP
72 RMDir /r $TEMP\TorInstTmp
73 FunctionEnd