[tor-commits] [torbrowser/master] update windows alpha makefile with Sebastian's stable TBB changes

erinn at torproject.org erinn at torproject.org
Fri Jul 13 11:55:45 UTC 2012


commit 78c122cefc948c255a7e20218085af2e8d1bc1f9
Author: Erinn Clark <erinn at torproject.org>
Date:   Fri Jul 13 13:51:41 2012 +0200

    update windows alpha makefile with Sebastian's stable TBB changes
---
 build-scripts/windows-alpha.mk |  308 ++++++++++++++-------------------------
 1 files changed, 111 insertions(+), 197 deletions(-)

diff --git a/build-scripts/windows-alpha.mk b/build-scripts/windows-alpha.mk
index 258e743..c12230c 100644
--- a/build-scripts/windows-alpha.mk
+++ b/build-scripts/windows-alpha.mk
@@ -1,154 +1,125 @@
 ###
-### Makefile for building Tor USB bundle on Mac OS X
+### Makefile for building Tor USB bundle on Windows
 ###
 ### Copyright 2007 Steven J. Murdoch <http://www.cl.cam.ac.uk/users/sjm217/>
 ### Copyright 2009, 2010 Jacob Appelbaum <jacob at appelbaum.net>
 ### Copyright 2010 Erinn Clark <erinn at torproject.org>
 ###
-### You want to do the following currently supported activities:
-# This downloads and compiles everything
-### make -f windows-alpha.mk build-all-binaries
-# This makes a generic bundle
-### make -f windows-alpha.mk generic-bundle
-# This makes the English bundle
-### make -f windows-alpha.mk bundle_en-US
-# This makes the German bundle
-### make -f windows-alpha.mk bundle_de
-# This makes the German compressed bundle
-### make -f windows-alpha.mk compressed-bundle_de
-# It's possible you may also want to do:
-### make -f windows-alpha.mk build-all-binaries
-### make -f windows-alpha.mk all-compressed-bundles
-### ...
-### Look in tbbwin-alpha-dist/ for your files.
-###
 ### See LICENSE for licensing information
 ###
 
+
 #####################
 ### Configuration ###
 #####################
 
-## Include versions
-include $(PWD)/versions-alpha.mk
-BUILD_NUM=2
+BUILD_NUM=1
 PLATFORM=Windows
 
 ## Location of required libraries
-MING=/c/MinGW/bin
+MING=/mingw/bin
 QT_LIB=/c/Qt/$(QT_VER)/bin
 OPENSSL_LIB=$(COMPILED_BINS)
-WIX_LIB="/c/Program Files (x86)/Windows Installer XML v3.5/bin"
+WIX_LIB="$(MOZBUILD_DIR)/wix-351728"
 
 ## Location of bundle components
-VIDALIA=$(FETCH_DIR)/vidalia-$(VIDALIA_VER)
-TOR=$(FETCH_DIR)/tor-$(TOR_VER)
-FIREFOX=$(FETCH_DIR)/FirefoxPortable-$(FIREFOX_VER)
-PIDGIN=$(FETCH_DIR)/PidginPortable-$(PIDGIN_VER)
+VIDALIA=$(BUILD_DIR)/vidalia-$(VIDALIA_VER)
+TOR=$(BUILD_DIR)/tor-$(TOR_VER)
+FIREFOX=$(BUILD_DIR)/FirefoxPortable-$(FIREFOX_VER)
+PIDGIN=$(BUILD_DIR)/PidginPortable-$(PIDGIN_VER)
+VIDALIA_PLUGINS=$(BUILD_DIR)/vidalia-plugins
 
 ## Location of utility applications
 PWD:=$(shell pwd)
-PYTHON=/c/Python26/python.exe
-SEVENZIP="/c/Program Files/7-Zip/7z.exe"
-PYGET=$(PYTHON) $(PWD)/pyget.py
+PYTHON=$(MOZBUILD_DIR)/python/python.exe
+PYMAKE=$(PYMAKE_DIR)/make.py
+SEVENZIP="$(MOZBUILD_DIR)/7zip/7z.exe"
 WGET=wget
 VIRUSSCAN=$(PYTHON) $(PWD)/virus-scan.py
-WINRAR="/c/Program Files (x86)/WinRAR/WinRAR.exe"
 CC=gcc
 
 MSVC_VER=9
