mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
- separated python proxy into two dlls. One is a wrapper without external
dependencies that fulfills the plugin interface. The other contains the actual python functionality. This way the outer dll can always be loaded and report issues. - The build process embeds the second dll into the first, this way only one dll has to be shipped
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#ifndef PYTHONPLUGINWRAPPER_H
|
||||
#define PYTHONPLUGINWRAPPER_H
|
||||
|
||||
#include <iplugin.h>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <boost/python.hpp>
|
||||
#endif
|
||||
|
||||
class PythonPluginWrapper : public virtual MOBase::IPlugin
|
||||
{
|
||||
|
||||
public:
|
||||
PythonPluginWrapper(const boost::python::object &initFunction,
|
||||
const boost::python::object &nameFunction,
|
||||
const boost::python::object &authorFunction,
|
||||
const boost::python::object &descriptionFunction,
|
||||
const boost::python::object &versionFunction,
|
||||
const boost::python::object &isActiveFunction,
|
||||
const boost::python::object &settingsFunction);
|
||||
|
||||
virtual bool init(MOBase::IOrganizer *moInfo);
|
||||
virtual QString name() const;
|
||||
virtual QString author() const;
|
||||
virtual QString description() const;
|
||||
virtual MOBase::VersionInfo version() const;
|
||||
virtual bool isActive() const;
|
||||
virtual QList<MOBase::PluginSetting> settings() const;
|
||||
|
||||
protected:
|
||||
void reportPythonError() const;
|
||||
|
||||
private:
|
||||
|
||||
boost::python::object m_InitFunction;
|
||||
boost::python::object m_NameFunction;
|
||||
boost::python::object m_AuthorFunction;
|
||||
boost::python::object m_DescriptionFunction;
|
||||
boost::python::object m_VersionFunction;
|
||||
boost::python::object m_IsActiveFunction;
|
||||
boost::python::object m_SettingsFunction;
|
||||
|
||||
};
|
||||
|
||||
#endif // PYTHONPLUGINWRAPPER_H
|
||||
Reference in New Issue
Block a user