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

[or-cvs] r14999: Add rules for building split bundle to Makefile Don't rebuil (torbrowser/trunk/build-scripts)



Author: sjm217
Date: 2008-06-06 19:26:53 -0400 (Fri, 06 Jun 2008)
New Revision: 14999

Modified:
   torbrowser/trunk/build-scripts/Makefile
Log:
Add rules for building split bundle to Makefile
Don't rebuild localized bundle if it already exists

Modified: torbrowser/trunk/build-scripts/Makefile
===================================================================
--- torbrowser/trunk/build-scripts/Makefile	2008-06-06 22:31:36 UTC (rev 14998)
+++ torbrowser/trunk/build-scripts/Makefile	2008-06-06 23:26:53 UTC (rev 14999)
@@ -28,7 +28,11 @@
 ## Location of utility applications
 SEVENZIP="/c/Program Files/7-Zip/7z.exe"
 WGET:=/c/Python25/python.exe $(shell pwd)/pyget.py
+WINRAR="/c/Program Files/WinRAR/WinRAR.exe"
 
+## Size of split archive volumes for WinRAR
+SPLITSIZE=1440k
+
 ## Location of config files
 CONFIG_SRC=config
 
@@ -64,7 +68,9 @@
 
 bundle: bundle_en-US
 
-all-bundles: compressed-bundle_ar \
+all-bundles: all-compressed-bundles all-split-bundles
+
+all-compressed-bundles: compressed-bundle_ar \
 	compressed-bundle_en-US \
 	compressed-bundle_de \
 	compressed-bundle_es-ES \
@@ -75,17 +81,29 @@
 	compressed-bundle_ru \
 	compressed-bundle_zh-CN
 
+all-split-bundles: split-bundle_ar \
+	split-bundle_en-US \
+	split-bundle_de \
+	split-bundle_es-ES \
+	split-bundle_fa-IR \
+	split-bundle_fr \
+	split-bundle_nl \
+	split-bundle_pt-PT \
+	split-bundle_ru \
+	split-bundle_zh-CN
+
 ##
 ## Cleanup
 ##
 
 clean:
-	rm -fr $(DEST) generic-bundle.stamp
+	rm -fr $(DEST) *.stamp
 	rm -f *~
 	rm -fr *.xpi
 	rm -f "Tor Browser.exe"
 	rm -fr $(NAME)_*
 	rm -fr $(COMPRESSED_NAME)_*.exe
+	rm -fr $(COMPRESSED_NAME)_*.rar
 	cd ../src/RelativeLink/ && $(MAKE) clean
 
 ##
@@ -205,18 +223,26 @@
 	LANGCODE=$* make bundle-localized
 compressed-bundle_%:
 	LANGCODE=$* make compressed-bundle-localized
+split-bundle_%:
+	LANGCODE=$* make split-bundle-localized
 
-bundle-localized: generic-bundle.stamp copy-base install-extensions patch-vidalia-language patch-firefox-language
+bundle-localized_%.stamp:
+	make copy-files_$* install-extensions patch-vidalia-language patch-firefox-language
+	touch bundle-localized_$*.stamp
 
-## TODO: don't rebuild bundle if it's already there
-compressed-bundle-localized: bundle-localized
+bundle-localized: bundle-localized_$(LANGCODE).stamp
+
+compressed-bundle-localized: bundle-localized_$(LANGCODE).stamp
 	cd $(NAME)_$(LANGCODE); $(SEVENZIP) a -sfx7z.sfx ../$(COMPRESSED_NAME)_$(LANGCODE).exe $(NAME)
 
-copy-base:
-	rm -fr $(NAME)_$(LANGCODE)
-	mkdir $(NAME)_$(LANGCODE)
-	cp -R $(DEST) $(NAME)_$(LANGCODE)/$(NAME)
+split-bundle-localized: bundle-localized_$(LANGCODE).stamp
+	cd $(NAME)_$(LANGCODE); $(WINRAR) a -r -s -sfx -v$(SPLITSIZE) ../$(COMPRESSED_NAME)_$(LANGCODE)_split.exe $(NAME)
 
+copy-files_%: generic-bundle.stamp
+	rm -fr $(NAME)_$*
+	mkdir $(NAME)_$*
+	cp -R $(DEST) $(NAME)_$*/$(NAME)
+
 BUNDLE=$(NAME)_$(LANGCODE)/$(NAME)
 DUMMYPROFILE=$(BUNDLE)/FirefoxPortable/App/DummyProfile
 install-extensions: $(DEFAULT_EXTENSIONS) langpack_$(LANGCODE).xpi