[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8653: CLeaned up and works with mingw builds out of the box, mostl (tor/trunk/contrib)



Author: phobos
Date: 2006-10-08 16:36:31 -0400 (Sun, 08 Oct 2006)
New Revision: 8653

Modified:
   tor/trunk/contrib/package_nsis-mingw.sh
   tor/trunk/contrib/tor-mingw.nsi.in
Log:
CLeaned up and works with mingw builds out of the box, mostly.


Modified: tor/trunk/contrib/package_nsis-mingw.sh
===================================================================
--- tor/trunk/contrib/package_nsis-mingw.sh	2006-10-08 20:01:18 UTC (rev 8652)
+++ tor/trunk/contrib/package_nsis-mingw.sh	2006-10-08 20:36:31 UTC (rev 8653)
@@ -5,6 +5,7 @@
 # you know what you are doing.
 
 # Start in the tor source directory after you've compiled tor.exe
+# This means start as ./contrib/package_nsis-mingw.sh
 
 rm -rf win_tmp
 mkdir win_tmp
@@ -17,16 +18,18 @@
 mkdir win_tmp/src/config
 mkdir win_tmp/tmp
 
-cp src/or/tor.exe win_tmp/bin/tor.exe
-cp src/tools/tor_resolve.exe win_tmp/bin
-cp /usr/local/ssl/lib/libcrypto.a win_tmp/bin
-cp /usr/local/ssl/lib/libssl.a win_tmp/bin
+cp src/or/tor.exe win_tmp/bin/
+cp src/tools/tor-resolve.exe win_tmp/bin/
+cp /usr/local/ssl/lib/libcrypto.a win_tmp/bin/
+cp /usr/local/ssl/lib/libssl.a win_tmp/bin/
 
 # There is no man2html in mingw.  
 # Maybe we should add this into make dist instead.
-man2html doc/tor.1.in > win_tmp/tmp/tor-reference.html
-man2html doc/tor-resolve.1 > win_tmp/tmp/tor-resolve.html
+# One has to do this manually and cp it do the tor-source/doc dir
+#man2html doc/tor.1.in > win_tmp/tmp/tor-reference.html
+#man2html doc/tor-resolve.1 > win_tmp/tmp/tor-resolve.html
 
+
 clean_newlines() {
     perl -pe 's/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg;' $1 >$2
 }
@@ -35,25 +38,23 @@
     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
 }
 
-for fn in tor-spec.txt HACKING rend-spec.txt control-spec.txt \
-   tor-doc.html tor-doc.css version-spec.txt; do
+for fn in socks-extensions.txt dir-spec.txt tor-spec.txt HACKING rend-spec.txt control-spec.txt tor-doc.html tor-doc.css version-spec.txt; do
     clean_newlines doc/$fn win_tmp/doc/$fn
 done
 
 cp doc/design-paper/tor-design.pdf win_tmp/doc/design-paper/tor-design.pdf
 
-for fn in tor-reference.html tor-resolve.html; do \
-    clean_newlines win_tmp/tmp/$fn win_tmp/doc/$fn
+for fn in tor-reference.html tor-resolve.html; do 
+    clean_newlines doc/$fn win_tmp/doc/$fn
 done
 
-for fn in README AUTHORS ChangeLog LICENSE; do \
+for fn in README AUTHORS ChangeLog LICENSE; do 
     clean_newlines $fn win_tmp/$fn
 done
 
 clean_localstatedir src/config/torrc.sample.in win_tmp/src/config/torrc.sample
 
-cp contrib/tor.nsi win_tmp/contrib
+cp contrib/tor-mingw.nsi win_tmp/contrib/
 
-cd win_tmp/contrib
-C:\Program Files\NSIS\makensis.exe tor.nsi
-mv tor-*.exe ../..
+cd win_tmp
+"C:\Program Files\NSIS\makensis.exe" contrib/tor-mingw.nsi

Modified: tor/trunk/contrib/tor-mingw.nsi.in
===================================================================
--- tor/trunk/contrib/tor-mingw.nsi.in	2006-10-08 20:01:18 UTC (rev 8652)
+++ tor/trunk/contrib/tor-mingw.nsi.in	2006-10-08 20:36:31 UTC (rev 8653)
@@ -3,40 +3,14 @@
 ; See LICENSE for licencing information
 ;-----------------------------------------
 ;
-; How to make an installer:
-;   Step 0. If you are a Tor maintainer, make sure that tor.nsi and
-;           src/win32/orconfig.h all have the correct version number.
-;   Step 1. Download and install OpenSSL.  Make sure that the OpenSSL
-;           version listed below matches the one you downloaded.
-;   Step 2. Download and install NSIS (http://nsis.sourceforge.net)
-;   Step 3. Make a directory under the main tor directory called "bin".
-;   Step 4. Copy ssleay32.dll and libeay32.dll from OpenSSL into "bin".
-;   Step 5. Run man2html on tor.1.in; call the result tor-reference.html
-;           Run man2html on tor-resolve.1; call the result tor-resolve.html
-;   Step 6. Copy torrc.sample.in to torrc.sample.
-;   Step 7. Build tor.exe and tor_resolve.exe; save the result into bin.
-;   Step 8. cd into contrib and run "makensis tor.nsi".
-;
-; Problems:
-;   - Copying torrc.sample.in to torrc.sample and tor.1.in (implicitly)
-;     to tor.1 is a Bad Thing, and leaves us with @autoconf@ vars in the final
-;     result.
-;   - Building Tor requires too much windows C clue.
-;     - We should have actual makefiles for VC that do the right thing.
-;   - I need to learn more NSIS juju to solve these:
-;     - There should be a batteries-included installer that comes with
-;       privoxy too. (Check privoxy license on this; be sure to include
-;       all privoxy documents.)
-;   - The filename should probably have a revision number.
-
 !include "MUI.nsh"
 
-!define VERSION "0.1.2.1-alpha-dev"
+!define VERSION "%VERSION%"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "http://tor.eff.org/";
 
-!define LICENSE "..\LICENSE"
-;BIN is where it expects to find tor.exe, tor_resolve.exe, libcrypto.a
+!define LICENSE "LICENSE"
+;BIN is where it expects to find tor.exe, tor-resolve.exe, libcrypto.a
 ;and libssl.a
 !define BIN "..\bin"
 
@@ -91,7 +65,7 @@
    SectionIn RO
    SetOutPath $INSTDIR
    File "${BIN}\tor.exe"
-   File "${BIN}\tor_resolve.exe"
+   File "${BIN}\tor-resolve.exe"
    WriteIniStr "$INSTDIR\Tor Website.url" "InternetShortcut" "URL" ${WEBSITE}
 
    StrCpy $configfile "torrc"
@@ -121,7 +95,7 @@
 
 Section "Documents" Docs
    SetOutPath "$INSTDIR\Documents"
-   ;File "..\doc\FAQ"
+   ;File "doc\FAQ"
    File "..\doc\HACKING"
    File "..\doc\control-spec.txt"
    File "..\doc\dir-spec.txt"
@@ -178,7 +152,7 @@
    Delete "$INSTDIR\libcrypto.a"
    Delete "$INSTDIR\libssl.a"
    Delete "$INSTDIR\tor.exe"
-   Delete "$INSTDIR\tor_resolve.exe"
+   Delete "$INSTDIR\tor-resolve.exe"
    Delete "$INSTDIR\Tor Website.url"
    Delete "$INSTDIR\torrc"
    Delete "$INSTDIR\torrc.sample"