-FIREFOX_DIR=/c/build/mozilla-build/mozilla-release
-MOZ_BUILD=/c/build/mozilla-build
+
+## Build machine specific settings
+# Number of cpu cores used to build in parallel
+NUM_CORES=2
 
 ## Location of directory for source unpacking
-FETCH_DIR=$(PWD)/build-alpha-windows
+FETCH_DIR=$(PWD)/build-alpha
+## Location of directory for source unpacking/building
+## This must be different from FETCH_DIR
+BUILD_DIR=$(FETCH_DIR)/build
 ## Location of directory for prefix/destdir/compiles/etc
-BUILT_DIR=$(FETCH_DIR)/built
+BUILT_DIR=$(BUILD_DIR)/built
 TBB_FINAL=$(BUILT_DIR)/tbbwin-alpha-dist
 
-source-dance: fetch-source unpack-source
-	echo "We're ready for building now."
-
-ZLIB_DIR=$(FETCH_DIR)/zlib-$(ZLIB_VER)
-build-zlib:
-	cp ../src/current-patches/zlib/* $(ZLIB_DIR)
-	cp patch-any-src.sh $(ZLIB_DIR)
-	cd $(ZLIB_DIR) && ./patch-any-src.sh
-	cd $(ZLIB_DIR) && sed -i -e "s%prefix = /usr/local%prefix = ${BUILT_DIR}%" win32/Makefile.gcc
-	cd $(ZLIB_DIR) && make -f win32/Makefile.gcc
-	cd $(ZLIB_DIR) && make -f win32/Makefile.gcc install
-
-OPENSSL_DIR=$(FETCH_DIR)/openssl-$(OPENSSL_VER)
-OPENSSL_OPTS=-no-idea -no-rc5 -no-md2 shared zlib --prefix=$(BUILT_DIR) --openssldir=$(BUILT_DIR) -L$(BUILT_DIR)/lib -Wl,--nxcompat -Wl,--dynamicbase -I$(BUILT_DIR)/include
-build-openssl:
+## Include versions (must happen after variable definitions above
+include $(PWD)/versions-alpha.mk
+
+ZLIB_OPTS=prefix="$(BUILT_DIR)" BINARY_PATH="$(BUILT_DIR)/bin" INCLUDE_PATH="$(BUILT_DIR)/include" LIBRARY_PATH="$(BUILT_DIR)/lib"
+build-zlib: $(ZLIB_DIR)
+	cd $(ZLIB_DIR) && LDFLAGS="-Wl,--nxcompat -Wl,--dynamicbase" make -f win32/Makefile.gcc -j $(NUM_CORES)
+	cd $(ZLIB_DIR) && $(ZLIB_OPTS) make -f win32/Makefile.gcc install
+	touch $(STAMP_DIR)/build-zlib
+
+OPENSSL_OPTS=-no-idea -no-rc5 -no-md2 no-shared zlib --prefix=$(BUILT_DIR) --openssldir=$(BUILT_DIR) -L$(BUILT_DIR)/lib -Wl,--nxcompat -Wl,--dynamicbase -I$(BUILT_DIR)/include
+build-openssl: build-zlib $(OPENSSL_DIR)
 	cd $(OPENSSL_DIR) && ./config $(OPENSSL_OPTS)
 	cd $(OPENSSL_DIR) && make depend
 	cd $(OPENSSL_DIR) && make
-	cd $(OPENSSL_DIR) && make install
-
-VIDALIA_DIR=$(FETCH_DIR)/vidalia-$(VIDALIA_VER)
-VIDALIA_OPTS=-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -Wl,--nxcompat -Wl,--dynamicbase" -DWIN2K=1 -DQT_MAKE_EXECUTABLE=/c/Qt/$(QT_VER)/bin/qmake -DCMAKE_BUILD_TYPE=minsizerel -DMINGW_BINARY_DIR=$(MING) -DOPENSSL_BINARY_DIR=$(OPENSSL) -DWIX_BINARY_DIR=$(WIX_LIB) -DTOR_SOURCE_DIR=$(TOR_DIR) -DSCRIPT_DIR=$(QTSCRIPT_DIR)/plugins/script
-build-vidalia:
+	cd $(OPENSSL_DIR) && make install_sw
+	touch $(STAMP_DIR)/build-openssl
+
+QT_BUILD_PREFS=-system-zlib -confirm-license -opensource -openssl-linked -no-qt3support -fast -release -nomake demos -nomake examples
+QT_OPTS=$(QT_BUILD_PREFS) -prefix $(BUILT_DIR) -I $(BUILT_DIR)/include -I $(BUILT_DIR)/include/openssl/ -L$(BUILT_DIR)/lib
+build-qt: build-zlib build-openssl $(QT_DIR)
+	cd $(QT_DIR) && ./configure $(QT_OPTS)
+	cd $(QT_DIR) && make -j $(NUM_CORES)
+	cd $(QT_DIR) && make install
+	touch $(STAMP_DIR)/build-qt
+
+VIDALIA_OPTS=-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -Wl,--nxcompat -Wl,--dynamicbase" -DWIN2K=1 -DQT_QMAKE_EXECUTABLE=$(QT_LIB)/qmake -DCMAKE_BUILD_TYPE=minsizerel -DMINGW_BINARY_DIR=$(MING) -DWIX_BINARY_DIR=$(WIX_LIB) -DSCRIPT_DIR=$(QTSCRIPT_DIR)/plugins/script -DTOR_SOURCE_DIR=$(TOR_DIR)/src/or
+# XXX Once we build qt on windows, we'll want to add build-qt here
+build-vidalia: PATH+=:$(QT_LIB)
+build-vidalia: $(VIDALIA_DIR) $(WIX_LIB)
 	-mkdir $(VIDALIA_DIR)/build
 	cd $(VIDALIA_DIR)/build && cmake -G "MSYS Makefiles" $(VIDALIA_OPTS) ..
-	cd $(VIDALIA_DIR)/build && make
-
-QTSCRIPT_DIR=$(FETCH_DIR)/qtscriptgenerator
-QTSCRIPT_OPTS=
-build-qtscript:
-	cd $(QTSCRIPT_DIR)/generator && qmake
-	cd $(QTSCRIPT_DIR)/generator && make -j4
-	cd $(QTSCRIPT_DIR)/generator && ./generator --include-paths=/c/Qt/2010.04/qt
-	cp ../src/current-patches/qt/000* $(QTSCRIPT_DIR)/qtbindings/qtscript_uitools
-	cp patch-any-src.sh $(QTSCRIPT_DIR)/qtbindings/qtscript_uitools
-	cd $(QTSCRIPT_DIR)/qtbindings/qtscript_uitools && ./patch-any-src.sh
-	cd $(QTSCRIPT_DIR)/generator && qmake -spec win32-g++
-	cd $(QTSCRIPT_DIR)/generator && make -j4
-	cd $(QTSCRIPT_DIR)/qtbindings && qmake -recursive CONFIG+="release"
-
-build-qtfoo:
-	cd $(QTSCRIPT_DIR)/qtbindings && for i in $(ls -d qtscript_*); do make -C $i release; done
-
-LIBEVENT_DIR=$(FETCH_DIR)/libevent-$(LIBEVENT_VER)
-LIBEVENT_CFLAGS="-I$(BUILT_DIR)/include -O -g"
+	cd $(VIDALIA_DIR)/build && make -j $(NUM_CORES)
+	touch $(STAMP_DIR)/build-vidalia
+
+QTSCRIPT_DIR=$(BUILD_DIR)/qtscriptgenerator
+
+LIBEVENT_CFLAGS="-I$(BUILT_DIR)/include"
 LIBEVENT_LDFLAGS="-L$(BUILT_DIR)/lib -L$(BUILT_DIR)/bin -Wl,--nxcompat -Wl,--dynamicbase"
 LIBEVENT_OPTS=--prefix=$(BUILT_DIR) --enable-static --disable-shared --disable-dependency-tracking
-build-libevent:
+build-libevent: build-zlib build-openssl $(LIBEVENT_DIR)
 	cd $(LIBEVENT_DIR) && CFLAGS=$(LIBEVENT_CFLAGS) LDFLAGS=$(LIBEVENT_LDFLAGS) ./configure $(LIBEVENT_OPTS)
-	cd $(LIBEVENT_DIR) && make -j2
+	cd $(LIBEVENT_DIR) && make -j $(NUM_CORES)
 	cd $(LIBEVENT_DIR) && make install
+	touch $(STAMP_DIR)/build-libevent
 
-TOR_DIR=$(FETCH_DIR)/tor-$(TOR_VER)
-TOR_CFLAGS="-O -g -I$(BUILT_DIR)/include"
+TOR_CFLAGS="-I$(BUILT_DIR)/include"
 TOR_LDFLAGS="-L$(BUILT_DIR)/lib -L$(BUILT_DIR)/bin"
-TOR_OPTS=--enable-gcc-warnings --enable-static-libevent --with-libevent-dir=$(BUILT_DIR)/lib --prefix=$(BUILT_DIR)
+TOR_OPTS=--enable-static-libevent --with-libevent-dir=$(BUILT_DIR)/lib --disable-asciidoc
 build-tor:PATH+=:$(BUILT_DIR)/bin
-build-tor:
-	cd $(TOR_DIR) && CFLAGS=$(TOR_CFLAGS) LDFLAGS=$(TOR_LDFLAGS) ./configure $(TOR_OPTS)
-	cd $(TOR_DIR) && make
-#	cd $(TOR_DIR) && make install
-
-patch-mozbuild:
-	cp ../src/current-patches/mozilla-build/start-msvc.patch $(MOZ_BUILD)
-	cp ../src/current-patches/mozilla-build/guess-msvc-x64.bat $(MOZ_BUILD)
-	cp patch-mozilla-build.sh $(MOZ_BUILD)
-	cd $(MOZ_BUILD) && ./patch-mozilla-build.sh $(MSVC_VER)
-	cp $(CONFIG_SRC)/dot_mozconfig $(FIREFOX_DIR)/mozconfig
-
-patch-firefox-source:
-	cp ../src/current-patches/firefox/* $(FIREFOX_DIR)
-	cp patch-any-src.sh $(FIREFOX_DIR)
-	cd $(FIREFOX_DIR) && ./patch-any-src.sh
-
-build-firefox:
-	cd $(MOZ_BUILD) && cmd.exe /c "start-msvc$(MSVC_VER).bat $(FIREFOX_DIR)"
+
+build-obfsproxy:
+	cd $(OBFSPROXY_DIR) && libevent_CFLAGS=-I$(BUILT_DIR)/include libevent_LIBS="-L$(BUILT_DIR)/lib -levent" libcrypto_CFLAGS=-I$(BUILT_DIR)/include/openssl libcrypto_LIBS="-L$(BUILT_DIR)/lib -lssl -lcrypto" ./configure --prefix=$(BUILT_DIR)
+	cd $(OBFSPROXY_DIR) && make
+	cd $(OBFSPROXY_DIR) && make install
+
+build-firefox: $(FIREFOX_DIR) config/dot_mozconfig $(MOZBUILD_DIR) $(MOZBUILD_DIR)/start-msvc$(MSVC_VER).bat | $(PYTHON) $(PYMAKE_DIR)
+	cp config/dot_mozconfig $(FIREFOX_DIR)/mozconfig
+	cp branding/* $(FIREFOX_DIR)/browser/branding/official
+	cd $(MOZBUILD_DIR) && cmd.exe /c "start-msvc$(MSVC_VER).bat $(FIREFOX_DIR) $(PYTHON) $(PYMAKE)"
+	touch $(STAMP_DIR)/build-firefox
 
 copy-firefox:
 	-rm -rf $(FIREFOX)
 	-mkdir -p $(FIREFOX)
 	cp -r config/firefox-portable/* $(FIREFOX)
 	cp "/c/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86/Microsoft.VC90.CRT/"msvc*90.dll $(FIREFOX)/App/Firefox
-	cp -r $(FIREFOX_DIR)/obj-*/dist/bin/* $(FIREFOX)/App/Firefox
+	cp -r $(FIREFOX_DIR)/obj-*/dist/firefox/* $(FIREFOX)/App/Firefox
 
 build-all-binaries: build-zlib build-openssl build-vidalia build-libevent build-tor build-firefox copy-firefox
 	echo "If we're here, we've done something right."
@@ -165,12 +136,6 @@ ZLIB=$(COMPILED_LIBS)
 LIBEVENT=$(COMPILED_LIBS)
 
 
-## Size of split archive volumes for WinRAR
-SPLITSIZE=1440k
-
-## Location of config files
-CONFIG_SRC=config
-
 ## Destination for the generic bundle
 DEST="Generic Bundle"
 
@@ -197,7 +162,7 @@ endif
 DEFAULT_EXTENSIONS=torbutton.xpi
 
 ## Where to download Mozilla language packs
-MOZILLA_LANGUAGE=http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VER)/win32/xpi
+MOZILLA_LANGUAGE=https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VER)/win32/xpi
 
 ## Put more extensions here
 EXTENSIONS_DIR=extensions
@@ -221,7 +186,7 @@ all-bundles-both:
 	USE_PIDGIN=0 make -f windows-alpha.mk all-bundles
 	make -f windows-alpha.mk clean
 
-all-bundles: all-compressed-bundles all-split-bundles
+all-bundles: all-compressed-bundles
 
 all-compressed-bundles: compressed-bundle_ar \
 	compressed-bundle_de \
@@ -229,25 +194,14 @@ all-compressed-bundles: compressed-bundle_ar \
 	compressed-bundle_es-ES \
 	compressed-bundle_fa \
 	compressed-bundle_fr \
+	compressed-bundle_it \
+	compressed-bundle_ko \
 	compressed-bundle_nl \
 	compressed-bundle_pl \
 	compressed-bundle_pt-PT \
 	compressed-bundle_ru \
-	compressed-bundle_zh-CN \
-	compressed-bundle_it
-
-all-split-bundles: split-bundle_ar \
-	split-bundle_de \
-	split-bundle_en-US \
-	split-bundle_es-ES \
-	split-bundle_fa \
-	split-bundle_fr \
-	split-bundle_nl \
-	split-bundle_pl \
-	split-bundle_pt-PT \
-	split-bundle_ru \
-	split-bundle_zh-CN \
-	split-bundle_it
+	compressed-bundle_vi \
+	compressed-bundle_zh-CN
 
 ##
 ## Cleanup
@@ -258,22 +212,21 @@ clean:
 	rm -f *~
 	rm -fr *.xpi *.jar *.zip
 	rm -fr $(NAME)_*
+	rm -f $(STAMP_DIR)/*.stamp
 	cd ../src/RelativeLink/ && $(MAKE) clean
 
 ## Also remove the output files
 reallyclean: clean
 	rm -fr $(IM_COMPRESSED_BASENAME)*_*.exe
 	rm -fr $(IM_COMPRESSED_BASENAME)*_*.rar
-	rm -fr $(IM_COMPRESSED_BASENAME)*_*_split
 	rm -fr $(DEFAULT_COMPRESSED_BASENAME)*_*.exe
 	rm -fr $(DEFAULT_COMPRESSED_BASENAME)*_*.rar
-	rm -fr $(DEFAULT_COMPRESSED_BASENAME)*_*_split
 
 ##
 ## Scan .exe files against VirusTotal to check for false positives
 ##
 
-virus-scan:
+virus-scan: | $(PYTHON)
 	$(VIRUSSCAN) $(VIDALIA)/build/src/vidalia/vidalia.exe
 	$(VIRUSSCAN) $(TOR)/src/or/tor.exe
 
@@ -285,7 +238,7 @@ virus-scan:
 generic-bundle.stamp:
 	make -f windows-alpha.mk generic-bundle
 generic-bundle: directory-structure install-binaries install-docs install-firefoxportable install-pidginportable configure-apps launcher
-	touch generic-bundle.stamp
+	touch $(STAMP_DIR)/generic-bundle.stamp
 
 APPDIR=$(DEST)/App
 DOCSDIR=$(DEST)/Docs
@@ -302,13 +255,18 @@ directory-structure:
 ## Filenames extracted using Dependency Walker <http://www.dependencywalker.com/>
 install-binaries:
 	cp $(MING)/mingwm10.dll $(APPDIR)
-	cp $(MING)/libgnurx-0.dll $(APPDIR)
-	cp $(QT_LIB)/QtScript4.dll $(QT_LIB)/QtCore4.dll $(QT_LIB)/QtGui4.dll $(QT_LIB)/QtNetwork4.dll $(QT_LIB)/QtXml4.dll $(QT_LIB)/libgcc_s_dw2-1.dll $(APPDIR) 
+	cp $(QT_LIB)/QtCore4.dll $(QT_LIB)/QtGui4.dll $(QT_LIB)/QtNetwork4.dll $(QT_LIB)/QtXml4.dll $(QT_LIB)/libgcc_s_dw2-1.dll $(APPDIR)
 	cp $(OPENSSL_LIB)/ssleay32.dll $(APPDIR)
 	cp $(OPENSSL_LIB)/libeay32.dll $(APPDIR)
 	cp $(VIDALIA)/build/src/vidalia/vidalia.exe $(APPDIR)
 	cp $(TOR)/src/or/tor.exe $(APPDIR)
 
+install-plugins:
+	mkdir -p $(DATADIR)/Vidalia/plugins
+	cp -r $(VIDALIA_PLUGINS)/tbb $(DATADIR)/Vidalia/plugins
+	mkdir -p $(APPDIR)/script
+	cp $(QTSCRIPT_DIR)/plugins/script/*.dll $(APPDIR)/script
+
 ## Fixup
 ## Collect up license files
 install-docs:
@@ -337,37 +295,34 @@ endif
 configure-apps:
 
 	mkdir -p $(DEST)/FirefoxPortable/Data/profile
+	mkdir -p $(DEST)/FirefoxPortable/App/DefaultData/profile
 	## Configure Firefox preferences
-	cp $(CONFIG_SRC)/windows-4.0.js $(DEST)/FirefoxPortable/App/DefaultData/profile/prefs.js
-	cp $(CONFIG_SRC)/windows-4.0.js $(DEST)/FirefoxPortable/Data/profile/prefs.js
-	cp $(CONFIG_SRC)/bookmarks.html $(DEST)/FirefoxPortable/App/DefaultData/profile/
+	cp config/prefs.js $(DEST)/FirefoxPortable/App/DefaultData/profile/prefs.js
+	cp config/prefs.js $(DEST)/FirefoxPortable/Data/profile/prefs.js
+	cp config/bookmarks.html $(DEST)/FirefoxPortable/App/DefaultData/profile/
 
 	## Set up alternate launcher
 	mv $(DEST)/FirefoxPortable/App/Firefox/firefox.exe $(DEST)/FirefoxPortable/App/Firefox/tbb-firefox.exe
 
 	## Configure FirefoxPortable
-	cp $(CONFIG_SRC)/FirefoxPortable.ini $(DEST)/FirefoxPortable
-	cp $(CONFIG_SRC)/FirefoxPortableSettings.ini $(DEST)/FirefoxPortable/Data/settings
+	cp config/FirefoxPortable.ini $(DEST)/FirefoxPortable
+	cp config/FirefoxPortableSettings.ini $(DEST)/FirefoxPortable/Data/settings
 
 	## Configure PidginPortable
 ifeq ($(USE_PIDGIN),1)
-	cp $(CONFIG_SRC)/PidginPortable.ini $(DEST)/PidginPortable
+	cp config/PidginPortable.ini $(DEST)/PidginPortable
 	mkdir -p $(DEST)/PidginPortable/Data/settings/.purple
-	cp $(CONFIG_SRC)/prefs.xml $(DEST)/PidginPortable/Data/settings/.purple
-	cp $(CONFIG_SRC)/PidginPortableSettings.ini $(DEST)/PidginPortable/Data/settings
+	cp config/prefs.xml $(DEST)/PidginPortable/Data/settings/.purple
+	cp config/PidginPortableSettings.ini $(DEST)/PidginPortable/Data/settings
 endif
 	## Configure Vidalia
-	mkdir -p $(DEST)/Data/Vidalia/plugins
-	cp -r $(FETCH_DIR)/vidalia-plugins/tbb $(DEST)/Data/Vidalia/plugins
-	mkdir -p $(DEST)/App/script
-	cp $(FETCH_DIR)/qtscriptgenerator/plugins/script/*dll $(DEST)/App/script
 ifeq ($(USE_PIDGIN),1)
-	cp $(CONFIG_SRC)/alpha/vidalia.conf.ff+pidgin $(DEST)/Data/Vidalia/vidalia.conf
+	cp config/alpha/vidalia.conf.ff+pidgin $(DEST)/Data/Vidalia/vidalia.conf
 else
-	cp $(CONFIG_SRC)/alpha/vidalia.conf.ff $(DEST)/Data/Vidalia/vidalia.conf
+	cp config/alpha/vidalia.conf.ff $(DEST)/Data/Vidalia/vidalia.conf
 endif
 	## Configure Tor
-	cp $(CONFIG_SRC)/alpha/torrc $(DEST)/Data/Tor
+	cp config/alpha/torrc $(DEST)/Data/Tor/torrc
 	cp $(TOR)/src/config/geoip $(DEST)/Data/Tor
 
 launcher:
@@ -375,34 +330,6 @@ launcher:
 	cp ../src/RelativeLink/StartTorBrowserBundle.exe $(DEST)/"Start Tor Browser.exe"
 
 ##
-## How to create required extensions
-##
-
-## Torbutton development version
-torbutton.xpi:
-	$(PYGET) -O $@ $(TORBUTTON)
-
-## English comes as default
-langpack_en-US.xpi:
-	touch $@
-
-## BetterPrivacy
-betterprivacy.xpi:
-	$(PYGET) -O $@ $(BETTERPRIVACY)
-
-## NoScript development version
-noscript.xpi:
-	$(PYGET) -O $@ $(NOSCRIPT)
-
-## HTTPS Everywhere
-#httpseverywhere.xpi:
-#	$(PYGET) -O $@ $(HTTPSEVERYWHERE)
-
-## Generic language pack rule
-langpack_%.xpi:
-	$(PYGET) -O $@ $(MOZILLA_LANGUAGE)/$*.xpi
-
-##
 ## Customize the bundle
 ##
 
@@ -410,25 +337,18 @@ bundle_%:
 	LANGCODE=$* make -f windows-alpha.mk bundle-localized
 compressed-bundle_%:
 	LANGCODE=$* make -f windows-alpha.mk compressed-bundle-localized
-split-bundle_%:
-	LANGCODE=$* make -f windows-alpha.mk split-bundle-localized
 
 bundle-localized_%.stamp:
 	make -f windows-alpha.mk copy-files_$* install-extensions install-torbutton install-httpseverywhere install-noscript \
 	patch-vidalia-language patch-firefox-language patch-pidgin-language write-tbb-version
-	touch bundle-localized_$*.stamp
+	touch $(STAMP_DIR)/bundle-localized_$*.stamp
 
 bundle-localized: bundle-localized_$(LANGCODE).stamp
 
-compressed-bundle-localized: bundle-localized_$(LANGCODE).stamp
+compressed-bundle-localized: $(SEVENZIP) bundle-localized_$(LANGCODE).stamp
 	rm -f $(COMPRESSED_NAME)_$(LANGCODE).exe
 	cd $(NAME)_$(LANGCODE); $(SEVENZIP) a -mx9 -sfx7z.sfx ../$(COMPRESSED_NAME)_$(LANGCODE).exe $(NAME)
 
-split-bundle-localized: bundle-localized_$(LANGCODE).stamp
-	rm -fr $(COMPRESSED_NAME)_$(LANGCODE)_split; mkdir $(COMPRESSED_NAME)_$(LANGCODE)_split
-	cd $(NAME)_$(LANGCODE); $(WINRAR) a -r -s -ibck -sfx -v$(SPLITSIZE) \
-	    ../$(COMPRESSED_NAME)_$(LANGCODE)_split/$(COMPRESSED_NAME)_$(LANGCODE)_split.exe $(NAME)
-
 copy-files_%: generic-bundle.stamp
 	rm -fr $(NAME)_$*
 	mkdir $(NAME)_$*
@@ -437,13 +357,6 @@ copy-files_%: generic-bundle.stamp
 BUNDLE=$(NAME)_$(LANGCODE)/$(NAME)
 DUMMYPROFILE=$(BUNDLE)/FirefoxPortable/App/DummyProfile
 
-fix-install-rdf: $(filter-out langpack_en-US.xpi,langpack_$(LANGCODE).xpi)
-ifneq ($(LANGCODE), en-US)
-	rm -fr xx
-	mkdir xx
-	(cd xx && unzip ../langpack_$(LANGCODE).xpi && sed -i -e "s/em:maxVersion>6.0.1/em:maxVersion>6.0.*/" install.rdf && zip  -r ../langpack_$(LANGCODE).xpi .)
-endif
-
 install-extensions: $(filter-out langpack_en-US.xpi,langpack_$(LANGCODE).xpi)
 	## Make a dummy profile to stop Firefox creating some large files
 	cp -r $(BUNDLE)/FirefoxPortable/App/DefaultData $(DUMMYPROFILE)
