2004-11-14 19:50:06 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Script to package a Tor installer on win32. This script assumes that
|
|
|
|
# you have already built Tor, that you are running cygwin, and that your
|
|
|
|
# environment is basically exactly the same as Nick's.
|
|
|
|
|
|
|
|
rm -rf win_tmp
|
|
|
|
mkdir win_tmp
|
|
|
|
mkdir win_tmp/bin
|
|
|
|
mkdir win_tmp/contrib
|
|
|
|
mkdir win_tmp/doc
|
|
|
|
mkdir win_tmp/doc/design-paper
|
|
|
|
mkdir win_tmp/doc/contrib
|
|
|
|
mkdir win_tmp/src
|
|
|
|
mkdir win_tmp/src/config
|
2004-11-14 19:56:46 +01:00
|
|
|
mkdir win_tmp/tmp
|
2004-11-14 19:50:06 +01:00
|
|
|
|
2004-11-16 00:34:38 +01:00
|
|
|
cp Win32Build/vc7/Tor/Debug/Tor.exe win_tmp/bin/tor.exe
|
|
|
|
cp Win32Build/vc7/tor_resolve/Debug/tor_resolve.exe win_tmp/bin
|
2004-11-14 19:56:46 +01:00
|
|
|
cp c:/windows/system32/libeay32.dll win_tmp/bin
|
|
|
|
cp c:/windows/system32/ssleay32.dll win_tmp/bin
|
2004-11-14 19:50:06 +01:00
|
|
|
|
|
|
|
man2html doc/tor.1.in > win_tmp/tmp/tor-reference.html
|
|
|
|
man2html doc/tor-resolve.1 > win_tmp/tmp/tor-resolve.html
|
|
|
|
|
|
|
|
clean_newlines() {
|
2005-04-01 08:51:12 +02:00
|
|
|
perl -pe 's/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg;' $1 >$2
|
2005-03-23 22:28:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
clean_localstatedir() {
|
2005-04-01 08:51:12 +02:00
|
|
|
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
|
2004-11-14 19:50:06 +01:00
|
|
|
}
|
|
|
|
|
2005-07-15 01:32:01 +02:00
|
|
|
for fn in tor-spec.txt HACKING rend-spec.txt control-spec.txt \
|
2005-03-19 06:07:19 +01:00
|
|
|
tor-doc.html tor-doc.css version-spec.txt; do
|
2004-11-14 19:50:06 +01:00
|
|
|
clean_newlines doc/$fn win_tmp/doc/$fn
|
|
|
|
done
|
|
|
|
|
2004-11-14 19:56:46 +01:00
|
|
|
cp doc/design-paper/tor-design.pdf win_tmp/doc/design-paper/tor-design.pdf
|
|
|
|
|
2004-11-14 19:50:06 +01:00
|
|
|
for fn in tor-reference.html tor-resolve.html; do \
|
2004-11-14 19:56:46 +01:00
|
|
|
clean_newlines win_tmp/tmp/$fn win_tmp/doc/$fn
|
2004-11-14 19:50:06 +01:00
|
|
|
done
|
|
|
|
|
2004-11-14 19:56:46 +01:00
|
|
|
for fn in README AUTHORS ChangeLog LICENSE; do \
|
2004-11-14 19:50:06 +01:00
|
|
|
clean_newlines $fn win_tmp/$fn
|
|
|
|
done
|
|
|
|
|
2005-03-23 22:28:37 +01:00
|
|
|
clean_localstatedir src/config/torrc.sample.in win_tmp/src/config/torrc.sample
|
2004-11-14 19:50:06 +01:00
|
|
|
|
|
|
|
cp contrib/tor.nsi win_tmp/contrib
|
|
|
|
|
|
|
|
cd win_tmp/contrib
|
|
|
|
makensis tor.nsi
|
|
|
|
mv tor-*.exe ../..
|