summaryrefslogtreecommitdiffstats
path: root/logic/updater
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-05 00:06:55 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-05 00:06:55 +0100
commitb49fa9d2a99b1230dd9b3146d5a1bb65848b4aae (patch)
treea4d2afeb54441bc970861d700458675b36a0188a /logic/updater
parente558584af0e6a168d76868e89d132aeebd0aa36a (diff)
downloadMultiMC-b49fa9d2a99b1230dd9b3146d5a1bb65848b4aae.tar
MultiMC-b49fa9d2a99b1230dd9b3146d5a1bb65848b4aae.tar.gz
MultiMC-b49fa9d2a99b1230dd9b3146d5a1bb65848b4aae.tar.lz
MultiMC-b49fa9d2a99b1230dd9b3146d5a1bb65848b4aae.tar.xz
MultiMC-b49fa9d2a99b1230dd9b3146d5a1bb65848b4aae.zip
Mess with the updater again.
Diffstat (limited to 'logic/updater')
-rw-r--r--logic/updater/DownloadUpdateTask.cpp6
-rw-r--r--logic/updater/DownloadUpdateTask.h4
-rw-r--r--logic/updater/UpdateChecker.cpp1
3 files changed, 6 insertions, 5 deletions
diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp
index 029286dd..b82574f7 100644
--- a/logic/updater/DownloadUpdateTask.cpp
+++ b/logic/updater/DownloadUpdateTask.cpp
@@ -402,12 +402,17 @@ DownloadUpdateTask::processFileLists(NetJob *job,
if (isUpdater)
{
+#ifdef MultiMC_UPDATER_DRY_RUN
+ QLOG_DEBUG() << "Skipping updater download and using local version.";
+#else
auto cache_entry = MMC->metacache()->resolveEntry("root", entry.path);
QLOG_DEBUG() << "Updater will be in " << cache_entry->getFullPath();
// force check.
cache_entry->stale = true;
+
auto download = CacheDownload::make(QUrl(source.url), cache_entry);
job->addNetAction(download);
+#endif
}
else
{
@@ -514,7 +519,6 @@ bool DownloadUpdateTask::fixPathForOSX(QString &path)
{
// remove the prefix and add a new, more appropriate one.
path.remove(0, 12);
- path = QString("../../") + path;
return true;
}
else
diff --git a/logic/updater/DownloadUpdateTask.h b/logic/updater/DownloadUpdateTask.h
index b1d14846..4feab871 100644
--- a/logic/updater/DownloadUpdateTask.h
+++ b/logic/updater/DownloadUpdateTask.h
@@ -206,11 +206,9 @@ protected:
* The updater runs in MultiMC.app/Contents/MacOs by default
* The destination paths are such as this: MultiMC.app/blah/blah
*
- * Therefore we chop off the 'MultiMC.app' prefix and prepend ../..
+ * Therefore we chop off the 'MultiMC.app' prefix
*
* Returns false if the path couldn't be fixed (is invalid)
- *
- * Has no effect on systems that aren't OSX
*/
static bool fixPathForOSX(QString &path);
diff --git a/logic/updater/UpdateChecker.cpp b/logic/updater/UpdateChecker.cpp
index d0795c0d..9af11cab 100644
--- a/logic/updater/UpdateChecker.cpp
+++ b/logic/updater/UpdateChecker.cpp
@@ -17,7 +17,6 @@
#include "MultiMC.h"
-#include "config.h"
#include "logger/QsLog.h"
#include <QJsonObject>