summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-05 14:24:33 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-05 14:24:33 +0100
commita64eebf8eb758971b090b2e87212c2458424797e (patch)
treefb0bfaf4635a06cfea28f030a2932bb97d5de022
parent613c01dab5222a99fa642a466ce37ade53f1c072 (diff)
downloadMultiMC-a64eebf8eb758971b090b2e87212c2458424797e.tar
MultiMC-a64eebf8eb758971b090b2e87212c2458424797e.tar.gz
MultiMC-a64eebf8eb758971b090b2e87212c2458424797e.tar.lz
MultiMC-a64eebf8eb758971b090b2e87212c2458424797e.tar.xz
MultiMC-a64eebf8eb758971b090b2e87212c2458424797e.zip
Add an option to force using local updater binary (for updater development)
-rw-r--r--CMakeLists.txt3
-rw-r--r--config.h.in3
-rw-r--r--logic/updater/DownloadUpdateTask.cpp2
3 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 068282d2..df7ebc64 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -503,7 +503,8 @@ IF(WIN32)
)
ENDIF(WIN32)
-OPTION(MultiMC_UPDATER_DRY_RUN "Enable updater dry-run mode." OFF)
+OPTION(MultiMC_UPDATER_DRY_RUN "Enable updater dry-run mode -- for updater development." OFF)
+OPTION(MultiMC_UPDATER_FORCE_LOCAL "Do not download updated updater -- for updater development." OFF)
OPTION(MultiMC_CODE_COVERAGE "Compiles for code coverage" OFF)
IF(MultiMC_CODE_COVERAGE)
diff --git a/config.h.in b/config.h.in
index 6eb3fcef..8df1fc75 100644
--- a/config.h.in
+++ b/config.h.in
@@ -21,6 +21,9 @@
// enabled for updater dry run
#cmakedefine MultiMC_UPDATER_DRY_RUN
+// enabled for updater dry run
+#cmakedefine MultiMC_UPDATER_FORCE_LOCAL
+
// The commit hash of this build
#define GIT_COMMIT "@MultiMC_GIT_COMMIT@"
diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp
index 6f9d7189..e16d2aa2 100644
--- a/logic/updater/DownloadUpdateTask.cpp
+++ b/logic/updater/DownloadUpdateTask.cpp
@@ -404,7 +404,7 @@ DownloadUpdateTask::processFileLists(NetJob *job,
if (isUpdater)
{
-#ifdef MultiMC_UPDATER_DRY_RUN
+#ifdef MultiMC_UPDATER_FORCE_LOCAL
QLOG_DEBUG() << "Skipping updater download and using local version.";
#else
auto cache_entry = MMC->metacache()->resolveEntry("root", entry.path);