1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-20 20:29:10 +00:00

Redist Updating

This is the crowning feature: the whole point of this exercise. You can
now update redists from the client launcher itself. To activate this
functionality, you will need to flag the file 0x10 in the manifest. I
recommend listing your redists in the patcher manifests.
This commit is contained in:
2013-11-29 20:25:52 -05:00
parent d855d86475
commit 1bcd17c850
5 changed files with 219 additions and 45 deletions

View File

@ -54,6 +54,7 @@ class plClientLauncher
public:
typedef std::function<class pfPatcher*(void)> CreatePatcherFunc;
typedef std::function<void(ENetError, const plString&)> ErrorFunc;
typedef std::function<bool(const plFileName&)> InstallRedistFunc;
typedef std::function<void(const plFileName&, const plString&)> LaunchClientFunc;
typedef std::function<void(const plString&)> StatusFunc;
@ -71,7 +72,9 @@ private:
plFileName fServerIni;
plFileName fClientExecutable;
std::unique_ptr<class plShardStatus> fStatusThread;
std::unique_ptr<class plShardStatus> fStatusThread;
std::unique_ptr<class plRedistUpdater> fInstallerThread;
CreatePatcherFunc fPatcherFactory;
LaunchClientFunc fLaunchClientFunc;
@ -86,6 +89,11 @@ public:
plClientLauncher();
~plClientLauncher();
/** Launch whatever client we think is appropriate. Please note that you should not call this unless you know
* absolutely without question what you are doing!
*/
void LaunchClient() const;
/** Begin the next logical patch operation. We are internally tracking if this is a self patch or a client patch.
* All you need to do is make certain the doggone callbacks are set so that your UI will update. In theory, you
* should never call this from your UI code since we manage this state for you.
@ -129,6 +137,11 @@ public:
*/
void SetErrorProc(ErrorFunc proc);
/** Set a callback that will execute and wait for redistributable installers.
* \remarks This will be called from a worker thread.
*/
void SetInstallerProc(InstallRedistFunc proc);
/** Set a patcher factory. */
void SetPatcherFactory(CreatePatcherFunc factory) { fPatcherFactory = factory; }