netinst.nsi 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. !include "MUI.nsh"
  2. !include "LogicLib.nsh"
  3. !include "FileFunc.nsh"
  4. !define VERSION "0.2.1.10"
  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 "thandy.msi"
  40. FunctionEnd
  41. Function RunInstallers
  42. ExecWait 'msiexec /i "$INSTDIR\thandy.msi" NOSC=1 /qn'
  43. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Tor Updates" /bundleinfo/tor/win32/'
  44. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
  45. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
  46. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
  47. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Tor Updates" /bundleinfo/tor/win32/'
  48. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Polipo Updates" /bundleinfo/polipo/win32/'
  49. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\TorButton Updates" /bundleinfo/torbutton/win32/'
  50. ExecWait '"$LOCALAPPDATA\Programs\Thandy\thandy.exe" update --install "--repo=$LOCALAPPDATA\Thandy\Vidalia Updates" /bundleinfo/vidalia/win32/'
  51. ExpandEnvStrings $0 %COMSPEC%
  52. Exec '"$0" /C "$INSTDIR\tbcheck.bat"'
  53. FunctionEnd
  54. Function LaunchVidalia
  55. SetOutPath "$LOCALAPPDATA\Programs\Vidalia"
  56. Exec 'vidalia.exe -loglevel info -logfile log.txt'
  57. FunctionEnd
  58. Function CleanUpTemp
  59. ExecWait '"del" "$INSTDIR\thandy.msi"'
  60. SetOutPath $TEMP
  61. RMDir /r $TEMP\TorInstTmp
  62. FunctionEnd