@@ -453,22 +366,17 @@ ifneq ($(LANGCODE), en-US)
 endif
 	rm -fr $(DUMMYPROFILE)
 
-install-torbutton: torbutton.xpi
+install-torbutton: $(SEVENZIP) torbutton.xpi
 	mkdir -p $(BUNDLE)/FirefoxPortable/Data/profile/extensions/{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}
 	cp torbutton.xpi $(BUNDLE)/FirefoxPortable/Data/profile/extensions/{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}/torbutton.zip
 	(cd $(BUNDLE)/FirefoxPortable/Data/profile/extensions/{e0204bd5-9d31-402b-a99d-a6aa8ffebdca} && $(SEVENZIP) x *.zip && rm *.zip)
 
-install-httpseverywhere: httpseverywhere.xpi
+install-httpseverywhere: $(SEVENZIP) httpseverywhere.xpi
 	mkdir -p $(BUNDLE)/FirefoxPortable/Data/profile/extensions/https-everywhere at eff.org
 	cp httpseverywhere.xpi $(BUNDLE)/FirefoxPortable/Data/profile/extensions/https-everywhere at eff.org/httpseverywhere.zip
 	(cd $(BUNDLE)/FirefoxPortable/Data/profile/extensions/https-everywhere at eff.org && $(SEVENZIP) x *.zip && rm *.zip)
 
