mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-06 03:29:55 -06:00
Redirected Install button to custom implementation
This currently fades out and closes the game upon accepting the message, it does not yet reboot into the installer menu using --install-dlc.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
static const std::string GameDirectory = "game";
|
||||
static const std::string DLCDirectory = "dlc";
|
||||
static const std::string ApotosShamarDirectory = DLCDirectory + "/Apotos & Shamar Adventure Pack";
|
||||
static const std::string ChunnanDirectory = DLCDirectory + "/Chunnan Adventure Pack";
|
||||
static const std::string ChunnanDirectory = DLCDirectory + "/Chun-nan Adventure Pack";
|
||||
static const std::string EmpireCityAdabatDirectory = DLCDirectory + "/Empire City & Adabat Adventure Pack";
|
||||
static const std::string HoloskaDirectory = DLCDirectory + "/Holoska Adventure Pack";
|
||||
static const std::string MazuriDirectory = DLCDirectory + "/Mazuri Adventure Pack";
|
||||
@@ -222,6 +222,19 @@ bool Installer::checkDLCInstall(const std::filesystem::path &baseDirectory, DLC
|
||||
}
|
||||
}
|
||||
|
||||
bool Installer::checkAllDLC(const std::filesystem::path& baseDirectory)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
for (int i = 1; i < (int)DLC::Count; i++)
|
||||
{
|
||||
if (!checkDLCInstall(baseDirectory, (DLC)i))
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool Installer::computeTotalSize(std::span<const FilePair> filePairs, const uint64_t *fileHashes, VirtualFileSystem &sourceVfs, Journal &journal, uint64_t &totalSize)
|
||||
{
|
||||
for (FilePair pair : filePairs)
|
||||
|
||||
@@ -73,6 +73,7 @@ struct Installer
|
||||
|
||||
static bool checkGameInstall(const std::filesystem::path &baseDirectory);
|
||||
static bool checkDLCInstall(const std::filesystem::path &baseDirectory, DLC dlc);
|
||||
static bool checkAllDLC(const std::filesystem::path &baseDirectory);
|
||||
static bool computeTotalSize(std::span<const FilePair> filePairs, const uint64_t *fileHashes, VirtualFileSystem &sourceVfs, Journal &journal, uint64_t &totalSize);
|
||||
static bool copyFiles(std::span<const FilePair> filePairs, const uint64_t *fileHashes, VirtualFileSystem &sourceVfs, const std::filesystem::path &targetDirectory, const std::string &validationFile, bool skipHashChecks, Journal &journal, const std::function<void()> &progressCallback);
|
||||
static bool parseContent(const std::filesystem::path &sourcePath, std::unique_ptr<VirtualFileSystem> &targetVfs, Journal &journal);
|
||||
|
||||
Reference in New Issue
Block a user