forked from PDXostc/hello_tizen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
113 lines (85 loc) · 3 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
PROJECT = JLRPOCX000.HelloTizen
APPNAME = HelloTizen
WRT_FILES = DNA_common css data icon.png index.html setup config.xml images js manifest.json templates
VERSION := 0.0.1
PACKAGE = $(PROJECT)-$(VERSION)
INSTALL_DIR = $(DESTDIR)/opt/usr/apps/.preinstallWidgets
SEND := ~/send
ifndef TIZEN_IP
TIZEN_IP=TizenVTC
endif
dev: clean dev-common
zip -r $(PROJECT).wgt $(WRT_FILES)
$(PROJECT).wgt : dev
wgt:
zip -r $(PROJECT).wgt $(WRT_FILES)
kill.xwalk:
ssh root@$(TIZEN_IP) "pkill xwalk"
kill.feb1:
ssh app@$(TIZEN_IP) "pkgcmd -k JLRPOCX000.HelloTizen"
run: install
@echo "================ Run ======================="
ssh app@$(TIZEN_IP) "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/5000/dbus/user_bus_socket' && xwalkctl | egrep -e $(APPNAME) | awk '{print $1}' | xargs --no-run-if-empty xwalk-launcher -d"
boxcheck: tizen-release
ssh root@$(TIZEN_IP) "cat /etc/tizen-release" | diff tizen-release - ; if [ $$? -ne 0 ] ; then tput setaf 1 ; echo "tizen-release version not correct"; tput sgr0 ;exit 1 ; fi
run.feb1: install.feb1
ssh app@$(TIZEN_IP) "app_launcher -s JLRPOCX000.HelloTizen -d "
install.feb1: deploy
ifndef OBS
-ssh app@$(TIZEN_IP) "pkgcmd -u -n JLRPOCX000.HelloTizen -q"
ssh app@$(TIZEN_IP) "pkgcmd -i -t wgt -p /home/app/JLRPOCX000.HelloTizen.wgt -q"
else
cp -r $(PROJECT).wgt ${DESTDIR}/opt/usr/apps/.preinstallWidgets/
endif
ifndef OBS
install: deploy
ssh app@$(TIZEN_IP) "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/5000/dbus/user_bus_socket' && xwalkctl | egrep -e 'Phone' | awk '{print $1}' | xargs --no-run-if-empty xwalkctl -u"
ssh app@$(TIZEN_IP) "export DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/5000/dbus/user_bus_socket' && xwalkctl -i /home/app/JLRPOCX000.HelloTizen.wgt"
else
install:
cp -r JLRPOCX000.HelloTizen.wgt ${DESTDIR}/opt/usr/apps/.preinstallWidgets/
endif
install_obs:
mkdir -p ${DESTDIR}/opt/usr/apps/.preinstallWidgets
cp -r JLRPOCX000.HelloTizen.wgt ${DESTDIR}/opt/usr/apps/.preinstallWidgets/
$(PROJECT).wgt : wgt
deploy: dev
ifndef OBS
scp $(PROJECT).wgt app@$(TIZEN_IP):/home/app
endif
all:
@echo "Nothing to build"
wgtPkg: common
zip -r $(PROJECT).wgt $(WRT_FILES)
clean:
rm -rf js/services
rm -rf common
rm -rf css/car
rm -rf css/user
rm -f $(PROJECT).wgt
git clean -f
common: /opt/usr/apps/common-apps
cp -r /opt/usr/apps/common-apps DNA_common
/opt/usr/apps/common-apps:
@echo "Please install Common Assets"
exit 1
dev-common: ../common-app
cp -rf ../common-app ./DNA_common
rm -fr ./DNA_common/.git
rm -fr ./DNA_common/common-app/.git
../common-app:
#@echo "Please checkout Common Assets"
#exit 1
git clone [email protected]:PDXostc/common-app.git ../common-app
../DNA_common:
@echo "Please checkout Common Assets"
exit 1
$(INSTALL_DIR) :
mkdir -p $(INSTALL_DIR)/
install_xwalk: $(INSTALL_DIR)
@echo "Installing $(PROJECT), stand by..."
cp $(PROJECT).wgt $(INSTALL_DIR)/
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/5000/dbus/user_bus_socket"
su app -c"xwalk -i $(INSTALL_DIR)/$(PROJECT).wgt"
dist:
tar czf ../$(PROJECT).tar.bz2 .