-install-betterprivacy: betterprivacy.xpi
-	mkdir -p $(BUNDLE)/FirefoxPortable/Data/profile/extensions/\{d40f5e7b-d2cf-4856-b441-cc613eeffbe3\}
-	cp betterprivacy.xpi $(BUNDLE)/FirefoxPortable/Data/profile/extensions/\{d40f5e7b-d2cf-4856-b441-cc613eeffbe3\}/betterprivacy.zip
-	(cd $(BUNDLE)/FirefoxPortable/Data/profile/extensions/\{d40f5e7b-d2cf-4856-b441-cc613eeffbe3\} && $(SEVENZIP) x *.zip && rm *.zip)
-
-install-noscript: noscript.xpi
+install-noscript: $(SEVENZIP) noscript.xpi
 	mkdir -p $(BUNDLE)/FirefoxPortable/Data/profile/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\}
 	cp noscript.xpi $(BUNDLE)/FirefoxPortable/Data/profile/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\}/noscript.zip
 	(cd $(BUNDLE)/FirefoxPortable/Data/profile/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\} && $(SEVENZIP) x *.zip && rm *.zip)
@@ -494,6 +402,8 @@ patch-firefox-language:
 	./patch-firefox-language.sh $(BUNDLE)/FirefoxPortable/Data/profile/prefs.js $(LANGCODE)
 	sed -i -e "s/SHPONKA/$(LANGCODE)/g" $(BUNDLE)/FirefoxPortable/Data/profile/prefs.js
 	sed -i -e "s/SHPONKA/$(LANGCODE)/g" $(BUNDLE)/FirefoxPortable/App/DefaultData/profile/prefs.js
