Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add target to download and install adb

  • Loading branch information...
commit 2eefcc05366173ca51635da8f542fd8473ba0fea 1 parent 2c43523
@mykmelez mykmelez authored
Showing with 34 additions and 15 deletions.
  1. +34 −15 Makefile
View
49 Makefile
@@ -1,4 +1,4 @@
-.PHONY: build profile prosthesis b2g run package help
+.PHONY: build profile prosthesis b2g adb run package help
-include local.mk
@@ -8,6 +8,8 @@ ifneq (,$(findstring MINGW32_,$(SYS)))
SYS = WINNT
endif
+DOWNLOAD_CMD = wget -c
+
# The platform of the B2G build.
# Options include 'win32', 'mac64', 'linux64', and 'linux', and the default is
# the current platform. The reliability of this option is unclear. Setting it
@@ -36,42 +38,51 @@ endif
# The type of the B2G build. It can be "nightly", in which case you may set
# B2G_ID to the ID of the build (default: the most recent nightly build);
# or "specific", in which case you must set B2G_URL to the URL of the build.
-# B2G_TYPE
+B2G_TYPE ?= specific
# The ID of the nightly B2G build.
# Sometimes this is based on the latest stable nightly for Unagi according to
# https://releases.mozilla.com/b2g/promoted_to_stable/ (private URL).
# B2G_ID
-# The URL of the specific B2G build.
-# B2G_URL
+B2G_URL_BASE = https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/
+
+# Currently, all B2G builds are custom so we can optimize for code size and fix
+# bugs in B2G or its nightly build environments (like 844047 and 815805).
-# Platform-specific
+# Platform-specific Defines
ifeq (win32, $(B2G_PLATFORM))
- B2G_TYPE ?= specific
- B2G_URL_BASE = https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/
+ # The URL of the specific B2G build.
B2G_URL ?= $(B2G_URL_BASE)b2g-18.0.2013-02-20.en-US.win32.zip
+
+ ADB_PACKAGE = adb-1.0.31-windows.zip
+ ADB_BINARIES = adb.exe AdbWinApi.dll AdbWinUsbApi.dll
+ BIN_SUFFIX = .exe
else
ifeq (mac64, $(B2G_PLATFORM))
- B2G_TYPE ?= specific
- B2G_URL_BASE = https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/
B2G_URL ?= $(B2G_URL_BASE)b2g-18.0.2013-02-20.en-US.mac64.dmg
+
+ ADB_PACKAGE = adb-1.0.31-mac.zip
+ ADB_BINARIES = adb
+
+ DOWNLOAD_CMD = /usr/bin/curl -O
else
-# Currently we use custom Linux builds because nightlies have bug 815805.
ifeq (linux64, $(B2G_PLATFORM))
- B2G_TYPE ?= specific
- B2G_URL_BASE = https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/
B2G_URL ?= $(B2G_URL_BASE)b2g-18.0.2013-02-20.en-US.linux-x86_64.tar.bz2
else
ifeq (linux, $(B2G_PLATFORM))
- B2G_TYPE ?= specific
- B2G_URL_BASE = https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/
B2G_URL ?= $(B2G_URL_BASE)b2g-18.0.2013-02-20.en-US.linux-i686.tar.bz2
endif
endif
+
+ ADB_PACKAGE = adb-1.0.31-linux.zip
+ ADB_BINARIES = adb
endif
endif
+ADB_URL_BASE = $(B2G_URL_BASE)
+ADB_URL ?= $(ADB_URL_BASE)$(ADB_PACKAGE)
+
ifdef B2G_PLATFORM
B2G_PLATFORM_ARG = --platform $(B2G_PLATFORM)
endif
@@ -100,7 +111,7 @@ ifdef TEST
TEST_ARG = -f $(TEST)
endif
-build: profile prosthesis b2g
+build: profile prosthesis b2g adb
profile:
make -C gaia
@@ -121,6 +132,14 @@ prosthesis: profile
b2g:
python build/make-b2g.py $(B2G_TYPE_ARG) $(B2G_PLATFORM_ARG) $(B2G_ID_ARG) $(B2G_URL_ARG)
+adb:
+ mkdir -p addon/data/$(B2G_PLATFORM)
+ cd addon/data/$(B2G_PLATFORM)
+ rm -f $(ADB_BINARIES)
+ cd ../../..
+ $(DOWNLOAD_CMD) $(ADB_URL)
+ unzip $(ADB_PACKAGE) -d addon/data/$(B2G_PLATFORM)
+
run:
cd addon-sdk && . bin/activate && cd ../addon && cfx run --templatedir template/ $(BIN_ARG) $(PROFILE_ARG)
Please sign in to comment.
Something went wrong with that request. Please try again.