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

[tor-commits] [flashproxy/master] Add bundle support for windows.



commit ba805fd2ff6860a9853ff5329ac527dd6a48f881
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sat Apr 6 19:32:51 2013 -0700

    Add bundle support for windows.
---
 doc/Makefile           |   44 ++++++++++++++++++++++++++++++++++++++++++--
 doc/bundle-windows.txt |   44 ++++++++++----------------------------------
 2 files changed, 52 insertions(+), 36 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index 06cc9e7..9defe64 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -5,8 +5,13 @@ PT_BUNDLE_RELEASE = pt1
 FLASHPROXY_HOME = $(HOME)/flashproxy
 FLASHPROXY_VERSION = 1.0
 FLASHPROXY_DIST = $(FLASHPROXY_HOME)/dist/flashproxy-client-$(FLASHPROXY_VERSION)
+FLASHPROXY_DIST_WIN32 = $(FLASHPROXY_HOME)/dist/flashproxy-client-$(FLASHPROXY_VERSION)-win32
 PYOBFSPROXY_HOME = $(HOME)/pyobfsproxy
 PYOBFSPROXY_DIST = $(PYOBFSPROXY_HOME)
+PYOBFSPROXY_DIST_WIN32 = $(PYOBFSPROXY_HOME)/py2exe_bundle/dist
+
+P7Z = /cygdrive/c/Program Files (x86)/7-Zip/7z
+P7ZG = /cygdrive/c/Program Files (x86)/7-Zip/7zg
 
 DOWNLOADDIR = download
 WORKDIR = work
@@ -16,29 +21,61 @@ BUNDLE_DIST_URL = https://www.torproject.org/dist/torbrowser
 BUNDLE_VERSION_STRING = $(BUNDLE_VERSION)-$(BUNDLE_RELEASE)
 PT_BUNDLE_VERSION_STRING = $(BUNDLE_VERSION)-$(BUNDLE_RELEASE)-$(PT_BUNDLE_RELEASE)
 
+BUNDLE_WINDOWS = tor-browser-$(BUNDLE_VERSION_STRING)_en-US.exe
 BUNDLE_GNULINUX_I686 = tor-browser-gnu-linux-i686-$(BUNDLE_VERSION_STRING)-dev-en-US.tar.gz
 BUNDLE_GNULINUX_X86_64 = tor-browser-gnu-linux-x86_64-$(BUNDLE_VERSION_STRING)-dev-en-US.tar.gz
 
+PT_BUNDLE_WINDOWS = tor-pluggable-transports-browser-$(PT_BUNDLE_VERSION_STRING)_en-US.exe
 PT_BUNDLE_GNULINUX_I686 = tor-pluggable-transports-browser-gnu-linux-i686-$(PT_BUNDLE_VERSION_STRING)-dev-en-US.tar.gz
 PT_BUNDLE_GNULINUX_X86_64 = tor-pluggable-transports-browser-gnu-linux-x86_64-$(PT_BUNDLE_VERSION_STRING)-dev-en-US.tar.gz
 
 all:
 	@echo "Try one of these:"
+	@echo $$'\tmake windows'
 	@echo $$'\tmake gnulinux-i686'
 	@echo $$'\tmake gnulinux-x86_64'
 	@echo
 	@echo "Configure version numbers at the top of this makefile."
-	@echo "Before starting, you need to run \"make dist\" in the flashproxy directory."
+	@echo "Before starting, you need to run:"
+	@echo $$'\t"make dist" in the flashproxy directory'
+	@echo "Or on Windows:"
+	@echo $$'\t"make dist-exe" in the flashproxy directory'
+	@echo $$'\t"python setup_py2exe.py py2exe" in the pyobfsproxy directory'
 
+windows: $(PT_BUNDLE_WINDOWS)
 gnulinux-i686: $(PT_BUNDLE_GNULINUX_I686)
 gnulinux-x86_64: $(PT_BUNDLE_GNULINUX_X86_64)
 
+$(PT_BUNDLE_WINDOWS): WORKDIR = work/windows-$(PT_BUNDLE_VERSION_STRING)
+
 $(PT_BUNDLE_GNULINUX_I686): WORKDIR = work/gnulinux-i686-$(PT_BUNDLE_VERSION_STRING)
 $(PT_BUNDLE_GNULINUX_I686): BUNDLE_GNULINUX = $(BUNDLE_GNULINUX_I686)
 
 $(PT_BUNDLE_GNULINUX_X86_64): WORKDIR = work/gnulinux-x86_64-$(PT_BUNDLE_VERSION_STRING)
 $(PT_BUNDLE_GNULINUX_X86_64): BUNDLE_GNULINUX = $(BUNDLE_GNULINUX_X86_64)
 
