mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Add 'reinstallation' parameter to onInstallationStart().
This commit is contained in:
@@ -290,8 +290,8 @@ std::map<std::type_index, boost::any> IPluginGameWrapper::featureList() const
|
||||
#define COMMON_I_PLUGIN_INSTALLER_WRAPPER_DEFINITIONS(class_name) \
|
||||
unsigned int class_name::priority() const { return basicWrapperFunctionImplementation<unsigned int>(this, "priority"); } \
|
||||
bool class_name::isManualInstaller() const { return basicWrapperFunctionImplementation<bool>(this, "isManualInstaller"); } \
|
||||
void class_name::onInstallationStart(QString const& archive, MOBase::IModInterface* currentMod) { \
|
||||
basicWrapperFunctionImplementationWithDefault<void>(this, &class_name::onInstallationStart_Default, "onInstallationStart", archive, boost::python::ptr(currentMod)); } \
|
||||
void class_name::onInstallationStart(QString const& archive, bool reinstallation, MOBase::IModInterface* currentMod) { \
|
||||
basicWrapperFunctionImplementationWithDefault<void>(this, &class_name::onInstallationStart_Default, "onInstallationStart", archive, reinstallation, boost::python::ptr(currentMod)); } \
|
||||
void class_name::onInstallationEnd(EInstallResult result, MOBase::IModInterface* newMod) { \
|
||||
basicWrapperFunctionImplementationWithDefault<void>(this, &class_name::onInstallationEnd_Default, "onInstallationEnd", result, boost::python::ptr(newMod)); } \
|
||||
bool class_name::isArchiveSupported(std::shared_ptr<const IFileTree> tree) const { return basicWrapperFunctionImplementation<bool>(this, "isArchiveSupported", tree); }
|
||||
|
||||
@@ -137,9 +137,9 @@ using IPluginInstaller::parentWidget; \
|
||||
using IPluginInstaller::manager; \
|
||||
virtual unsigned int priority() const override; \
|
||||
virtual bool isManualInstaller() const override; \
|
||||
virtual void onInstallationStart(QString const& archive, MOBase::IModInterface* currentMod) override; \
|
||||
void onInstallationStart_Default(QString const& archive, MOBase::IModInterface* currentMod) { \
|
||||
return IPluginInstaller::onInstallationStart(archive, currentMod); } \
|
||||
virtual void onInstallationStart(QString const& archive, bool reinstallation, MOBase::IModInterface* currentMod) override; \
|
||||
void onInstallationStart_Default(QString const& archive, bool reinstallation, MOBase::IModInterface* currentMod) { \
|
||||
return IPluginInstaller::onInstallationStart(archive, reinstallation, currentMod); } \
|
||||
virtual void onInstallationEnd(EInstallResult result, MOBase::IModInterface* newMod) override; \
|
||||
void onInstallationEnd_Default(EInstallResult result, MOBase::IModInterface* newMod) { \
|
||||
return IPluginInstaller::onInstallationEnd(result, newMod); } \
|
||||
|
||||
@@ -820,7 +820,7 @@ BOOST_PYTHON_MODULE(mobase)
|
||||
bpy::class_<IPluginInstaller, bpy::bases<IPlugin>, boost::noncopyable>("IPluginInstaller", bpy::no_init)
|
||||
.def("isArchiveSupported", &IPluginInstaller::isArchiveSupported, bpy::arg("tree"))
|
||||
.def("priority", &IPluginInstaller::priority)
|
||||
.def("onInstallationStart", &IPluginInstaller::onInstallationStart, (bpy::arg("archive"), bpy::arg("current_mod")))
|
||||
.def("onInstallationStart", &IPluginInstaller::onInstallationStart, (bpy::arg("archive"), bpy::arg("reinstallation"), bpy::arg("current_mod")))
|
||||
.def("onInstallationEnd", &IPluginInstaller::onInstallationEnd, (bpy::arg("result"), bpy::arg("new_mod")))
|
||||
.def("isManualInstaller", &IPluginInstaller::isManualInstaller)
|
||||
.def("setParentWidget", &IPluginInstaller::setParentWidget, bpy::arg("parent"))
|
||||
@@ -828,7 +828,7 @@ BOOST_PYTHON_MODULE(mobase)
|
||||
;
|
||||
|
||||
bpy::class_<IPluginInstallerSimpleWrapper, bpy::bases<IPluginInstaller>, boost::noncopyable>("IPluginInstallerSimple")
|
||||
.def("onInstallationStart", &IPluginInstaller::onInstallationStart, (bpy::arg("archive"), bpy::arg("current_mod")))
|
||||
.def("onInstallationStart", &IPluginInstaller::onInstallationStart, (bpy::arg("archive"), bpy::arg("reinstallation"), bpy::arg("current_mod")))
|
||||
.def("onInstallationEnd", &IPluginInstaller::onInstallationEnd, (bpy::arg("result"), bpy::arg("new_mod")))
|
||||
// Note: Keeping the variant here even if we always return a tuple to be consistent with the wrapper and
|
||||
// have proper stubs generation.
|
||||
@@ -842,7 +842,7 @@ BOOST_PYTHON_MODULE(mobase)
|
||||
;
|
||||
|
||||
bpy::class_<IPluginInstallerCustomWrapper, bpy::bases<IPluginInstaller>, boost::noncopyable>("IPluginInstallerCustom")
|
||||
.def("onInstallationStart", &IPluginInstaller::onInstallationStart, (bpy::arg("archive"), bpy::arg("current_mod")))
|
||||
.def("onInstallationStart", &IPluginInstaller::onInstallationStart, (bpy::arg("archive"), bpy::arg("reinstallation"), bpy::arg("current_mod")))
|
||||
.def("onInstallationEnd", &IPluginInstaller::onInstallationEnd, (bpy::arg("result"), bpy::arg("new_mod")))
|
||||
// Needs to add both otherwize boost does not understand:
|
||||
.def("isArchiveSupported", &IPluginInstaller::isArchiveSupported, bpy::arg("tree"))
|
||||
|
||||
Reference in New Issue
Block a user