6 # Script to package a Tor installer on win32. This script assumes that
7 # you have already built Tor, that you are running cygwin, and that your
8 # environment is basically exactly the same as Nick's.
10 if ! [ -d Win32Build
] ||
! [ -d contrib
]; then
11 echo "No Win32Build and/or no contrib directory here. Are we in the right place?" >&2
20 mkdir win_tmp
/doc
/design-paper
21 mkdir win_tmp
/doc
/contrib
23 mkdir win_tmp
/src
/config
26 cp Win32Build
/vc
7/Tor
/Debug
/Tor.exe win_tmp
/bin
/tor.exe
27 cp Win32Build
/vc
7/tor_resolve
/Debug
/tor_resolve.exe win_tmp
/bin
28 cp ..
/c-windows-system32
/libeay32.dll win_tmp
/bin
29 cp ..
/c-windows-system32
/ssleay32.dll win_tmp
/bin
31 man2html
doc
/tor
.1.
in > win_tmp
/tmp
/tor-reference.html
32 man2html
doc
/tor-resolve
.1 > win_tmp
/tmp
/tor-resolve.html
35 perl
-pe 's/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg;' $1 >$2
38 clean_localstatedir
() {
39 perl
-pe 's/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg; s{\@LOCALSTATEDIR\@/(lib|log)/tor/}{C:\\Documents and Settings\\Application Data\\Tor\\}' $1 >$2
47 socks-extensions.txt \
54 tor-hidden-service.html \
55 tor-switchproxy.html \
58 clean_newlines
doc
/$fn win_tmp
/doc
/$fn
61 cp doc
/design-paper
/tor-design.pdf win_tmp
/doc
/design-paper
/tor-design.pdf
63 for fn
in tor-reference.html tor-resolve.html
; do \
64 clean_newlines win_tmp
/tmp
/$fn win_tmp
/doc
/$fn
67 for fn
in README AUTHORS ChangeLog LICENSE
; do \
68 clean_newlines
$fn win_tmp
/$fn
71 clean_localstatedir src
/config
/torrc.sample.
in win_tmp
/src
/config
/torrc.sample
73 cp contrib
/tor.nsi win_tmp
/contrib
79 echo ' cd \tor\win_tmp\contrib'
80 echo ' c:\programme\nsis\makensis tor.nsi'
81 echo ' move tor-*.exe ../../..'