commit c23caf1f71f8281319cadf55002723dbcd333905 Author: David Fifield david@bamsoftware.com Date: Sat Apr 6 21:41:01 2013 -0700
Add bundle support for macosx-i686. --- doc/Makefile | 37 +++++++++++++++++++++++++++++++++++- doc/bundle-macosx.txt | 50 ++++++++++-------------------------------------- 2 files changed, 47 insertions(+), 40 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile index 9defe64..e0ae409 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,6 +9,7 @@ FLASHPROXY_DIST_WIN32 = $(FLASHPROXY_HOME)/dist/flashproxy-client-$(FLASHPROXY_V PYOBFSPROXY_HOME = $(HOME)/pyobfsproxy PYOBFSPROXY_DIST = $(PYOBFSPROXY_HOME) PYOBFSPROXY_DIST_WIN32 = $(PYOBFSPROXY_HOME)/py2exe_bundle/dist +MACOSX_BUNDLE_ROOT = $(HOME)/bundle
P7Z = /cygdrive/c/Program Files (x86)/7-Zip/7z P7ZG = /cygdrive/c/Program Files (x86)/7-Zip/7zg @@ -22,16 +23,19 @@ 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_MACOSX_I686 = TorBrowser-$(BUNDLE_VERSION_STRING)-osx-i386-en-US.zip 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_MACOSX_I686 = TorBrowser-Pluggable-Transports-$(BUNDLE_VERSION_STRING)-osx-i386-en-US.zip 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 macosx-i686' @echo $$'\tmake gnulinux-i686' @echo $$'\tmake gnulinux-x86_64' @echo @@ -43,11 +47,14 @@ all: @echo $$'\t"python setup_py2exe.py py2exe" in the pyobfsproxy directory'
windows: $(PT_BUNDLE_WINDOWS) +macosx-i686: $(PT_BUNDLE_MACOSX_I686) 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_MACOSX_I686): WORKDIR = work/macosx-$(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)
@@ -76,6 +83,31 @@ $(PT_BUNDLE_WINDOWS): cd "$(WORKDIR)" && "$(P7ZG)" a -sfx "$@" "Tor Browser" mv "$(WORKDIR)/$@" .
+$(PT_BUNDLE_MACOSX_I686): TBBDIR = $(WORKDIR)/TorBrowser_en-US.app +$(PT_BUNDLE_MACOSX_I686): + # Download and check signature. + $(MAKE) checksig-$(BUNDLE_MACOSX_I686) + + rm -rf "$(WORKDIR)" + mkdir -p "$(WORKDIR)" + unzip "$(BUNDLE_MACOSX_I686)" -d "$(WORKDIR)" + + cp "$(FLASHPROXY_DIST)"/{flashproxy-client,flashproxy-reg-email,flashproxy-reg-http,flashproxy-reg-url} "$(TBBDIR)"/Contents/MacOS + cp -r "$(MACOSX_BUNDLE_ROOT)"/usr/lib/python2.7/site-packages/M2Crypto "$(TBBDIR)"/Contents/MacOS + mkdir -p "$(TBBDIR)"/Contents/Resources/Docs/FlashProxy + cp "$(FLASHPROXY_DIST)"/{doc/*,README,LICENSE,ChangeLog} "$(TBBDIR)"/Contents/Resources/Docs/FlashProxy + cp -r "$(PYOBFSPROXY_DIST)"/{obfsproxy,bin/pyobfsproxy} "$(TBBDIR)"/Contents/MacOs + cp -r "$(MACOSX_BUNDLE_ROOT)"/usr/lib/python2.7/site-packages/{Crypto,pyptlib} "$(TBBDIR)"/Contents/MacOS + cp "$(MACOSX_BUNDLE_ROOT)"/argparse-1.2.1/argparse.py "$(TBBDIR)"/Contents/MacOS + mkdir -p "$(TBBDIR)"/Contents/Resources/Docs/PyObfsproxy + cp "$(PYOBFSPROXY_DIST)"/{LICENSE,README} "$(TBBDIR)"/Contents/Resources/Docs/PyObfsproxy + find "$(TBBDIR)"/Contents/MacOS -name '*.pyc' | xargs rm -f + + cat bundle-torrc-macosx >> "$(TBBDIR)"/Library/Vidalia/torrc + + cd "$(WORKDIR)" && zip -r -9 "$@" TorBrowser_en-US.app/ + 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): @@ -106,6 +138,9 @@ $(PT_BUNDLE_GNULINUX_I686) $(PT_BUNDLE_GNULINUX_X86_64): $(BUNDLE_WINDOWS) $(BUNDLE_WINDOWS).asc: rm -f "$@" wget --no-clobber "$(BUNDLE_DIST_URL)/$@" +$(BUNDLE_MACOSX_I686) $(BUNDLE_MACOSX_I686).asc: + rm -f "$@" + curl -O "$(BUNDLE_DIST_URL)/osx/$@" $(BUNDLE_GNULINUX_I686) $(BUNDLE_GNULINUX_I686).asc \ $(BUNDLE_GNULINUX_X86_64) $(BUNDLE_GNULINUX_X86_64).asc: rm -f "$@" @@ -116,4 +151,4 @@ checksig-%: % %.asc
# Need Bash for certain wildcards. SHELL = /bin/bash -.PHONY: checksig-% windows gnulinux-i686 gnulinux-x86_64 +.PHONY: checksig-% windows macosx-i686 gnulinux-i686 gnulinux-x86_64 diff --git a/doc/bundle-macosx.txt b/doc/bundle-macosx.txt index dc3118e..0830511 100644 --- a/doc/bundle-macosx.txt +++ b/doc/bundle-macosx.txt @@ -81,45 +81,17 @@ Clone pyobfsproxy.
$ git clone https://git.torproject.org/pluggable-transports/pyobfsproxy.git
-Download the 32-bit 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-torbrowserbu.... +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/osx/TorBrowser-2.4.11-alpha-1-osx... -https://www.torproject.org/dist/torbrowser/osx/TorBrowser-2.4.11-alpha-1-osx... + $ make macosx-i686
-Extract the bundle. - - $ gpg --verify TorBrowser-2.4.11-alpha-1-osx-i386-en-US.zip.asc - $ rm -r TorBrowser_en-US.app - $ unzip TorBrowser-2.4.11-alpha-1-osx-i386-en-US.zip - -Copy files into the bundle. - - $ cd TorBrowser_en-US.app - $ cp ~/flashproxy/dist/flashproxy-client-VERSION/{flashproxy-client,flashproxy-reg-email,flashproxy-reg-http,flashproxy-reg-url} Contents/MacOS - $ cp -r ~/bundle/usr/lib/python2.7/site-packages/M2Crypto Contents/MacOS - $ mkdir -p Contents/Resources/Docs/FlashProxy - $ cp ~/flashproxy/dist/flashproxy-client-VERSION/{doc/*,README,LICENSE,ChangeLog} Contents/Resources/Docs/FlashProxy - $ cp -r ~/pyobfsproxy/{obfsproxy,bin/pyobfsproxy} Contents/MacOs - $ cp -r ~/bundle/usr/lib/python2.7/site-packages/{Crypto,pyptlib} Contents/MacOS - $ cp ~/bundle/argparse-1.2.1/argparse.py Contents/MacOS - $ mkdir -p Contents/Resources/Docs/PyObfsproxy - $ cp ~/pyobfsproxy/{LICENSE,README} Contents/Resources/Docs/PyObfsproxy - $ find Contents/MacOS -name '*.pyc' | xargs rm -f - -Append bundle-torrc-macosx to the end of Library/Vidalia/torrc. - - $ cat ~/flashproxy/doc/bundle-torrc-macosx >> Library/Vidalia/torrc - -Re-zip the bundle. The "alpha" number should be independent of the -browser bundle's alpha. - - $ cd .. - $ rm -f TorBrowser-Pluggable-Transports-2.4.11-alpha-1-osx-i386-en-US.zip - $ zip -r -9 TorBrowser-Pluggable-Transports-2.4.11-alpha-1-osx-i386-en-US.zip TorBrowser_en-US.app/ - -Test running the bundle. Extract into a separate directory, double-click -the icon to unzip, and run TorBrowser_en-US.app. - - $ mkdir tmp - $ cp TorBrowser-Pluggable-Transports-2.4.11-alpha-1-osx-i386-en-US.zip tmp +Test running the bundle.
tor-commits@lists.torproject.org