+$(PT_BUNDLE_WINDOWS): TBBDIR = $(WORKDIR)/Tor Browser
+$(PT_BUNDLE_WINDOWS):
+	# Download and check signature.
+	$(MAKE) checksig-$(BUNDLE_WINDOWS)
+
+	rm -rf "$(WORKDIR)"
+	mkdir -p "$(WORKDIR)"
+	"$(P7Z)" x -o"$(WORKDIR)" "$(BUNDLE_WINDOWS)"
+
+	cp -nr "$(FLASHPROXY_DIST_WIN32)"/{*.pyd,*.dll,*.exe,*.zip} "$(TBBDIR)"/App
+	mkdir -p "$(TBBDIR)"/Docs/FlashProxy
+	cp "$(FLASHPROXY_DIST_WIN32)"/{doc/*,README,LICENSE,ChangeLog} "$(TBBDIR)"/Docs/FlashProxy
+	cp -nr "$(PYOBFSPROXY_DIST_WIN32)"/{*.pyd,*.dll,*.exe,*.zip} "$(TBBDIR)"/App
+	mkdir -p "$(TBBDIR)"/Docs/PyObfsproxy
+	cp "$(PYOBFSPROXY_DIST)"/{LICENSE,README} "$(TBBDIR)"/Docs/PyObfsproxy
+
+	cat bundle-torrc-windows >> "$(TBBDIR)"/Data/Tor/torrc
+
+	# 7zg (as opposed to 7z) causes the self-extractor to show a GUI.
+	cd "$(WORKDIR)" && "$(P7ZG)" a -sfx "$@" "Tor Browser"
+	mv "$(WORKDIR)/$@" .
+
 # Shared GNU/Linux 32-bit and 64-bit target.
 $(PT_BUNDLE_GNULINUX_I686) $(PT_BUNDLE_GNULINUX_X86_64): TBBDIR = $(WORKDIR)/tor-browser_en-US
 $(PT_BUNDLE_GNULINUX_I686) $(PT_BUNDLE_GNULINUX_X86_64):
@@ -66,6 +103,9 @@ $(PT_BUNDLE_GNULINUX_I686) $(PT_BUNDLE_GNULINUX_X86_64):
 	tar czf "$@" -C "$(WORKDIR)" tor-browser_en-US
 
 # Download targets.
+$(BUNDLE_WINDOWS) $(BUNDLE_WINDOWS).asc:
+	rm -f "$@"
+	wget --no-clobber "$(BUNDLE_DIST_URL)/$@"
 $(BUNDLE_GNULINUX_I686) $(BUNDLE_GNULINUX_I686).asc \
 $(BUNDLE_GNULINUX_X86_64) $(BUNDLE_GNULINUX_X86_64).asc:
 	rm -f "$@"
@@ -76,4 +116,4 @@ checksig-%: % %.asc
 
 # Need Bash for certain wildcards.
 SHELL = /bin/bash
-.PHONY: checksig-% gnulinux-i686 gnulinux-x86_64
+.PHONY: checksig-% windows gnulinux-i686 gnulinux-x86_64
diff --git a/doc/bundle-windows.txt b/doc/bundle-windows.txt
index 859122e..f05c05b 100644
--- a/doc/bundle-windows.txt
+++ b/doc/bundle-windows.txt
@@ -180,42 +180,18 @@ Clone pyobfsproxy and run py2exe on it.
 	$ cd pyobfsproxy
 	$ /cygdrive/c/Python27/python.exe setup_py2exe.py py2exe
 
-Download the browser bundle from
+Enter the doc directory and edit the top of Makefile to set the version
+numbers you want to use.
+	BUNDLE_VERSION = ...
+	BUNDLE_RELEASE = ...
+	PT_BUNDLE_RELEASE = pt1
+The latest Tor Browser Bundle version number can be found at
 https://www.torproject.org/projects/torbrowser.html.en#Download-torbrowserbundlealpha.
+PT_BUNDLE_RELEASE release should increment each time you build a new
+bundle with the same BUNDLE_VERSION and BUNDLE_RELEASE, and be reset to
+"pt1" when either of those change.
 
-https://www.torproject.org/dist/torbrowser/tor-browser-2.4.11-alpha-1_en-US.exe
-https://www.torproject.org/dist/torbrowser/tor-browser-2.4.11-alpha-1_en-US.exe.asc
-
-Extract the bundle.
-
-	$ gpg --verify tor-browser-2.4.11-alpha-1_en-US.exe.asc
-	$ rm -r "Tor Browser"
-	$ "/cygdrive/c/Program Files (x86)/7-Zip/7z" x tor-browser-2.4.11-alpha-1_en-US.exe
-
-Copy files into the bundle. The -n option to cp prevents the existing
-LIBEAY32.dll and SSLEAY32.dll from being overwritten.
-
-	$ cd "Tor Browser"
-	$ cp -nr ~/flashproxy/dist/flashproxy-client-VERSION-win32/{*.pyd,*.dll,*.exe,*.zip} App
-	$ mkdir -p Docs/FlashProxy
-	$ cp ~/flashproxy/dist/flashproxy-client-VERSION-win32/{doc/*,README,LICENSE,ChangeLog} Docs/FlashProxy
-	$ cp -nr ~/pyobfsproxy/py2exe_bundle/dist/{*.pyd,*.dll,*.exe,*.zip} App
-	$ mkdir -p Docs/PyObfsproxy
-	$ cp ~/pyobfsproxy/{LICENSE,README} Docs/PyObfsproxy
-
-Append bundle-torrc-windows to the end of Data/Tor/torrc.
-
-	$ cat ~/flashproxy/doc/bundle-torrc-windows >> Data/Tor/torrc
-
-Re-zip the bundle. The "alpha" number should be independent of the
-browser bundle's alpha. The 7zg program (as opposed to 7z) causes the
-self-extractor to show a GUI.
-
-	$ cd ..
-	$ "/cygdrive/c/Program Files (x86)/7-Zip/7zg" a -sfx tor-pluggable-transports-browser-2.4.11-alpha-1_en-US.exe "Tor Browser"
+	$ make windows
 
 Test running the bundle. Extract into a separate directory, double-click
 the icon and "Start Tor Browser.exe".
-
-	$ mkdir tmp
-	$ cp tor-pluggable-transports-browser-2.4.11-alpha-1_en-US.exe tmp



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits