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

[tor-commits] [torbrowser/maint-2.2] W32: Add a new target to fetch mozilla-build



commit b66c5893e57fcb3a6534cb4e0ac35f19184e0378
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date:   Wed Feb 8 10:24:27 2012 +0100

    W32: Add a new target to fetch mozilla-build
---
 build-scripts/versions.mk |   17 +++++++++++++++++
 build-scripts/windows.mk  |   12 ++++++------
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/build-scripts/versions.mk b/build-scripts/versions.mk
index da23ea1..e5e4d53 100644
--- a/build-scripts/versions.mk
+++ b/build-scripts/versions.mk
@@ -15,6 +15,7 @@ TOR_VER=0.2.2.35
 TORBUTTON_VER=1.4.5.1
 VIDALIA_VER=0.2.17
 ZLIB_VER=1.2.6
+MOZBUILD_VER=1.5.1
 
 ## Extension IDs
 FF_VENDOR_ID:=\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
@@ -29,10 +30,12 @@ LIBEVENT_PACKAGE=libevent-$(LIBEVENT_VER).tar.gz
 TOR_PACKAGE=tor-$(TOR_VER).tar.gz
 PIDGIN_PACKAGE=pidgin-$(PIDGIN_VER).tar.bz2
 FIREFOX_PACKAGE=firefox-$(FIREFOX_VER).source.tar.bz2
+MOZBUILD_PACKAGE=MozillaBuildSetup-$(MOZBUILD_VER).exe
 TORBUTTON_PACKAGE=torbutton-$(TORBUTTON_VER).xpi
 NOSCRIPT_PACKAGE=addon-722-latest.xpi
 HTTPSEVERYWHERE_PACKAGE=https-everywhere-$(HTTPSEVERYWHERE_VER).xpi
 
+
 ## Location of files for download
 ZLIB_URL=http://www.zlib.net/$(ZLIB_PACKAGE)
 OPENSSL_URL=http://www.openssl.org/source/$(OPENSSL_PACKAGE)
@@ -43,6 +46,7 @@ LIBEVENT_URL=https://github.com/downloads/libevent/libevent/$(LIBEVENT_PACKAGE)
 TOR_URL=http://www.torproject.org/dist/$(TOR_PACKAGE)
 PIDGIN_URL=http://sourceforge.net/projects/pidgin/files/Pidgin/$(PIDGIN_PACKAGE)
 FIREFOX_URL=http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VER)/source/$(FIREFOX_PACKAGE)
+MOZBUILD_URL=https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/$(MOZBUILD_PACKAGE)
 TORBUTTON_URL=https://www.torproject.org/dist/torbutton/$(TORBUTTON_PACKAGE)
 NOSCRIPT_URL=https://addons.mozilla.org/firefox/downloads/latest/722/$(NOSCRIPT_PACKAGE)
 HTTPSEVERYWHERE_URL=https://eff.org/files/$(HTTPSEVERYWHERE_PACKAGE)
@@ -59,6 +63,7 @@ libevent=LIBEVENT
 tor=TOR
 firefox=FIREFOX
 pidgin=PIDGIN
+mozbuild=MOZBUILD
 
 # The locations of the unpacked tarballs
 ZLIB_DIR=$(FETCH_DIR)/zlib-$(ZLIB_VER)
@@ -69,6 +74,7 @@ VIDALIA_DIR=$(FETCH_DIR)/vidalia-$(VIDALIA_VER)
 LIBEVENT_DIR=$(FETCH_DIR)/libevent-$(LIBEVENT_VER)
 TOR_DIR=$(FETCH_DIR)/tor-$(TOR_VER)
 FIREFOX_DIR=$(FETCH_DIR)/firefox-$(FIREFOX_VER)
+MOZBUILD_DIR=$(FETCH_DIR)/mozilla-build
 
 
 fetch-source: $(FETCH_DIR)/$(ZLIB_PACKAGE) $(FETCH_DIR)/$(LIBPNG_PACKAGE) $(FETCH_DIR)/$(QT_PACKAGE) $(FETCH_DIR)/$(OPENSSL_PACKAGE) $(FETCH_DIR)/$(VIDALIA_PACKAGE) $(FETCH_DIR)/$(LIBEVENT_PACKAGE) $(FETCH_DIR)/$(TOR_PACKAGE) $(FETCH_DIR)/$(FIREFOX_PACKAGE) | $(FETCH_DIR) ;
