This commit is contained in:
watrabi
2025-09-18 17:55:52 -04:00
commit 977f1ff4b8
15030 changed files with 17324420 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include "format_string.h"
#include "Progress.h"
#include "BootstrapperSite.h"
//TODO make this guy like bootstrapper public boost::enable_shared_from_this<Bootstrapper> and use shared pointer
class FileDeployer
{
IInstallerSite *_site;
bool _perUser;
DWORD _bytesDownloaded;
public:
FileDeployer(IInstallerSite *site, bool perUser);
void deployVersionedFile(const TCHAR* name, const TCHAR* subfolder, Progress& progress, bool commitData);
DWORD GetBytesDownloaded() const { return _bytesDownloaded; }
private:
std::wstring downloadVersionedFile(const TCHAR* name, Progress& progress, bool usePrimaryCdn);
void cleanupVersionedFile(const std::wstring& name, const std::wstring& path, const std::wstring& fileName);
void deployVersionedFileInternal(const TCHAR* name, const TCHAR* subfolder, Progress& progress, bool usePrimaryCdn,
/*output*/ std::wstring& path, /*output*/ std::wstring& fileName, bool commitData);
};