+	chmod u+w $(BUNDLE)/FirefoxPortable/Data/profile/prefs.js
+	chmod u+w $(BUNDLE)/FirefoxPortable/App/DefaultData/profile/prefs.js
 
 ###
 ### Utilities
@@ -501,7 +411,7 @@ patch-firefox-language:
 
 ## Copy Firefox preferences from a run of FirefoxPortable to be the default
 apply-prefs:
-	cp $(DEST)/FirefoxPortable/Data/profile/prefs.js $(CONFIG_SRC)
+	cp $(DEST)/FirefoxPortable/Data/profile/prefs.js config
 
 print-version:
 	@echo $(RELEASE_VER)-$(BUILD_NUM)
@@ -520,3 +430,7 @@ SRCDEST=/tmp
 SRCDESTPATH=$(SRCDEST)/$(SRCNAME)
 srcdist:
 	cd .. && git archive --format=tar --prefix=tor-browser-$(VERSION)-src/ torbrowser-$(VERSION) | gzip -9 > $(PWD)/tor-browser-$(VERSION)-src.tar.gz
+
+$(PYTHON): | $(MOZBUILD_DIR) ;
+$(SEVENZIP): | $(MOZBUILD_DIR) ;
+$(WIX_LIB): | $(MOZBUILD_DIR) ;





More information about the tor-commits mailing list