package_nsis.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. #
  3. # Script to package a Tor installer on win32. This script assumes that
  4. # you have already built Tor, that you are running cygwin, and that your
  5. # environment is basically exactly the same as Nick's.
  6. rm -rf win_tmp
  7. mkdir win_tmp
  8. mkdir win_tmp/bin
  9. mkdir win_tmp/contrib
  10. mkdir win_tmp/doc
  11. mkdir win_tmp/doc/design-paper
  12. mkdir win_tmp/doc/contrib
  13. mkdir win_tmp/src
  14. mkdir win_tmp/src/config
  15. mkdir win_tmp/tmp
  16. cp Win32Build/vc7/Tor/Debug/Tor.exe win_tmp/bin/tor.exe
  17. cp Win32Build/vc7/tor_resolve/Debug/tor_resolve.exe win_tmp/bin
  18. cp c:/windows/system32/libeay32.dll win_tmp/bin
  19. cp c:/windows/system32/ssleay32.dll win_tmp/bin
  20. man2html doc/tor.1.in > win_tmp/tmp/tor-reference.html
  21. man2html doc/tor-resolve.1 > win_tmp/tmp/tor-resolve.html
  22. clean_newlines() {
  23. perl -pe 'BEGIN {undef $;} s/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg;' $1 >$2
  24. }
  25. for fn in CLIENTS tor-spec.txt HACKING rend-spec.txt control-spec.txt \
  26. tor-doc.html tor-doc.css; do
  27. clean_newlines doc/$fn win_tmp/doc/$fn
  28. done
  29. cp doc/design-paper/tor-design.pdf win_tmp/doc/design-paper/tor-design.pdf
  30. for fn in tor-reference.html tor-resolve.html; do \
  31. clean_newlines win_tmp/tmp/$fn win_tmp/doc/$fn
  32. done
  33. for fn in README AUTHORS ChangeLog LICENSE; do \
  34. clean_newlines $fn win_tmp/$fn
  35. done
  36. clean_newlines src/config/torrc.sample.in win_tmp/src/config/torrc.sample
  37. cp contrib/tor.nsi win_tmp/contrib
  38. cd win_tmp/contrib
  39. makensis tor.nsi
  40. mv tor-*.exe ../..