From b939f7e88e0201f787c1927a0c9b2ce539239fb8 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 21 Dec 2018 02:30:58 -0600 Subject: [PATCH 01/14] Add enumerations for plugin states and mod states --- src/runner/pythonrunner.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 2f2e01f..436b7c2 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1093,6 +1093,12 @@ BOOST_PYTHON_MODULE(mobase) QFlags_from_python_obj(); Functor0_converter(); // converter for the onRefreshed-callback + bpy::enum_("PluginState") + .value("missing", IPluginList::STATE_MISSING) + .value("inactive", IPluginList::STATE_INACTIVE) + .value("active", IPluginList::STATE_ACTIVE) + ; + bpy::class_("IPluginList") .def("state", bpy::pure_virtual(&MOBase::IPluginList::state)) .def("priority", bpy::pure_virtual(&MOBase::IPluginList::priority)) @@ -1111,6 +1117,16 @@ BOOST_PYTHON_MODULE(mobase) QFlags_from_python_obj(); Functor2_converter(); // converter for the onModStateChanged-callback + bpy::enum_("ModState") + .value("exists", IModList::STATE_EXISTS) + .value("active", IModList::STATE_ACTIVE) + .value("essential", IModList::STATE_ESSENTIAL) + .value("empty", IModList::STATE_EMPTY) + .value("endorsed", IModList::STATE_ENDORSED) + .value("valid", IModList::STATE_VALID) + .value("alternate", IModList::STATE_ALTERNATE) + ; + bpy::class_("IModList") .def("displayName", bpy::pure_virtual(&MOBase::IModList::displayName)) .def("allMods", bpy::pure_virtual(&MOBase::IModList::allMods)) From c9d77cf9485127a75660a66ae09376351c03df88 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 5 Jan 2019 16:34:11 -0600 Subject: [PATCH 02/14] Change qPrintable to qUtf8Printable to better support non-ASCII text --- src/proxy/proxypython.cpp | 2 +- src/runner/pythonrunner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy/proxypython.cpp b/src/proxy/proxypython.cpp index 7220470..44169b5 100644 --- a/src/proxy/proxypython.cpp +++ b/src/proxy/proxypython.cpp @@ -171,7 +171,7 @@ bool ProxyPython::init(IOrganizer *moInfo) return true; } else { DWORD error = ::GetLastError(); - qCritical("Failed to load python runner (%s): %s", qPrintable(m_TempRunnerFile), qPrintable(windowsErrorString(error))); + qCritical("Failed to load python runner (%s): %s", qUtf8Printable(m_TempRunnerFile), qUtf8Printable(windowsErrorString(error))); if (error == ERROR_MOD_NOT_FOUND) { m_LoadFailure = FAIL_MISSINGDEPENDENCIES; } diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 436b7c2..f8f8c16 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1408,7 +1408,7 @@ QList PythonRunner::instantiate(const QString &pluginName) return interfaceList; } catch (const bpy::error_already_set&) { - qWarning("failed to run python script \"%s\"", qPrintable(pluginName)); + qWarning("failed to run python script \"%s\"", qUtf8Printable(pluginName)); reportPythonError(); } return QList(); From 66391098b61769477a6eeaab8c54d9e5bc69a8f0 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 5 Jan 2019 16:43:30 -0600 Subject: [PATCH 03/14] Update version to 2.0.1.0 --- src/proxy/proxypython.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proxy/proxypython.cpp b/src/proxy/proxypython.cpp index 44169b5..57c4511 100644 --- a/src/proxy/proxypython.cpp +++ b/src/proxy/proxypython.cpp @@ -196,7 +196,7 @@ QString ProxyPython::description() const VersionInfo ProxyPython::version() const { - return VersionInfo(2, 0, 0, VersionInfo::RELEASE_FINAL); + return VersionInfo(2, 0, 1, VersionInfo::RELEASE_FINAL); } bool ProxyPython::isActive() const From 41a4f273d694d13aeecf36a6ce2f30d2481ae5a9 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 01:39:05 -0600 Subject: [PATCH 04/14] Support for force loading libraries --- src/runner/proxypluginwrappers.cpp | 5 +++++ src/runner/proxypluginwrappers.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/runner/proxypluginwrappers.cpp b/src/runner/proxypluginwrappers.cpp index d8b4672..2b55101 100644 --- a/src/runner/proxypluginwrappers.cpp +++ b/src/runner/proxypluginwrappers.cpp @@ -178,6 +178,11 @@ QList IPluginGameWrapper::executables() const return basicWrapperFunctionImplementation>(this, "executables"); } +QList IPluginGameWrapper::executableForcedLoads() const +{ + return basicWrapperFunctionImplementation>(this, "executableForcedLoads"); +} + QString IPluginGameWrapper::steamAPPId() const { return basicWrapperFunctionImplementation(this, "steamAPPId"); diff --git a/src/runner/proxypluginwrappers.h b/src/runner/proxypluginwrappers.h index 61a8bae..712707a 100644 --- a/src/runner/proxypluginwrappers.h +++ b/src/runner/proxypluginwrappers.h @@ -101,6 +101,7 @@ public: virtual QDir documentsDirectory() const override; virtual QDir savesDirectory() const override; virtual QList executables() const override; + virtual QList executableForcedLoads() const override; virtual QString steamAPPId() const override; virtual QStringList primaryPlugins() const override; virtual QStringList gameVariants() const override; From 956d481ca40d2c2eddb93ab4bf078b3a62a4f1d5 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 30 Jan 2019 20:53:48 -0600 Subject: [PATCH 05/14] Make logs more consistent in format and content --- src/runner/pythonrunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index f8f8c16..2acfcbb 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -73,7 +73,7 @@ struct QString_to_python_str { static PyObject *convert(const QString &str) { // It's safer to explicitly convert to unicode as if we don't, this can return either str or unicode without it being easy to know which to expect - bpy::object pyStr = bpy::object(str.toUtf8().constData()); + bpy::object pyStr = bpy::object(qUtf8Printable(str)); if (SIPBytes_Check(pyStr.ptr())) pyStr = pyStr.attr("decode")("utf-8"); return bpy::incref(pyStr.ptr()); From 30ab7b8e149f78cabd8e036d1cb89789b7c4fbec Mon Sep 17 00:00:00 2001 From: Brian Munro Date: Tue, 12 Feb 2019 21:37:41 +0200 Subject: [PATCH 06/14] Removed unneeded cmake variables due to that umbrella handles them correctly. Requires testing. --- CMakeLists.txt | 6 ------ src/proxy/CMakeLists.txt | 3 +-- src/runner/CMakeLists.txt | 4 +--- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12efdf8..30add94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,12 +11,6 @@ SET(DEPENDENCIES_DIR CACHE PATH "") # hint to find qt in dependencies path LIST(APPEND CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake) -FILE(GLOB_RECURSE PYTHON_ROOT ${DEPENDENCIES_DIR}/Python*/pyconfig.h.in) -GET_FILENAME_COMPONENT(PYTHON_ROOT ${PYTHON_ROOT} DIRECTORY) - -FILE(GLOB_RECURSE SIP_ROOT ${DEPENDENCIES_DIR}/sip-*/siplib/sip.h) -GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} DIRECTORY) - # need to install python IF(EXISTS "${PYTHON_ROOT}/PCbuild/python27.dll") INSTALL(FILES ${PYTHON_ROOT}/PCbuild/python27.dll DESTINATION bin) diff --git a/src/proxy/CMakeLists.txt b/src/proxy/CMakeLists.txt index 4df9b28..acce88a 100644 --- a/src/proxy/CMakeLists.txt +++ b/src/proxy/CMakeLists.txt @@ -34,8 +34,7 @@ ADD_DEFINITIONS(-DUNICODE -D_UNICODE) INCLUDE_DIRECTORIES(${project_path}/uibase/src ${project_path}/plugin_python/src/runner/ - ${PYTHON_ROOT}/Include - ${PYTHON_ROOT}/PC) + ${PYTHON_ROOT}/Include) LINK_DIRECTORIES(${lib_path}) diff --git a/src/runner/CMakeLists.txt b/src/runner/CMakeLists.txt index 0b5194d..88ca56b 100644 --- a/src/runner/CMakeLists.txt +++ b/src/runner/CMakeLists.txt @@ -37,13 +37,11 @@ SET(lib_path "${project_path}/../../install/libs") INCLUDE_DIRECTORIES(${project_path}/uibase/src ${project_path}/game_features/src ${PYTHON_ROOT}/Include - ${SIP_ROOT} ${PYTHON_ROOT}/PC) LINK_DIRECTORIES(${lib_path} ${PYTHON_ROOT}/PCbuild - ${Boost_LIBRARY_DIRS} - ${SIP_ROOT}) + ${Boost_LIBRARY_DIRS}) ADD_LIBRARY(${PROJ_NAME} SHARED ${${PROJ_NAME}_HDRS} ${${PROJ_NAME}_SRCS} ${${PROJ_NAME}_translations_qm}) TARGET_LINK_LIBRARIES(${PROJ_NAME} From bab649af4338220318d4de299fbea816971bbfc0 Mon Sep 17 00:00:00 2001 From: Silarn Date: Mon, 20 Aug 2018 18:45:05 -0500 Subject: [PATCH 07/14] Update to support API changes to uibase --- src/runner/uibasewrappers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index ad6db79..9e63a22 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -63,8 +63,8 @@ public: { m_Wrapped->requestFiles(gameName, modID, userData); } void requestFileInfo(QString gameName, int modID, int fileID, QVariant userData) { m_Wrapped->requestFileInfo(gameName, modID, fileID, userData); } - void requestToggleEndorsement(QString gameName, int modID, bool endorse, QVariant userData) - { m_Wrapped->requestToggleEndorsement(gameName, modID, endorse, userData); } + void requestToggleEndorsement(QString gameName, int modID, QString modVersion, bool endorse, QVariant userData) + { m_Wrapped->requestToggleEndorsement(gameName, modID, modVersion, endorse, userData); } void onFilesAvailable(boost::python::object callback) { m_FilesAvailableHandler = callback; @@ -387,7 +387,7 @@ struct IModRepositoryBridgeWrapper: MOBase::IModRepositoryBridge, boost::python: virtual void requestFiles(QString gameName, int modID, QVariant userData) { this->get_override("requestFiles")(gameName, modID, userData); } virtual void requestFileInfo(QString gameName, int modID, int fileID, QVariant userData) { this->get_override("requestFileInfo")(gameName, modID, fileID, userData); } virtual void requestDownloadURL(QString gameName, int modID, int fileID, QVariant userData) { this->get_override("requestDownloadURL")(gameName, modID, fileID, userData); } - virtual void requestToggleEndorsement(QString gameName, int modID, bool endorse, QVariant userData) { this->get_override("requestToggleEndorsement")(gameName, modID, endorse, userData); } + virtual void requestToggleEndorsement(QString gameName, int modID, QString modVersion, bool endorse, QVariant userData) { this->get_override("requestToggleEndorsement")(gameName, modID, endorse, userData); } }; struct IInstallationManagerWrapper: MOBase::IInstallationManager, boost::python::wrapper From caee1fb7f69d76a33e82b7b6d7b650e6febfe865 Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 31 Jan 2019 02:20:08 -0600 Subject: [PATCH 08/14] Change to uibase requires Qt5Network linkage --- src/proxy/CMakeLists.txt | 2 ++ src/runner/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/proxy/CMakeLists.txt b/src/proxy/CMakeLists.txt index 4df9b28..f196398 100644 --- a/src/proxy/CMakeLists.txt +++ b/src/proxy/CMakeLists.txt @@ -13,6 +13,7 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON) SET(CMAKE_AUTOMOC ON) SET(CMAKE_AUTOUIC ON) FIND_PACKAGE(Qt5Widgets REQUIRED) +FIND_PACKAGE(Qt5Network REQUIRED) #QT5_WRAP_UI(${PROJ_NAME}_UIHDRS ${${PROJ_NAME}_FORMS}) SET(Boost_USE_STATIC_LIBS ON) @@ -42,6 +43,7 @@ LINK_DIRECTORIES(${lib_path}) ADD_LIBRARY(${PROJ_NAME} SHARED ${${PROJ_NAME}_HDRS} ${${PROJ_NAME}_SRCS} ${${PROJ_NAME}_UIHDRS}) TARGET_LINK_LIBRARIES(${PROJ_NAME} Qt5::Widgets + Qt5::Network ${Boost_LIBRARIES} uibase) diff --git a/src/runner/CMakeLists.txt b/src/runner/CMakeLists.txt index 0b5194d..9a15b21 100644 --- a/src/runner/CMakeLists.txt +++ b/src/runner/CMakeLists.txt @@ -15,6 +15,7 @@ SET(CMAKE_AUTOMOC ON) SET(CMAKE_AUTOUIC ON) ADD_DEFINITIONS(-DQT_NO_KEYWORDS) FIND_PACKAGE(Qt5Widgets REQUIRED) +FIND_PACKAGE(Qt5Network REQUIRED) #QT5_WRAP_UI(${PROJ_NAME}_UIHDRS ${${PROJ_NAME}_FORMS}) FIND_PACKAGE(Qt5LinguistTools) QT5_CREATE_TRANSLATION(${PROJ_NAME}_translations_qm ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/${PROJ_NAME}_en.ts) @@ -48,6 +49,7 @@ LINK_DIRECTORIES(${lib_path} ADD_LIBRARY(${PROJ_NAME} SHARED ${${PROJ_NAME}_HDRS} ${${PROJ_NAME}_SRCS} ${${PROJ_NAME}_translations_qm}) TARGET_LINK_LIBRARIES(${PROJ_NAME} Qt5::Widgets + Qt5::Network uibase) ADD_DEFINITIONS(-DPYTHONRUNNER_LIBRARY) From 97a20d522ae150e24bee26fc7901352068bed1fe Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 22 Feb 2019 22:16:17 -0600 Subject: [PATCH 09/14] Add setGameName to the mod interface --- src/runner/pythonrunner.cpp | 1 + src/runner/uibasewrappers.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 2acfcbb..a38f8f7 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1069,6 +1069,7 @@ BOOST_PYTHON_MODULE(mobase) .def("addCategory", bpy::pure_virtual(&IModInterface::addCategory)) .def("removeCategory", bpy::pure_virtual(&IModInterface::removeCategory)) .def("categories", bpy::pure_virtual(&IModInterface::categories)) + .def("setGameName", bpy::pure_virtual(&IModInterface::setGameName)) .def("setName", bpy::pure_virtual(&IModInterface::setName)) .def("remove", bpy::pure_virtual(&IModInterface::remove)) ; diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index 9e63a22..247bc5d 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -408,6 +408,7 @@ struct IModInterfaceWrapper: MOBase::IModInterface, boost::python::wrapperget_override("setNexusID")(nexusID); } virtual void setInstallationFile(const QString &fileName) override { this->get_override("setInstallationFile")(fileName); } virtual void addNexusCategory(int categoryID) override { this->get_override("addNexusCategory")(categoryID); } + virtual void setGameName(const QString &gameName) override { this->get_override("setGameName")(gameName); } virtual bool setName(const QString &name) override { return this->get_override("setName")(name); } virtual bool remove() override { return this->get_override("remove")(); } virtual void addCategory(const QString &categoryName) override { this->get_override("addCategory")(categoryName); } From 65eb0c637430b1bd038d70f4dd7bc335a5f7f613 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 23 Feb 2019 07:11:19 -0600 Subject: [PATCH 10/14] Add function to get configured mods directory --- src/runner/pythonrunner.cpp | 1 + src/runner/uibasewrappers.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index a38f8f7..53b1ed1 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -960,6 +960,7 @@ BOOST_PYTHON_MODULE(mobase) .def("downloadsPath", bpy::pure_virtual(&IOrganizer::downloadsPath)) .def("overwritePath", bpy::pure_virtual(&IOrganizer::overwritePath)) .def("basePath", bpy::pure_virtual(&IOrganizer::basePath)) + .def("modsPath", bpy::pure_virtual(&IOrganizer::modsPath)) .def("appVersion", bpy::pure_virtual(&IOrganizer::appVersion)) .def("getMod", bpy::pure_virtual(&IOrganizer::getMod), bpy::return_value_policy()) .def("createMod", bpy::pure_virtual(&IOrganizer::createMod), bpy::return_value_policy()) diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index 247bc5d..885d0c9 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -228,6 +228,10 @@ struct IOrganizerWrapper : MOBase::IOrganizer, { return this->get_override("basePath")(); } + virtual QString modsPath() const override + { + return this->get_override("modsPath")(); + } virtual MOBase::VersionInfo appVersion() const override { return this->get_override("appVersion")(); From c17d703b15549942089fc470f42952f5513789e9 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Thu, 7 Mar 2019 11:20:59 -0600 Subject: [PATCH 11/14] Add function for tracking status --- src/runner/uibasewrappers.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index 885d0c9..6978283 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -94,6 +94,14 @@ public: Qt::UniqueConnection); } + void onTrackingToggled(boost::python::object callback) { + m_TrackingToggledHandler = callback; + connect(m_Wrapped, SIGNAL(trackingToggled(int,QVariant,bool)), + this, SLOT(trackingToggled(int,QVariant,bool)), + Qt::UniqueConnection); + + } + void onRequestFailed(boost::python::object callback) { m_FailedHandler = callback; connect(m_Wrapped, SIGNAL(requestFailed(int,int,QVariant,QString)), @@ -180,6 +188,26 @@ private Q_SLOTS: } } + void trackingToggled(int modID, QVariant userData, bool tracked) + { + try { + if (m_TrackingToggledHandler.is_none()) { + qCritical("no handler connected"); + return; + } + try { + GILock lock; + m_TrackingToggledHandler(modID, userData, tracked); + } catch (const boost::python::error_already_set&) { + reportPythonError(); + } + } catch (const std::exception &e) { + qCritical("failed to report event: %s", e.what()); + } catch (...) { + qCritical("failed to report event"); + } + } + void requestFailed(int modID, int fileID, QVariant userData, const QString &errorMessage) { try { @@ -197,6 +225,7 @@ private: boost::python::object m_DescriptionAvailableHandler; boost::python::object m_FileInfoHandler; boost::python::object m_EndorsementToggledHandler; + boost::python::object m_TrackingToggledHandler; boost::python::object m_FailedHandler; }; From 3eb85cd17fc629475afb256d78e2444cf054e2ef Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sun, 24 Mar 2019 21:28:13 -0500 Subject: [PATCH 12/14] Update for startApplication --- src/runner/pythonrunner.cpp | 2 +- src/runner/uibasewrappers.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 53b1ed1..c1e00d0 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -982,7 +982,7 @@ BOOST_PYTHON_MODULE(mobase) .def("pluginList", bpy::pure_virtual(&IOrganizer::pluginList), bpy::return_value_policy()) .def("modList", bpy::pure_virtual(&IOrganizer::modList), bpy::return_value_policy()) .def("profile", bpy::pure_virtual(&IOrganizer::profile), bpy::return_value_policy()) - .def("startApplication", bpy::pure_virtual(&IOrganizer::startApplication), ((bpy::arg("args")=QStringList()), (bpy::arg("cwd")=""), (bpy::arg("profile")="")), bpy::return_value_policy()) + .def("startApplication", bpy::pure_virtual(&IOrganizer::startApplication), ((bpy::arg("args")=QStringList()), (bpy::arg("cwd")=""), (bpy::arg("profile")=""), (bpy::arg("forcedCustomOverwrite")=""), (bpy::arg("ignoreCustomOverwrite")=false)), bpy::return_value_policy()) //.def("waitForApplication", bpy::pure_virtual(&IOrganizer::waitForApplication), (bpy::arg("exitCode")=nullptr), bpy::return_value_policy()) // Use wrapped version .def("waitForApplication", waitForApplication) diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index 6978283..b31bb60 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -356,9 +356,11 @@ struct IOrganizerWrapper : MOBase::IOrganizer, virtual HANDLE startApplication(const QString &executable, const QStringList &args = QStringList(), const QString &cwd = "", - const QString &profile = "") override + const QString &profile = "", + const QString &forcedCustomOverwrite = "", + bool ignoreCustomOverwrite = false) override { - return reinterpret_cast(this->get_override("startApplication")(executable, args, cwd, profile).as()); + return reinterpret_cast(this->get_override("startApplication")(executable, args, cwd, profile, forcedCustomOverwrite, ignoreCustomOverwrite).as()); } virtual bool waitForApplication(HANDLE handle, LPDWORD exitCode = nullptr) const override From 78278ae57d254241a50abe0acf59b14c2a2fd85a Mon Sep 17 00:00:00 2001 From: LePresidente Date: Mon, 29 Apr 2019 10:30:47 +0200 Subject: [PATCH 13/14] Support Appveyor. --- appveyor.yml | 36 ++++++++++++++++++++++++++++++++++++ src/proxy/CMakeLists.txt | 4 ++-- src/runner/CMakeLists.txt | 2 +- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..4fb88d7 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,36 @@ +version: 1.0.{build} +skip_branch_with_pr: true +image: Visual Studio 2017 +environment: + WEBHOOK_URL: + secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1Vbg57wBaeLhi49uGjxPw5GVujHku6kxN6ab89zhbS5GVeluR76GM83IbKV4Sh7udXzoYZZdg6YudtYHzdhCgUeiedpswbuczTq9ceIkkfSEWZuh/lMAAVVwvcGsJAnoPFw= +build_script: +- cmd: >- + git clone --depth=1 --branch=%APPVEYOR_REPO_BRANCH% https://github.com/ModOrganizer2/modorganizer-umbrella.git c:\projects\modorganizer-umbrella 2> $null + + mkdir c:\projects\modorganizer-build -type directory + + cd c:\projects\modorganizer-umbrella + + C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True %APPVEYOR_PROJECT_NAME% +artifacts: +- path: vsbuild\src\proxy\RelWithDebInfo\uibase.dll + name: uibase_dll +- path: vsbuild\src\proxy\RelWithDebInfo\uibase.pdb + name: uibase_pdb +- path: vsbuild\src\proxy\RelWithDebInfo\uibase.lib + name: uibase_lib +- path: vsbuild\src\runner\RelWithDebInfo\pythonrunner.dll + name: pythonrunner_dll +- path: vsbuild\src\runner\RelWithDebInfo\pythonrunner.pdb + name: pythonrunner_pdb +- path: vsbuild\src\runner\RelWithDebInfo\pythonrunner.lib + name: pythonrunner_lib +on_success: + - ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER + - ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1 + - ps: ./send.ps1 success $env:WEBHOOK_URL +on_failure: + - ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER + - ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1 + - ps: ./send.ps1 failure $env:WEBHOOK_URL \ No newline at end of file diff --git a/src/proxy/CMakeLists.txt b/src/proxy/CMakeLists.txt index b5fb803..ff53fef 100644 --- a/src/proxy/CMakeLists.txt +++ b/src/proxy/CMakeLists.txt @@ -25,7 +25,7 @@ IF (Boost_FOUND) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) ENDIF (Boost_FOUND) -SET(default_project_path "${CMAKE_SOURCE_DIR}/../..") +SET(default_project_path "${DEPENDENCIES_DIR}/modorganizer_super") GET_FILENAME_COMPONENT(${default_project_path} ${default_project_path} REALPATH) SET(project_path "${default_project_path}" CACHE PATH "path to the other mo projects") @@ -34,7 +34,7 @@ SET(lib_path "${project_path}/../../install/libs") ADD_DEFINITIONS(-DUNICODE -D_UNICODE) INCLUDE_DIRECTORIES(${project_path}/uibase/src - ${project_path}/plugin_python/src/runner/ + ${CMAKE_SOURCE_DIR}/src/runner/ ${PYTHON_ROOT}/Include) LINK_DIRECTORIES(${lib_path}) diff --git a/src/runner/CMakeLists.txt b/src/runner/CMakeLists.txt index 1c37997..e237e07 100644 --- a/src/runner/CMakeLists.txt +++ b/src/runner/CMakeLists.txt @@ -29,7 +29,7 @@ IF (Boost_FOUND) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) ENDIF (Boost_FOUND) -SET(default_project_path "${CMAKE_SOURCE_DIR}/..") +SET(default_project_path "${DEPENDENCIES_DIR}/modorganizer_super") GET_FILENAME_COMPONENT(${default_project_path} ${default_project_path} REALPATH) SET(project_path "${default_project_path}" CACHE PATH "path to the other mo projects") From 352e5c2103a5666ad0b55bc3bc82a1bd0840d11c Mon Sep 17 00:00:00 2001 From: LePresidente Date: Mon, 29 Apr 2019 14:07:19 +0200 Subject: [PATCH 14/14] Fixed artifacts for proxy_python. --- appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4fb88d7..6069403 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,12 +14,12 @@ build_script: C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True %APPVEYOR_PROJECT_NAME% artifacts: -- path: vsbuild\src\proxy\RelWithDebInfo\uibase.dll - name: uibase_dll -- path: vsbuild\src\proxy\RelWithDebInfo\uibase.pdb - name: uibase_pdb -- path: vsbuild\src\proxy\RelWithDebInfo\uibase.lib - name: uibase_lib +- path: vsbuild\src\proxy\RelWithDebInfo\plugin_python.dll + name: plugin_python_dll +- path: vsbuild\src\proxy\RelWithDebInfo\plugin_python.pdb + name: plugin_python_pdb +- path: vsbuild\src\proxy\RelWithDebInfo\plugin_python.lib + name: plugin_python_lib - path: vsbuild\src\runner\RelWithDebInfo\pythonrunner.dll name: pythonrunner_dll - path: vsbuild\src\runner\RelWithDebInfo\pythonrunner.pdb