annotate makefile @ 2160:611c3e97de2f

factor out the show-specific strs
author drewp@bigasterisk.com
date Thu, 18 May 2023 10:49:16 -0700
parents 83f9fbc0a003
children aecbcddccfea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
1 ### setup ###
827
9816e249ce2e add nose build instructions
Drew Perttula <drewp@bigasterisk.com>
parents: 825
diff changeset
2
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
3 packages:
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
4 sudo aptitude install -y \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
5 audacity \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
6 coffeescript \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
7 curl \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
8 git \
2110
13d1fc32125b pkg deps tweaks for ubuntu 22.04
drewp@bigasterisk.com
parents: 2063
diff changeset
9 libblas-dev \
13d1fc32125b pkg deps tweaks for ubuntu 22.04
drewp@bigasterisk.com
parents: 2063
diff changeset
10 libcairo2-dev \
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
11 libffi-dev \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
12 libjpeg8-dev \
2110
13d1fc32125b pkg deps tweaks for ubuntu 22.04
drewp@bigasterisk.com
parents: 2063
diff changeset
13 liblapack-dev \
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
14 libssl-dev \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
15 libzmq3-dev \
2110
13d1fc32125b pkg deps tweaks for ubuntu 22.04
drewp@bigasterisk.com
parents: 2063
diff changeset
16 mercurial \
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
17 nginx-core \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
18 nginx-full \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
19 normalize-audio \
2110
13d1fc32125b pkg deps tweaks for ubuntu 22.04
drewp@bigasterisk.com
parents: 2063
diff changeset
20 python3-cairo-dev \
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
21 python3-dev \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
22 python3-opencv \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
23 python3-pygame \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
24 python3-tk \
2138
83f9fbc0a003 setup tweaks
drewp@bigasterisk.com
parents: 2110
diff changeset
25 sox \
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
26 tix \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
27 zlib1g-dev
1968
6e1b06199cff add setup note about 'invoke'
drewp@bigasterisk.com
parents: 1953
diff changeset
28
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
29 gst_packages:
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
30 sudo aptitude install -y \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
31 gir1.2-goocanvas-2.0 \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
32 gir1.2-gst-plugins-base-1.0 \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
33 gir1.2-gstreamer-1.0 \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
34 gstreamer1.0-plugins-good \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
35 gstreamer1.0-pulseaudio \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
36 gstreamer1.0-tools \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
37 libgirepository-1.0-1 \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
38 libgirepository1.0-dev \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
39 python3-gi \
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
40 python3-gst-1.0
1288
5e76c8fd8a03 rewrite dmx outputter to a new service
Drew Perttula <drewp@bigasterisk.com>
parents: 1240
diff changeset
41
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
42 pnpm:
2138
83f9fbc0a003 setup tweaks
drewp@bigasterisk.com
parents: 2110
diff changeset
43 sudo npm install -g pnpm@7.29.3
2057
d41530a84d4b pdm_local_install
drewp@bigasterisk.com
parents: 2044
diff changeset
44
1572
9be85c08a69f fix bower and npm builds
Drew Perttula <drewp@bigasterisk.com>
parents: 1563
diff changeset
45 bin/node:
9be85c08a69f fix bower and npm builds
Drew Perttula <drewp@bigasterisk.com>
parents: 1563
diff changeset
46 ln -sf `which nodejs` bin/node
9be85c08a69f fix bower and npm builds
Drew Perttula <drewp@bigasterisk.com>
parents: 1563
diff changeset
47
2057
d41530a84d4b pdm_local_install
drewp@bigasterisk.com
parents: 2044
diff changeset
48 pdm_local_install:
d41530a84d4b pdm_local_install
drewp@bigasterisk.com
parents: 2044
diff changeset
49 # drew has ~/bin in $PATH
2063
1c772cb39908 got rdfdb to use local dev version, finally
drewp@bigasterisk.com
parents: 2057
diff changeset
50 pip install "pdm==1.15.0"
2057
d41530a84d4b pdm_local_install
drewp@bigasterisk.com
parents: 2044
diff changeset
51 ln -s ../.local/bin/pdm ~/bin
d41530a84d4b pdm_local_install
drewp@bigasterisk.com
parents: 2044
diff changeset
52
2044
f8a5f579547a make deps
drewp@bigasterisk.com
parents: 2041
diff changeset
53 js:
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
54 pnpm install --reporter append-only
1946
a362b892cb43 more makefile hacks to turn debug.js into an ES6 module
Drew Perttula <drewp@bigasterisk.com>
parents: 1945
diff changeset
55
2038
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
56 py:
5154f5a23e85 reworking initial setup; get bin/asco running
drewp@bigasterisk.com
parents: 2036
diff changeset
57 pdm sync
1946
a362b892cb43 more makefile hacks to turn debug.js into an ES6 module
Drew Perttula <drewp@bigasterisk.com>
parents: 1945
diff changeset
58
2044
f8a5f579547a make deps
drewp@bigasterisk.com
parents: 2041
diff changeset
59 setup: packages gst_packages pnpm js py
1946
a362b892cb43 more makefile hacks to turn debug.js into an ES6 module
Drew Perttula <drewp@bigasterisk.com>
parents: 1945
diff changeset
60
2044
f8a5f579547a make deps
drewp@bigasterisk.com
parents: 2041
diff changeset
61 deps: js py
1291
a36928f7cc35 upgrade jquery, use bower
Drew Perttula <drewp@bigasterisk.com>
parents: 1288
diff changeset
62
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
63
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
64 tkdnd_build:
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
65 # get tkdnd r95 with subversion
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
66 # then apply tkdnd-patch-on-r95 to that
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
67 cd tkdnd/trunk
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
68 ./configure
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
69 make
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
70
2041
d8bac44781d4 github commands in makefile
drewp@bigasterisk.com
parents: 2038
diff changeset
71 push_github:
d8bac44781d4 github commands in makefile
drewp@bigasterisk.com
parents: 2038
diff changeset
72 hg bookmark -r default main && hg push git+ssh://git@github.com/drewp/light9.git
d8bac44781d4 github commands in makefile
drewp@bigasterisk.com
parents: 2038
diff changeset
73
d8bac44781d4 github commands in makefile
drewp@bigasterisk.com
parents: 2038
diff changeset
74 pull_github:
d8bac44781d4 github commands in makefile
drewp@bigasterisk.com
parents: 2038
diff changeset
75 hg pull git+ssh://git@github.com/drewp/light9.git
d8bac44781d4 github commands in makefile
drewp@bigasterisk.com
parents: 2038
diff changeset
76
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
77 ### build ###
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
78
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
79 coffee:
1713
bd0c83b063df bower, polymer, coffee updates
Drew Perttula <drewp@bigasterisk.com>
parents: 1710
diff changeset
80 zsh -c 'cd light9/web; ../../node_modules/coffeescript/bin/coffee --map -cw {.,live,timeline,paint,effects}/*.coffee'
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
81
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
82 ### show ###
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
83
2020
dc742d72f8cb a command for launching qlcplus
drewp@bigasterisk.com
parents: 1968
diff changeset
84 qlc_artnet_dmx_proxy:
dc742d72f8cb a command for launching qlcplus
drewp@bigasterisk.com
parents: 1968
diff changeset
85 qlcplus --open cur/qlc.qxw
dc742d72f8cb a command for launching qlcplus
drewp@bigasterisk.com
parents: 1968
diff changeset
86
2024
8a8f633e8ccb cmds for screen blanking
drewp@bigasterisk.com
parents: 2020
diff changeset
87 no_screen_blanking:
8a8f633e8ccb cmds for screen blanking
drewp@bigasterisk.com
parents: 2020
diff changeset
88 xset s off
8a8f633e8ccb cmds for screen blanking
drewp@bigasterisk.com
parents: 2020
diff changeset
89 xset -dpms
8a8f633e8ccb cmds for screen blanking
drewp@bigasterisk.com
parents: 2020
diff changeset
90
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
91 darcs_show_checkpoint:
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
92 darcs add --quiet --recursive ${LIGHT9_SHOW}
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
93 darcs rec -a -m "checkpoint show data" ${LIGHT9_SHOW}
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
94
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
95 ### pi setup ###
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
96
1546
eeadad4a998e pi setup docs and fixes
Drew Perttula <drewp@bigasterisk.com>
parents: 1543
diff changeset
97 raspberry_pi_packages:
1856
55e41b61b472 python 3 upgrade starts: makefile and requirements pull py3 pkgs (with some pkg updates)
drewp@bigasterisk.com
parents: 1772
diff changeset
98 sudo apt-get install python3-picamera python3-dev python3-twisted python3-virtualenv
1546
eeadad4a998e pi setup docs and fixes
Drew Perttula <drewp@bigasterisk.com>
parents: 1543
diff changeset
99
1087
1f877950ad28 new picamserve for raspberry pi camera -> http, especially with crop control
Drew Perttula <drewp@bigasterisk.com>
parents: 1070
diff changeset
100 raspberry_pi_virtualenv:
1f877950ad28 new picamserve for raspberry pi camera -> http, especially with crop control
Drew Perttula <drewp@bigasterisk.com>
parents: 1070
diff changeset
101 mkdir -p env_pi
1856
55e41b61b472 python 3 upgrade starts: makefile and requirements pull py3 pkgs (with some pkg updates)
drewp@bigasterisk.com
parents: 1772
diff changeset
102 virtualenv -p /usr/bin/python3 --system-site-packages env_pi
1546
eeadad4a998e pi setup docs and fixes
Drew Perttula <drewp@bigasterisk.com>
parents: 1543
diff changeset
103 env_pi/bin/pip install cyclone 'coloredlogs==6.0'
1184
499ef7c133eb make rule for checkpoints
drewp@bigasterisk.com
parents: 1112
diff changeset
104
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
105 ### arduino build ###
1232
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
106
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
107 /usr/share/arduino/Arduino.mk:
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
108 sudo aptitude install arduino-mk
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
109
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
110 arduino_upload: /usr/share/arduino/Arduino.mk
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
111 cd rgbled
beb0688cbfd8 arduino_upload target
Drew Perttula <drewp@bigasterisk.com>
parents: 1230
diff changeset
112 make upload
1233
15a13eba6fc3 effect_node_setup
Drew Perttula <drewp@bigasterisk.com>
parents: 1232
diff changeset
113
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
114 ### testing ###
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
115
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
116 NOSEARGS="--no-path-adjustment light9.rdfdb.rdflibpatch light9.rdfdb.patch light9.effecteval.test_effect light9.collector light9.rdfdb.graphfile_test light9.paint light9.effect"
1327
d6396679c121 move to adjustable.coffee and also simplify the getTarget code
Drew Perttula <drewp@bigasterisk.com>
parents: 1318
diff changeset
117
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
118 tests:
2036
00afa5ec081a restore more of the stats widget including the cpu/mem spinner
drewp@bigasterisk.com
parents: 2032
diff changeset
119 eval pdm run nosetests -x $(NOSEARGS)
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
120
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
121 tests_watch:
2036
00afa5ec081a restore more of the stats widget including the cpu/mem spinner
drewp@bigasterisk.com
parents: 2032
diff changeset
122 eval pdm run nosetests --with-watcher $(NOSEARGS)
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
123
1506
37cbb245d93c fix tests. add logging, some mypy types.
Drew Perttula <drewp@bigasterisk.com>
parents: 1432
diff changeset
124
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
125 tests_coverage:
2036
00afa5ec081a restore more of the stats widget including the cpu/mem spinner
drewp@bigasterisk.com
parents: 2032
diff changeset
126 eval pdm run nosetests --with-coverage --cover-erase --cover-html --cover-html-dir=/tmp/light9-cov/ --cover-package=light9 --cover-branches $(NOSEARGS)
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
127
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
128 test_js_init:
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
129 npm install
1506
37cbb245d93c fix tests. add logging, some mypy types.
Drew Perttula <drewp@bigasterisk.com>
parents: 1432
diff changeset
130
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
131 test_js:
2036
00afa5ec081a restore more of the stats widget including the cpu/mem spinner
drewp@bigasterisk.com
parents: 2032
diff changeset
132 pnpx coffee -c light9/web/*.coffee
00afa5ec081a restore more of the stats widget including the cpu/mem spinner
drewp@bigasterisk.com
parents: 2032
diff changeset
133 pnpx mocha --compilers coffee:coffee-script/register --globals window,N3 light9/web/graph_test.coffee
1563
1b42120d97f5 mypy upgrade
Drew Perttula <drewp@bigasterisk.com>
parents: 1546
diff changeset
134
1695
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
135 test_js_watch:
03125dac50a2 reorder makefile
Drew Perttula <drewp@bigasterisk.com>
parents: 1694
diff changeset
136 # have coffee continuously running
2036
00afa5ec081a restore more of the stats widget including the cpu/mem spinner
drewp@bigasterisk.com
parents: 2032
diff changeset
137 watch -c pnpx mocha --compilers coffee:coffee-script/register --globals window,N3 light9/web/graph_test.coffee --colors
1772
66a55cb17cbf notes on pyflame
Drew Perttula <drewp@bigasterisk.com>
parents: 1713
diff changeset
138
66a55cb17cbf notes on pyflame
Drew Perttula <drewp@bigasterisk.com>
parents: 1713
diff changeset
139 profile_seq:
66a55cb17cbf notes on pyflame
Drew Perttula <drewp@bigasterisk.com>
parents: 1713
diff changeset
140 echo in lib, get https://github.com/uber/pyflame.git and https://github.com/brendangregg/FlameGraph.git
66a55cb17cbf notes on pyflame
Drew Perttula <drewp@bigasterisk.com>
parents: 1713
diff changeset
141 sudo lib/pyflame/src/pyflame -s 10 -p `pgrep -f effectsequencer` | perl -lpe 's,/home/drewp/projects-local/light9/,,g; s,env/local/lib/python2.7/site-packages/,,g;' | lib/FlameGraph/flamegraph.pl --width 2500 > /tmp/fl.svg