diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-01-31 16:59:03 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-02 11:30:24 +0200 |
commit | 6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f (patch) | |
tree | 28aaf76918d1ff0ffe2a437573bb1ab7a012c4ec /logic/updater/DownloadUpdateTask.h | |
parent | e508728246043fcaf8bee565e73b15e15eb2e531 (diff) | |
download | MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.gz MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.lz MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.xz MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.zip |
NOISSUE Split MultiMC app object into MultiMC and Env
Diffstat (limited to 'logic/updater/DownloadUpdateTask.h')
-rw-r--r-- | logic/updater/DownloadUpdateTask.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/logic/updater/DownloadUpdateTask.h b/logic/updater/DownloadUpdateTask.h index ecfa349b..9a994687 100644 --- a/logic/updater/DownloadUpdateTask.h +++ b/logic/updater/DownloadUpdateTask.h @@ -27,13 +27,13 @@ class DownloadUpdateTask : public Task Q_OBJECT public: - explicit DownloadUpdateTask(QString repoUrl, int versionId, QObject* parent=0); + explicit DownloadUpdateTask(QString rootPath, QString repoUrl, int versionId, QObject* parent=0); /*! * Gets the directory that contains the update files. */ QString updateFilesDir(); - + public: // TODO: We should probably put these data structures into a separate header... @@ -130,7 +130,7 @@ protected: /*! * Downloads the version info files from the repository. * The files for both the current build, and the build that we're updating to need to be downloaded. - * If the current version's info file can't be found, MultiMC will not delete files that + * If the current version's info file can't be found, MultiMC will not delete files that * were removed between versions. It will still replace files that have changed, however. * Note that although the repository URL for the current version is not given to the update task, * the task will attempt to look it up in the UpdateChecker's channel list. @@ -142,7 +142,7 @@ protected: * This function is called when version information is finished downloading. * This handles parsing the JSON downloaded by the version info network job and then calls processFileLists. * Note that this function will sometimes be called even if the version info download emits failed. If - * we couldn't download the current version's info file, we can still update. This will be called even if the + * we couldn't download the current version's info file, we can still update. This will be called even if the * current version's info file fails to download, as long as the new version's info file succeeded. */ virtual void parseDownloadedVersionInfo(); @@ -176,7 +176,7 @@ protected: //! Network job for downloading version info files. NetJobPtr m_vinfoNetJob; - + //! Network job for downloading update files. NetJobPtr m_filesNetJob; @@ -188,6 +188,9 @@ protected: int m_cVersionId; QString m_cRepoUrl; + // path to the root of the application + QString m_rootPath; + /*! * Temporary directory to store update files in. * This will be set to not auto delete. Task will fail if this fails to be created. @@ -199,9 +202,9 @@ protected: * This fixes destination paths for OSX. * 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 - * + * * Returns false if the path couldn't be fixed (is invalid) */ static bool fixPathForOSX(QString &path); |