« MythAlarm part 3 | MythAlarm » |
So in this second part, I needed to add MythAlarm (and MythHelloWorld) to the MythTV main menu:
# nano /usr/share/mythtv/mainmenu.xml
I added these lines near the bottom of the file:
[lt]button[gt]
[lt]type[gt]HELLO_MYTH[lt]/type[gt]
[lt]text[gt]Hello Myth[lt]/text[gt]
[lt]action[gt]PLUGIN mythhello[lt]/action[gt]
[lt]/button[gt]
[lt]button[gt]
[lt]type[gt]MYTHALARM[lt]/type[gt]
[lt]text[gt]Myth Alarm[lt]/text[gt]
[lt]action[gt]MENU alarm_settings.xml[lt]/action[gt]
[lt]/button[gt]
Then copy over the alarm-ui.xml and alarm_settings.xml files to where MythTV can find them:
# cp al*.xml /usr/share/mythtv/.
Then fire up MythTV and see if it works ...
... yep worked fine - all buttons are there anyway - MythHelloWorld worked fine, but MythAlarm failed to active on any buttonpress.
Hmmm - maybe I should compile this in the mythplugins directory like with MythHello - too bad this stuff didn't come with instructions.
# cp -R mythalarm ~/mythplugins/.
# cd ~/mythplugins/
# make distclean
# /usr/qt/3/bin/qmake
# make
# make install
(no need to do the PATH as before, as this is still active)
The install looked like this:
( [ -d mythalarm ] && cd mythalarm ; grep "^qmake_all:" Makefile && make -f Makefile qmake_all; ) || true
( [ -d mythalarm ] && cd mythalarm ; make -f Makefile install; ) || true
make[1]: Entering directory `/root/mythplugins/mythalarm/mythalarm'
cp -f "libmythalarm.so" "/usr/lib/mythtv/plugins/libmythalarm.so"
strip --strip-unneeded "/usr/lib/mythtv/plugins/libmythalarm.so"
cp -f "alarm-ui.xml" "/usr/share/mythtv/themes/default/"
cp -f "alarm_settings.xml" "/usr/share/mythtv/"
make[1]: Leaving directory `/root/mythplugins/mythalarm/mythalarm'
Ahhh ok now they are in the right spot. To check:
# ls /usr/lib/mythtv/plugins/