From c301ead6bb9c201801400964427b517dafb6a03c Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 06 Feb 2013 14:01:56 +0000 Subject: Use local xulrunner --- diff --git a/Makefile b/Makefile index de35c8e..a0a6cdb 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ TEST_DIRS ?= $(CURDIR)/tests # Generate profile/ -profile: multilocale applications-data preferences app-makefiles test-agent-config offline extensions install-xulrunner-sdk profile/settings.json +profile: multilocale applications-data preferences app-makefiles test-agent-config offline extensions profile/settings.json @echo "Profile Ready: please run [b2g|firefox] -profile $(CURDIR)$(SEP)profile" LANG=POSIX # Avoiding sort order differences between OSes @@ -234,13 +234,13 @@ app-makefiles: # Generate profile/webapps/ # We duplicate manifest.webapp to manifest.webapp and manifest.json # to accommodate Gecko builds without bug 757613. Should be removed someday. -webapp-manifests: install-xulrunner-sdk +webapp-manifests: @mkdir -p profile/webapps @$(call run-js-command, webapp-manifests) @#cat profile/webapps/webapps.json # Generate profile/webapps/APP/application.zip -webapp-zip: stamp-commit-hash install-xulrunner-sdk +webapp-zip: stamp-commit-hash ifneq ($(DEBUG),1) @rm -rf apps/system/camera @cp -r apps/camera apps/system/camera @@ -250,15 +250,15 @@ ifneq ($(DEBUG),1) endif # Web app optimization steps (like precompling l10n, concatenating js files, etc..). -webapp-optimize: install-xulrunner-sdk +webapp-optimize: @$(call run-js-command, webapp-optimize) # Remove temporary l10n files -optimize-clean: install-xulrunner-sdk +optimize-clean: @$(call run-js-command, optimize-clean) # Populate appcache -offline-cache: webapp-manifests install-xulrunner-sdk +offline-cache: webapp-manifests @echo "Populate external apps appcache" @$(call run-js-command, offline-cache) @echo "Done" @@ -266,60 +266,6 @@ offline-cache: webapp-manifests install-xulrunner-sdk # Create webapps offline: webapp-manifests webapp-optimize webapp-zip optimize-clean - -# The install-xulrunner target arranges to get xulrunner downloaded and sets up -# some commands for invoking it. But it is platform dependent -XULRUNNER_SDK_URL=http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2012/09/2012-09-20-03-05-43-mozilla-central/xulrunner-18.0a1.en-US. - -ifeq ($(SYS),Darwin) -# For mac we have the xulrunner-sdk so check for this directory -# We're on a mac -XULRUNNER_MAC_SDK_URL=$(XULRUNNER_SDK_URL)mac- -ifeq ($(ARCH),i386) -# 32-bit -XULRUNNER_SDK_DOWNLOAD=$(XULRUNNER_MAC_SDK_URL)i386.sdk.tar.bz2 -else -# 64-bit -XULRUNNER_SDK_DOWNLOAD=$(XULRUNNER_MAC_SDK_URL)x86_64.sdk.tar.bz2 -endif -XULRUNNERSDK=./xulrunner-sdk/bin/run-mozilla.sh -XPCSHELLSDK=./xulrunner-sdk/bin/xpcshell - -else ifeq ($(findstring MINGW32,$(SYS)), MINGW32) -# For windows we only have one binary -XULRUNNER_SDK_DOWNLOAD=$(XULRUNNER_SDK_URL)win32.sdk.zip -XULRUNNERSDK= -XPCSHELLSDK=./xulrunner-sdk/bin/xpcshell - -else -# Otherwise, assume linux -# downloads and installs locally xulrunner to run the xpchsell -# script that creates the offline cache -XULRUNNER_LINUX_SDK_URL=$(XULRUNNER_SDK_URL)linux- -ifeq ($(ARCH),x86_64) -XULRUNNER_SDK_DOWNLOAD=$(XULRUNNER_LINUX_SDK_URL)x86_64.sdk.tar.bz2 -else -XULRUNNER_SDK_DOWNLOAD=$(XULRUNNER_LINUX_SDK_URL)i686.sdk.tar.bz2 -endif -XULRUNNERSDK=./xulrunner-sdk/bin/run-mozilla.sh -XPCSHELLSDK=./xulrunner-sdk/bin/xpcshell -endif - -.PHONY: install-xulrunner-sdk -install-xulrunner-sdk: -ifndef USE_LOCAL_XULRUNNER_SDK -ifneq ($(XULRUNNER_SDK_DOWNLOAD),$(shell cat .xulrunner-url 2> /dev/null)) - rm -rf xulrunner-sdk - $(DOWNLOAD_CMD) $(XULRUNNER_SDK_DOWNLOAD) -ifeq ($(findstring MINGW32,$(SYS)), MINGW32) - unzip xulrunner*.zip && rm xulrunner*.zip -else - tar xjf xulrunner*.tar.bz2 && rm xulrunner*.tar.bz2 -endif - @echo $(XULRUNNER_SDK_DOWNLOAD) > .xulrunner-url -endif -endif # USE_LOCAL_XULRUNNER_SDK - define run-js-command echo "run-js-command $1"; \ JS_CONSTS=' \ @@ -338,7 +284,7 @@ define run-js-command const GAIA_INLINE_LOCALES = "$(GAIA_INLINE_LOCALES)"; \ const GAIA_ENGINE = "xpcshell"; \ '; \ - $(XULRUNNERSDK) $(XPCSHELLSDK) -e "$$JS_CONSTS" -f build/utils.js "build/$(strip $1).js" + $(B2G_PATH)/run-mozilla.sh $(B2G_PATH)/xpcshell -e "$$JS_CONSTS" -f build/utils.js "build/$(strip $1).js" endef # Optional files that may be provided to extend the set of default @@ -350,7 +296,7 @@ EXTENDED_PREF_FILES = \ ua-override-prefs.js \ # Generate profile/prefs.js -preferences: install-xulrunner-sdk +preferences: @test -d profile || mkdir -p profile @$(call run-js-command, preferences) @$(foreach prefs_file,$(addprefix build/,$(EXTENDED_PREF_FILES)),\ @@ -360,7 +306,7 @@ preferences: install-xulrunner-sdk ) # Generate profile/ -applications-data: install-xulrunner-sdk +applications-data: test -d profile || mkdir -p profile @$(call run-js-command, applications-data) @@ -672,9 +618,3 @@ install-settings-defaults: profile/settings.json # clean out build products clean: - rm -rf profile - -# clean out build products -really-clean: clean - rm -rf xulrunner-sdk .xulrunner-url - -- cgit v0.9.1