@@ -104,6 +110,9 @@ $(FETCH_DIR)/$(TOR_PACKAGE): | $(FETCH_DIR)
 $(FETCH_DIR)/$(FIREFOX_PACKAGE): | $(FETCH_DIR)
 	$(WGET) --no-check-certificate --directory-prefix=$(FETCH_DIR) $(FIREFOX_URL)
 
+$(FETCH_DIR)/$(MOZBUILD_PACKAGE): | $(FETCH_DIR)
+	$(WGET) --no-check-certificate --directory-prefix=$(FETCH_DIR) $(MOZBUILD_URL)
+
 torbutton.xpi:
 	$(WGET) --no-check-certificate -O $@ $(TORBUTTON_URL)
 
@@ -123,6 +132,7 @@ langpack_en-US.xpi:
 
 unpack-source: $(ZLIB_DIR) $(OPENSSL_DIR) $(LIBPNG_DIR $(QT_DIR) $(VIDALIA_DIR) $(LIBEVENT_DIR) $(TOR_DIR) $(FIREFOX_DIR)
 
+
 $(ZLIB_DIR): $(FETCH_DIR)/$(ZLIB_PACKAGE)
 	rm -rf $(ZLIB_DIR)
 	cd $(FETCH_DIR) && tar -xmf $(ZLIB_PACKAGE)
@@ -161,6 +171,13 @@ $(FIREFOX_DIR): $(FETCH_DIR)/$(FIREFOX_PACKAGE) ../src/current-patches/firefox/*
 	cp patch-any-src.sh $(FIREFOX_DIR)
 	cd $(FIREFOX_DIR) && ./patch-any-src.sh
 
+$(MOZBUILD_DIR): $(FETCH_DIR)/$(MOZBUILD_PACKAGE)
+	rm -rf $(MOZBUILD_DIR) /c/mozilla-build
+# We could try passing a /D argument here, but then we'd need to convert
+# mingw paths into windows paths. We'll just go with the default here.
+	cd $(FETCH_DIR) && cmd.exe /c "$(MOZBUILD_PACKAGE) /S"
+	mv /c/mozilla-build $(MOZBUILD_DIR)
+
 clean-fetch-%:
 	rm -rf $(FETCH_DIR)/$($($*)_PACKAGE)
 
diff --git a/build-scripts/windows.mk b/build-scripts/windows.mk
index 73a1b4f..fc57040 100644
--- a/build-scripts/windows.mk
+++ b/build-scripts/windows.mk
@@ -55,7 +55,6 @@ WINRAR="/c/Program Files (x86)/WinRAR/WinRAR.exe"
 CC=gcc
 
 MSVC_VER=9
-MOZ_BUILD=/c/build/mozilla-build
 
 ## Build machine specific settings
 # Number of cpu cores used to build in parallel
@@ -114,11 +113,12 @@ build-tor: build-zlib build-openssl build-libevent $(TOR_DIR)
 	cd $(TOR_DIR) && make install
 	touch build-tor
 
-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)
+patch-mozbuild: $(MOZBUILD_DIR)
+	cp ../src/current-patches/mozilla-build/start-msvc.patch $(MOZBUILD_DIR)
+	cp ../src/current-patches/mozilla-build/guess-msvc-x64.bat $(MOZBUILD_DIR)
+	cp patch-mozilla-build.sh $(MOZBUILD_DIR)
+	cd $(MOZBUILD_DIR) && ./patch-mozilla-build.sh $(MSVC_VER)
+	touch patch-mozbuild
 
 build-firefox: $(FIREFOX_DIR) config/dot_mozconfig $(MOZBUILD) $(MOZ_BUILD)/start-msvc$(MSVC_VER).bat
 	cp config/dot_mozconfig $(FIREFOX_DIR)/mozconfig



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