diff --git a/src/mobase/wrappers/basic_classes.cpp b/src/mobase/wrappers/basic_classes.cpp index de28e71..560149b 100644 --- a/src/mobase/wrappers/basic_classes.cpp +++ b/src/mobase/wrappers/basic_classes.cpp @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include #include #include @@ -198,6 +200,23 @@ namespace mo2::python { .def("forced", &ExecutableForcedLoadSetting::forced) .def("library", &ExecutableForcedLoadSetting::library) .def("process", &ExecutableForcedLoadSetting::process); + + py::class_>(m, "IExecutable") + .def("title", &IExecutable::title) + .def("binaryInfo", &IExecutable::binaryInfo) + .def("arguments", &IExecutable::arguments) + .def("steamAppID", &IExecutable::steamAppID) + .def("workingDirectory", &IExecutable::workingDirectory) + .def("isShownOnToolbar", &IExecutable::isShownOnToolbar) + .def("usesOwnIcon", &IExecutable::usesOwnIcon) + .def("minimizeToSystemTray", &IExecutable::minimizeToSystemTray) + .def("hide", &IExecutable::hide); + + py::class_(m, "IExecutablesList") + .def("executables", &IExecutablesList::executables) + .def("getByTitle", &IExecutablesList::getByTitle, "title"_a) + .def("getByBinary", &IExecutablesList::getByBinary, "info"_a) + .def("titleExists", &IExecutablesList::titleExists, "title"_a); } void add_modinterface_classes(py::module_ m) @@ -625,6 +644,8 @@ namespace mo2::python { .def("pluginList", &IOrganizer::pluginList, py::return_value_policy::reference) .def("modList", &IOrganizer::modList, py::return_value_policy::reference) + .def("executablesList", &IOrganizer::executablesList, + py::return_value_policy::reference) .def("gameFeatures", &IOrganizer::gameFeatures, py::return_value_policy::reference) .def("profile", &IOrganizer::profile) diff --git a/tests/mocks/MockOrganizer.h b/tests/mocks/MockOrganizer.h index 6508fc0..39214e0 100644 --- a/tests/mocks/MockOrganizer.h +++ b/tests/mocks/MockOrganizer.h @@ -37,6 +37,7 @@ class MockOrganizer : public IOrganizer { MOCK_METHOD(MOBase::IDownloadManager*, downloadManager, (), (const, override)); MOCK_METHOD(MOBase::IPluginList*, pluginList, (), (const, override)); MOCK_METHOD(MOBase::IModList*, modList, (), (const, override)); + MOCK_METHOD(MOBase::IExecutablesList*, executablesList, (), (const, override)); MOCK_METHOD(std::shared_ptr, profile, (), (const, override)); MOCK_METHOD(QStringList, profileNames, (), (const, override)); MOCK_METHOD(std::shared_ptr, getProfile, (const QString& name), (const, override));