summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/windows/updaterwindow.cpp73
-rw-r--r--src/gui/windows/updaterwindow.h4
2 files changed, 3 insertions, 74 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 15773e3d4..283df5ecf 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -680,7 +680,6 @@ void UpdaterWindow::loadUpdates()
file.name,
Append_false);
}
- loadManaPlusUpdates(mUpdatesDir);
loadMods(mUpdatesDir, mUpdateFiles);
}
@@ -713,7 +712,6 @@ void UpdaterWindow::loadLocalUpdates(const std::string &dir)
file.name,
Append_false);
}
- loadManaPlusUpdates(dir);
loadMods(dir, updateFiles);
}
@@ -728,72 +726,6 @@ void UpdaterWindow::unloadUpdates(const std::string &dir)
updateFiles = loadTxtFile(pathJoin(dir,
txtUpdateFile));
}
-
- const std::string fixPath = dir + "/fix";
- for (unsigned int updateIndex = 0,
- fsz = CAST_U32(updateFiles.size());
- updateIndex < fsz;
- updateIndex++)
- {
- UpdaterWindow::removeUpdateFile(dir,
- fixPath,
- updateFiles[updateIndex].name);
- }
- unloadManaPlusUpdates(dir);
-}
-
-void UpdaterWindow::loadManaPlusUpdates(const std::string &dir)
-{
- std::string fixPath = dir + "/fix";
- STD_VECTOR<UpdateFile> updateFiles = loadXMLFile(
- pathJoin(fixPath, xmlUpdateFile),
- false);
-
- for (unsigned int updateIndex = 0,
- fsz = CAST_U32(updateFiles.size());
- updateIndex < fsz;
- updateIndex++)
- {
- const UpdateFile &file = updateFiles[updateIndex];
- if (!file.group.empty())
- continue;
- const std::string name = file.name;
- if (strStartWith(name, "manaplus_"))
- {
- struct stat statbuf;
- std::string fileName = pathJoin(fixPath,
- name);
- if (stat(fileName.c_str(), &statbuf) == 0)
- {
- VirtFs::mountZip(fileName,
- Append_false);
- }
- }
- }
-}
-
-void UpdaterWindow::unloadManaPlusUpdates(const std::string &dir)
-{
- const std::string fixPath = dir + "/fix";
- const STD_VECTOR<UpdateFile> updateFiles = loadXMLFile(
- pathJoin(fixPath, xmlUpdateFile),
- true);
-
- for (unsigned int updateIndex = 0,
- fsz = CAST_U32(updateFiles.size());
- updateIndex < fsz;
- updateIndex++)
- {
- std::string name = updateFiles[updateIndex].name;
- if (strStartWith(name, "manaplus_"))
- {
- struct stat statbuf;
- const std::string file = pathJoin(
- fixPath, name);
- if (stat(file.c_str(), &statbuf) == 0)
- VirtFs::unmountZip(file);
- }
- }
}
void UpdaterWindow::addUpdateFile(const std::string &restrict path,
@@ -900,8 +832,9 @@ void UpdaterWindow::logic()
mCurrentFile = xmlUpdateFile;
mValidateXml = true;
mStoreInMemory = false;
- mDownloadStatus = UpdateDownloadStatus::UPDATE_LIST2;
- download();
+ mDownloadStatus = UpdateDownloadStatus::UPDATE_COMPLETE;
+ //mDownloadStatus = UpdateDownloadStatus::UPDATE_LIST2;
+ //download();
}
break;
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index ba836a658..daa80f978 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -130,10 +130,6 @@ class UpdaterWindow final : public Window,
const std::string &restrict fixPath,
const std::string &filerestrict);
- static void loadManaPlusUpdates(const std::string &dir);
-
- static void unloadManaPlusUpdates(const std::string &dir);
-
static unsigned long getFileHash(const std::string &filePath);
static void loadMods(const std::string &dir,