Forward port changelog
[tor.git] / contrib / package_nsis.sh
blob770913f472d2c7f8b6254625e34c326dfa4be34b
1 #!/bin/sh
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.
7 rm -rf win_tmp
8 mkdir win_tmp
9 mkdir win_tmp/bin
10 mkdir win_tmp/contrib
11 mkdir win_tmp/doc
12 mkdir win_tmp/doc/design-paper
13 mkdir win_tmp/doc/contrib
14 mkdir win_tmp/src
15 mkdir win_tmp/src/config
16 mkdir win_tmp/tmp
18 cp Win32Build/vc7/Tor/Debug/Tor.exe win_tmp/bin/tor.exe
19 cp Win32Build/vc7/tor_resolve/Debug/tor_resolve.exe win_tmp/bin
20 cp c:/windows/system32/libeay32.dll win_tmp/bin
21 cp c:/windows/system32/ssleay32.dll win_tmp/bin
23 man2html doc/tor.1.in > win_tmp/tmp/tor-reference.html
24 man2html doc/tor-resolve.1 > win_tmp/tmp/tor-resolve.html
26 clean_newlines() {
27 perl -pe 'BEGIN {undef $;} s/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg;' $1 >$2
30 for fn in CLIENTS tor-spec.txt HACKING rend-spec.txt control-spec.txt \
31 tor-doc.html tor-doc.css; do
32 clean_newlines doc/$fn win_tmp/doc/$fn
33 done
35 cp doc/design-paper/tor-design.pdf win_tmp/doc/design-paper/tor-design.pdf
37 for fn in tor-reference.html tor-resolve.html; do \
38 clean_newlines win_tmp/tmp/$fn win_tmp/doc/$fn
39 done
41 for fn in README AUTHORS ChangeLog LICENSE; do \
42 clean_newlines $fn win_tmp/$fn
43 done
45 clean_newlines src/config/torrc.sample.in win_tmp/src/config/torrc.sample
47 cp contrib/tor.nsi win_tmp/contrib
49 cd win_tmp/contrib
50 makensis tor.nsi
51 mv tor-*.exe ../..