summaryrefslogtreecommitdiff
path: root/src/selfupdater.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-06-02 12:40:46 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2020-06-02 12:40:46 +0200
commitb8a1365dacd7ffa8705bbb3dcaf2e2dc6613e6fb (patch)
treed8a5fc39c90e35a0aa696730358c63acd3205c1d /src/selfupdater.cpp
parent30361186c14d43b9fa72b7dc4d6ceaf1c3f57868 (diff)
Update after change to CreateArchive. Remove unused archive handler from self-updater.
Diffstat (limited to 'src/selfupdater.cpp')
-rw-r--r--src/selfupdater.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index 501c7ed1..dfe11880 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -71,45 +71,18 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
using namespace MOBase;
using namespace MOShared;
-
-typedef Archive* (*CreateArchiveType)();
-
-
-template <typename T> static T resolveFunction(QLibrary &lib, const char *name)
-{
- T temp = reinterpret_cast<T>(lib.resolve(name));
- if (temp == nullptr) {
- throw std::runtime_error(QObject::tr("invalid 7-zip32.dll: %1").arg(lib.errorString()).toLatin1().constData());
- }
- return temp;
-}
-
-
SelfUpdater::SelfUpdater(NexusInterface *nexusInterface)
: m_Parent(nullptr)
, m_Interface(nexusInterface)
, m_Reply(nullptr)
, m_Attempts(3)
{
- QLibrary archiveLib(QCoreApplication::applicationDirPath() + "\\dlls\\archive.dll");
- if (!archiveLib.load()) {
- throw MyException(tr("archive.dll not loaded: \"%1\"").arg(archiveLib.errorString()));
- }
-
- CreateArchiveType CreateArchiveFunc = resolveFunction<CreateArchiveType>(archiveLib, "CreateArchive");
-
- m_ArchiveHandler = CreateArchiveFunc();
- if (!m_ArchiveHandler->isValid()) {
- throw MyException(InstallationManager::getErrorString(m_ArchiveHandler->getLastError()));
- }
-
m_MOVersion = createVersionInfo();
}
SelfUpdater::~SelfUpdater()
{
- delete m_ArchiveHandler;
}
void SelfUpdater::setUserInterface(QWidget *widget)