netinst.nsi 2.9 KB

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