« MythAlarm part 2

MythAlarm

2007/07/29

  02:22:42 pm, by   , 1023 words  
Categories: MythTV

MythAlarm

I was looking recently for an Alarm for my MythTV box, but there doesn't seem to be one. I did find some code on a recent posting here:

http://www.qtcentre.org/forum/f-qt-programming-2/t-q-object-problems-7670-post44252.html#post44252

Downloaded - and had to massage it to use local QT3 instead of the QT4 that's also installed on my Gentoo MythTV box. Would be nice if MythTV could move forward to QT4. Anyway, once it finally compiled right, I found this article:

http://www.mythtv.org/wiki/index.php/Building_Plugins:HelloMyth

on building MythTV plugins, and used this as a guide on where to add in the MythAlarm information.

Hmmm actually since MythAlarm didn't move anything into place, maybe I'll do the MythHelloWorld and then see if I can't adapt MythAlarm into the same structure - as MythAlarm is obviously not set up right if it can compile properly without being in the MythPlugins directory like the example - as the example references files in that dir as necessary.

K so here's what I did to compile MythHelloWorld:

followed the instructions and created all necessary directories and files.

then, as per instructions I did:

# /usr/qt/3/bin/qmake

Notice that I added the path - this is because I need to reference the proper QT3 and not the default QT4.

The I did the 'make':

# make

cd mythhello && qmake mythhello.pro -o Makefile
cd mythhello && make -f Makefile
make[1]: Entering directory `/root/mythplugins/mythhello/mythhello'
g++ -c -pipe -march=pentium3 -O3 -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -Wall -W -DPIC -fPIC -D_GNU_SOURCE -DPREFIX="/usr" -DMMX -Di386 -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include -I/usr/kde/3.3/include -I/usr/include -I/usr/include -I/usr/include -I. -I. -o main.o main.cpp
In file included from mythhello.h:4,
from main.cpp:6:
/usr/include/mythtv/uitypes.h:12:26: error: qvaluevector.h: No such file or directory
/usr/include/mythtv/uitypes.h:16:22: error: qptrlist.h: No such file or directory
In file included from /usr/include/mythtv/uitypes.h:18,
from mythhello.h:4,
from main.cpp:6:
/usr/include/mythtv/mythwidgets.h:4:21: error: qbutton.h: No such file or directory

Ugh! A bunch of errors - hmmm but I've been through this before, what did I miss - oh yeah the PATH statement need to have the QT3 bin in it - ok so first clean up:

# make distclean

See if the QTDIR environment variable is set:

# echo $QTDIR
/usr/qt/3

Yep, looks right - now add the QT3 bin dir to the PATH:

# export PATH=$QTDIR/bin:$PATH

Make sure it got in right - notice that the QT3 bin is at front of PATH - so its files get picked up before all others.

# echo $PATH
/usr/qt/3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: /bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2: /usr/i386-pc-linux-gnu/gcc-bin/3.3.5-20050130:/opt/blackdown-jdk-1.4.2.03/bin: /opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin: /usr/qt/3/bin:/usr/kde/3.4/sbin:/usr/kde/3.4/bin

[space added to PATH for reading purposes - remove spaces for correct code]

Then run the qmake command again ...

# /usr/qt/3/bin/qmake

And then make:

# make

Compiles just fine this time. Nice!

cd mythalarm && /usr/qt/3/bin/qmake mythalarm.pro -o Makefile
cd mythalarm && make -f Makefile
make[1]: Entering directory `/root/mythalarm/mythalarm/mythalarm'
i686-pc-linux-gnu-g++ -c -pipe -Wall -W -march=pentium3 -O2 -pipe -fno-strict-aliasing -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/qt/3/include -o main.o main.cpp
i686-pc-linux-gnu-g++ -c -pipe -Wall -W -march=pentium3 -O2 -pipe -fno-strict-aliasing -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/qt/3/include -o newalarm.o newalarm.cpp
i686-pc-linux-gnu-g++ -c -pipe -Wall -W -march=pentium3 -O2 -pipe -fno-strict-aliasing -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/qt/3/include -o mythdb.o mythdb.cpp
mythdb.cpp: In constructor 'MythDB::MythDB()':
mythdb.cpp:30: warning: unused variable 'newtimer'
mythdb.cpp: In member function 'MythDB::alarm* MythDB::GetAlarms()':
mythdb.cpp:65: warning: unused variable 'cnt'
mythdb.cpp: At global scope:
mythdb.cpp:86: warning: unused parameter 'thisday'
mythdb.cpp: In member function 'MythDB::alarm* MythDB::GetAlarms(doweek*)':
mythdb.cpp:89: warning: control reaches end of non-void function
mythdb.cpp: In member function 'MythDB::alarm* MythDB::GetAlarms()':
mythdb.cpp:84: warning: control reaches end of non-void function
i686-pc-linux-gnu-g++ -c -pipe -Wall -W -march=pentium3 -O2 -pipe -fno-strict-aliasing -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/qt/3/include -o mythtimers.o mythtimers.cpp
mythtimers.cpp:10: warning: unused parameter 'parent'
mythtimers.cpp:10: warning: unused parameter 'name'
i686-pc-linux-gnu-g++ -c -pipe -Wall -W -march=pentium3 -O2 -pipe -fno-strict-aliasing -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/qt/3/include -o viewalarm.o viewalarm.cpp
rm -f libmythalarm.so
i686-pc-linux-gnu-g++ -shared -o libmythalarm.so main.o newalarm.o mythdb.o mythtimers.o viewalarm.o -L/usr/qt/3/lib -lqt-mt -lpthread
make[1]: Leaving directory `/root/mythalarm/mythalarm/mythalarm'

Next do the install command:

# make install

( [ -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/mythalarm/mythalarm/mythalarm'
cp -f "libmythalarm.so" "/mythtv/plugins/libmythalarm.so"
strip --strip-unneeded "/mythtv/plugins/libmythalarm.so"
cp -f "alarm-ui.xml" "/share/mythtv/themes/default/"
cp -f "alarm_settings.xml" "/share/mythtv/"
make[1]: Leaving directory `/root/mythalarm/mythalarm/mythalarm'

No feedback yet


Form is loading...

April 2024
Mon Tue Wed Thu Fri Sat Sun
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          
 << <   > >>
Programming

Search

  XML Feeds

powered by b2evolution