-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
126 lines (102 loc) · 4.72 KB
/
Makefile
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
OBSIDIAN_CONFIG=""
OBSIDIAN_FILE="out"
# platform
P="basalt"
VERSION=$(shell cat package.json | grep version | grep -o "[0-9][0-9]*\.[0-9][0-9]*")
all: build install_emulator
deploy: install_deploy
build:
# copy fonts
cp resources/fonts/nupe2.ttf config/fonts/nupe2.ttf
pebble build
build_os3:
sed -i "s/ef42caba-0c65-4879-ab23-edd2bde68824/529f2905-ac36-4991-90c6-fc25f2381cac/g" appinfo.json
pebble sdk activate 3.14
$(MAKE) write_header OBSIDIAN_CONFIG="__COMPILE_OS3"
# copy fonts
cp resources/fonts/nupe2.ttf config/fonts/nupe2.ttf
cp resources/fonts/nupe2-small.ttf config/fonts/nupe2-small.ttf
pebble build
$(MAKE) clean_header
sed -i "s/529f2905-ac36-4991-90c6-fc25f2381cac/ef42caba-0c65-4879-ab23-edd2bde68824/g" appinfo.json
@echo ""
@echo ""
@echo ""
@echo "Now activate the latest SKD again!"
build_quiet:
@scripts/build_quiet.sh
config:
pebble emu-app-config --emulator $(P)
log:
pebble logs --emulator $(P)
travis_build:
yes | ~/pebble-dev/${PEBBLE_SDK}/bin/pebble build
install_emulator:
pebble install --emulator $(P)
install_deploy: build
pebble install --phone 192.168.1.6
menu_icon:
$(MAKE) write_header OBSIDIAN_CONFIG="SCREENSHOT_MENU_ICON"
$(MAKE) build
$(MAKE) install_emulator
$(MAKE) clean_header
resources:
scripts/assemble_resources.sh
screenshots:
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_MAIN" OBSIDIAN_FILE="main"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_SQUARE" OBSIDIAN_FILE="square"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_BATTERY_LOW_1" OBSIDIAN_FILE="battery-low-1"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_BATTERY_LOW_2" OBSIDIAN_FILE="battery-low-2"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_BATTERY_LOW_3" OBSIDIAN_FILE="battery-low-3"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_DATE_1" OBSIDIAN_FILE="date-1"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_DATE_2" OBSIDIAN_FILE="date-2"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_WEATHER_1" OBSIDIAN_FILE="weather-1"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_WEATHER_2" OBSIDIAN_FILE="weather-2"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_BLUETOOTH_ICON" OBSIDIAN_FILE="bluetooth-icon"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_BLUETOOTH_POPUP_1" OBSIDIAN_FILE="bluetooth-popup-1"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_BLUETOOTH_POPUP_2" OBSIDIAN_FILE="bluetooth-popup-2"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_1" OBSIDIAN_FILE="theme-1"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_2" OBSIDIAN_FILE="theme-2"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_3" OBSIDIAN_FILE="theme-3"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_4" OBSIDIAN_FILE="theme-4"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_5" OBSIDIAN_FILE="theme-5"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_6" OBSIDIAN_FILE="theme-6"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_7" OBSIDIAN_FILE="theme-7"
@$(MAKE) screenshot OBSIDIAN_CONFIG="SCREENSHOT_ALT_THEME_8" OBSIDIAN_FILE="theme-8"
scripts/assemble_screenshots.sh
scripts/assemble_resources.sh
screenshot_config:
rm -f screenshots/diorite/config.png
rm -f screenshots/basalt/config.png
rm -f screenshots/chalk/config.png
rm -f screenshots/emery/config.png
phantomjs scripts/capture-settings-screenshot.js https://local.com/obsidian/config/0/index.html?platform=aplite&version=$(VERSION)
sleep 2
pngcrush -q -rem time tmp.png screenshots/diorite/config.png
rm tmp.png
phantomjs scripts/capture-settings-screenshot.js https://local.com/obsidian/config/0/index.html?platform=basalt&version=$(VERSION)
sleep 2
pngcrush -q -rem time tmp.png screenshots/basalt/config.png
rm tmp.png
phantomjs scripts/capture-settings-screenshot.js https://local.com/obsidian/config/0/index.html?platform=chalk&version=$(VERSION)
sleep 2
pngcrush -q -rem time tmp.png screenshots/chalk/config.png
rm tmp.png
phantomjs scripts/capture-settings-screenshot.js https://local.com/obsidian/config/0/index.html?platform=emery&version=$(VERSION)
sleep 2
pngcrush -q -rem time tmp.png screenshots/emery/config.png
rm tmp.png
screenshot: write_header build_quiet
scripts/take_screenshot.sh $(OBSIDIAN_FILE)
write_header:
@echo "#define $(OBSIDIAN_CONFIG)" > src/config.h
clean: clean_header
pebble clean
clean_header:
echo "" > src/config.h
updated_config:
src/scripts/updated_config.sh
font_build:
node_modules/pebble-fctx-compiler/fctx-compiler.js -r "[A-Ia-jz]" resources/fonts/nupe2.svg
node_modules/pebble-fctx-compiler/fctx-compiler.js -r "[0-9a-zA-Z.:\-/° ]" resources/fonts/OpenSans-CondensedBold.svg
.PHONY: all deploy build build_quiet config log resources install_emulator install_deploy menu_icon screenshots screenshot screenshot_config write_header clean clean_header