Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 53 lines (40 sloc) 1.208 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
-include local.mk

BASE_URL=http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/
SYS=$(shell uname -s)
ARCH?=$(shell uname -m)
DMG=b2g-18.0a1.en-US.mac64.dmg
OSX=$(BASE_URL)/$(DMG)

CWD=`pwd`
GAIA_SRC?=$(CWD)/gaia
MOUNTPOINT=/Volumes/B2G
APP=B2G.app
DMG_APP_PATH=$(MOUNTPOINT)/$(APP)
APP_PATH=$(CWD)/bin/$(APP)

# installation of the B2G.app on OS X
get_dmg:
echo "Downloading latest B2G desktop build."
mkdir -p ./tmp && rm -fr ./tmp/* && cd ./tmp && curl -O $(OSX)

mount_dmg:
echo "Mounting disk image"
cd ./tmp && hdiutil mount $(DMG)

install_app: get_dmg mount_dmg
echo "Moving B2G app to the bin dir"
cp -r $(DMG_APP_PATH) $(APP_PATH) && hdiutil unmount $(MOUNTPOINT)

install_xulrunner:
cd $(GAIA_SRC) && make install-xulrunner-sdk

setup: install_app install_xulrunner clean

# for running B2G
generate_profile:
# cd $(GAIA_SRC) && make && DEBUG=1 GAIA_PORT=:7999 make
cd $(GAIA_SRC) && make

run: generate_profile
$(APP_PATH)/Contents/MacOS/b2g -profile $(GAIA_SRC)/profile &
sleep 1 && osascript -e 'tell app "B2G" to activate'

# utility
clean:
rm -fr ./tmp/*

cleaner: clean
rm -fr ./bin/$(APP)

update:
git submodule update

update_app: cleaner install_app
Something went wrong with that request. Please try again.