[Solved] Plugin development under mythtv 30
[Solved] Plugin development under mythtv 30
I've tried to build the mythhello plugin as per the official mythhello wiki https://www.mythtv.org/wiki/Talk:Buildi ... :HelloMyth without success. I'm building under mythtv 0.30 and have a running system but the example plugin as described fails to build. Has anyone successfully built mythhello under version 0.30, if so how?
Re: Plugin development under mythtv 30
Not being able to get mythhello example plugin to build under mythtv-30 I moved on to mythnotes plugin example, which I still can't get this to build either. Having created all the folders and files for mythnotes and runninng: qmake; make, the best I can get is:
notesUI.cpp is:
And line 28 is:
notesUI.h is:
I cannot resolve, "error: cannot dynamic_cast...". It suggests there's something incorrect with the mythnotes files since all the other plugins build without error.
Any ideas as to what's the problem would be most helpful.
Code: Select all
notesUI.cpp:28:50: required from here /usr/local/include/mythtv/libmythui/mythuiutils.h:39:16: error: cannot dynamic_cast ‘container->NotesUI::<anonymous>.MythScreenType::<anonymous>.MythUIComposite::<anonymous>.MythUIType::GetChild((* & name))’ (of type ‘class MythUIType*’) to type ‘class MythUIText*’ (target is not pointer or reference to complete type)
item = dynamic_cast<UIType *>(container->GetChild(name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:296: recipe for target 'obj/notesUI.o' failed
make[1]: *** [obj/notesUI.o] Error 1
make[1]: Leaving directory '/home/pjr/Development/mythtv-30/build/mythtv/mythplugins/mythnotes/mythnotes'
Makefile:41: recipe for target 'sub-mythnotes-make_default' failed
make: *** [sub-mythnotes-make_default] Error 2
Code: Select all
/*
* Source file for UIs
*
* Copyright (C) 2010 Lukas Doktor <ldoktor@redhat.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
*/
#include "notesUI.h"
NotesUI::NotesUI(MythScreenStack *parent, QString name)
: MythScreenType(parent, name), m_title(NULL)
{
}
bool NotesUI::Create()
{
if (!LoadWindowFromXML("notes-ui.xml", "notesui", this))
return false;
bool err = false;
UIUtilE::Assign(this, m_title, "title", &err);
if (err)
return false;
return true;
}
Code: Select all
UIUtilE::Assign(this, m_titleText, "title", &err);
Code: Select all
/*
* Header file for UI
*
* Copyright (C) 2010 Lukas Doktor <ldoktor@redhat.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
*/
#ifndef NOTESUI_H_
#define NOTESUI_H_
#include "notesUI.h"
#include <mythscreentype.h>
#include <mythmainwindow.h>
#include <mythdb.h>
#include <mythdialogbox.h>
class NotesUI : public MythScreenType
{
Q_OBJECT
public:
NotesUI(MythScreenStack *parentStack, QString name = "MythNotes");
bool Create();
private:
MythUIText *m_title;
};
#endif /* NOTESUI_H_ */
Any ideas as to what's the problem would be most helpful.
Re: Plugin development under mythtv 30
Building Plugins:MythNotes02 fails to build:
notesUI.h:23:10: fatal error: mythverbose.h: No such file or directory
How does this get solved? This file does not exist in mythtv/30 source.
notesUI.h:23:10: fatal error: mythverbose.h: No such file or directory
How does this get solved? This file does not exist in mythtv/30 source.
Re: Plugin development under mythtv 30
I've updated the MythHello wiki page to be hopefully more relevant to the current builds of MythTV. I compile tested a build of the plugin using current fixes/31 and it built OK. Haven't tried to install or run it though since I use master.
If you have time try the MythHello instructions again and let me know how you get on.
I can do the same for the MythNotes example as well but it's quite time consuming and you need a lot of patience correcting the wiki which is something I don't have
If you have time try the MythHello instructions again and let me know how you get on.
I can do the same for the MythNotes example as well but it's quite time consuming and you need a lot of patience correcting the wiki which is something I don't have
Re: Plugin development under mythtv 30
Thanks for the update, I'll try it. If it works on mythtv/31 I'll try it against mythtv/30 just to see what happens. I'll examine (working) MythHello and look at applying any 'differences' to MythNotes and see how that works out. If this works I wouldn't mind contributing something to the project by updating the MythNotes wiki to a working build (which as far as I can tell at the moment it isn't).
Re: Plugin development under mythtv 30
I've fixed the MythNotes sources up to https://www.mythtv.org/wiki/Building_Pl ... ythNotes02 - it's a start at least
Re: Plugin development under mythtv 30
Hi paulh, now have mythtv/30 working with your Hellomyth example mythplugin from the Mythtv wiki as of 10th May 2020 on ubuntu 18.04. Thanks for your help updating the website.
I can now make progress developing my Marantz amp controller plugin
I can now make progress developing my Marantz amp controller plugin
Re: Plugin development under mythtv 30
Just built and run Hellomyth for mythtv/31 without issue on ubuntu 18.04 as per your instructions.