|
|
@ -107,6 +107,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
|
|
|
#include "yuzu/game_list.h"
|
|
|
|
#include "yuzu/game_list.h"
|
|
|
|
#include "yuzu/game_list_p.h"
|
|
|
|
#include "yuzu/game_list_p.h"
|
|
|
|
#include "yuzu/hotkeys.h"
|
|
|
|
#include "yuzu/hotkeys.h"
|
|
|
|
|
|
|
|
#include "yuzu/install_dialog.h"
|
|
|
|
#include "yuzu/loading_screen.h"
|
|
|
|
#include "yuzu/loading_screen.h"
|
|
|
|
#include "yuzu/main.h"
|
|
|
|
#include "yuzu/main.h"
|
|
|
|
#include "yuzu/uisettings.h"
|
|
|
|
#include "yuzu/uisettings.h"
|
|
|
@ -1596,38 +1597,67 @@ void GMainWindow::OnMenuLoadFolder() {
|
|
|
|
void GMainWindow::OnMenuInstallToNAND() {
|
|
|
|
void GMainWindow::OnMenuInstallToNAND() {
|
|
|
|
const QString file_filter =
|
|
|
|
const QString file_filter =
|
|
|
|
tr("Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive "
|
|
|
|
tr("Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive "
|
|
|
|
"(*.nca);;Nintendo Submissions Package (*.nsp);;NX Cartridge "
|
|
|
|
"(*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge "
|
|
|
|
"Image (*.xci)");
|
|
|
|
"Image (*.xci)");
|
|
|
|
QString filename = QFileDialog::getOpenFileName(this, tr("Install File"),
|
|
|
|
QStringList files = QFileDialog::getOpenFileNames(this, tr("Install Files"),
|
|
|
|
UISettings::values.roms_path, file_filter);
|
|
|
|
UISettings::values.roms_path, file_filter);
|
|
|
|
|
|
|
|
|
|
|
|
if (filename.isEmpty()) {
|
|
|
|
if (files.isEmpty()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const auto qt_raw_copy = [this](const FileSys::VirtualFile& src,
|
|
|
|
InstallDialog installDialog(this, files);
|
|
|
|
const FileSys::VirtualFile& dest, std::size_t block_size) {
|
|
|
|
if (installDialog.exec() == QDialog::Rejected) {
|
|
|
|
if (src == nullptr || dest == nullptr)
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const QStringList filenames = installDialog.GetFilenames();
|
|
|
|
|
|
|
|
const bool overwrite_files = installDialog.ShouldOverwriteFiles();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int count = 0;
|
|
|
|
|
|
|
|
int total_count = filenames.size();
|
|
|
|
|
|
|
|
bool is_progressdialog_created = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto qt_raw_copy = [this, &count, &total_count, &is_progressdialog_created](
|
|
|
|
|
|
|
|
const FileSys::VirtualFile& src, const FileSys::VirtualFile& dest,
|
|
|
|
|
|
|
|
std::size_t block_size) {
|
|
|
|
|
|
|
|
if (src == nullptr || dest == nullptr) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
if (!dest->Resize(src->GetSize()))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!dest->Resize(src->GetSize())) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::array<u8, 0x1000> buffer{};
|
|
|
|
std::array<u8, 0x1000> buffer{};
|
|
|
|
const int progress_maximum = static_cast<int>(src->GetSize() / buffer.size());
|
|
|
|
const int progress_maximum = static_cast<int>(src->GetSize() / buffer.size());
|
|
|
|
|
|
|
|
|
|
|
|
QProgressDialog progress(
|
|
|
|
if (!is_progressdialog_created) {
|
|
|
|
tr("Installing file \"%1\"...").arg(QString::fromStdString(src->GetName())),
|
|
|
|
ui.action_Install_File_NAND->setEnabled(false);
|
|
|
|
tr("Cancel"), 0, progress_maximum, this);
|
|
|
|
install_progress = new QProgressDialog(
|
|
|
|
progress.setWindowModality(Qt::WindowModal);
|
|
|
|
tr("Installing file \"%1\"...").arg(QString::fromStdString(src->GetName())),
|
|
|
|
|
|
|
|
tr("Cancel"), 0, progress_maximum, this);
|
|
|
|
|
|
|
|
install_progress->setWindowTitle(
|
|
|
|
|
|
|
|
tr("%n file(s) remaining", "", total_count - count - 1));
|
|
|
|
|
|
|
|
install_progress->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint &
|
|
|
|
|
|
|
|
~Qt::WindowMaximizeButtonHint);
|
|
|
|
|
|
|
|
install_progress->setAutoClose(false);
|
|
|
|
|
|
|
|
is_progressdialog_created = true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
install_progress->setWindowTitle(
|
|
|
|
|
|
|
|
tr("%n file(s) remaining", "", total_count - count - 1));
|
|
|
|
|
|
|
|
install_progress->setLabelText(
|
|
|
|
|
|
|
|
tr("Installing file \"%1\"...").arg(QString::fromStdString(src->GetName())));
|
|
|
|
|
|
|
|
install_progress->setMaximum(progress_maximum);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (std::size_t i = 0; i < src->GetSize(); i += buffer.size()) {
|
|
|
|
for (std::size_t i = 0; i < src->GetSize(); i += buffer.size()) {
|
|
|
|
if (progress.wasCanceled()) {
|
|
|
|
if (install_progress->wasCanceled()) {
|
|
|
|
dest->Resize(0);
|
|
|
|
dest->Resize(0);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const int progress_value = static_cast<int>(i / buffer.size());
|
|
|
|
const int progress_value = static_cast<int>(i / buffer.size());
|
|
|
|
progress.setValue(progress_value);
|
|
|
|
install_progress->setValue(progress_value);
|
|
|
|
|
|
|
|
|
|
|
|
const auto read = src->Read(buffer.data(), buffer.size(), i);
|
|
|
|
const auto read = src->Read(buffer.data(), buffer.size(), i);
|
|
|
|
dest->Write(buffer.data(), read, i);
|
|
|
|
dest->Write(buffer.data(), read, i);
|
|
|
@ -1636,143 +1666,166 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const auto success = [this]() {
|
|
|
|
const auto success = [this, &count, &is_progressdialog_created]() {
|
|
|
|
|
|
|
|
if (is_progressdialog_created) {
|
|
|
|
|
|
|
|
install_progress->close();
|
|
|
|
|
|
|
|
}
|
|
|
|
QMessageBox::information(this, tr("Successfully Installed"),
|
|
|
|
QMessageBox::information(this, tr("Successfully Installed"),
|
|
|
|
tr("The file was successfully installed."));
|
|
|
|
tr("%n file(s) successfully installed", "", count));
|
|
|
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
|
|
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
|
|
|
FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) +
|
|
|
|
FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) +
|
|
|
|
DIR_SEP + "game_list");
|
|
|
|
DIR_SEP + "game_list");
|
|
|
|
|
|
|
|
ui.action_Install_File_NAND->setEnabled(true);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const auto failed = [this]() {
|
|
|
|
const auto failed = [this, &is_progressdialog_created](const QString& file) {
|
|
|
|
|
|
|
|
if (is_progressdialog_created) {
|
|
|
|
|
|
|
|
install_progress->close();
|
|
|
|
|
|
|
|
}
|
|
|
|
QMessageBox::warning(
|
|
|
|
QMessageBox::warning(
|
|
|
|
this, tr("Failed to Install"),
|
|
|
|
this, tr("Failed to Install %1").arg(QFileInfo(file).fileName()),
|
|
|
|
tr("There was an error while attempting to install the provided file. It "
|
|
|
|
tr("There was an error while attempting to install the provided file. It "
|
|
|
|
"could have an incorrect format or be missing metadata. Please "
|
|
|
|
"could have an incorrect format or be missing metadata. Please "
|
|
|
|
"double-check your file and try again."));
|
|
|
|
"double-check your file and try again."));
|
|
|
|
|
|
|
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
|
|
|
|
|
|
|
ui.action_Install_File_NAND->setEnabled(true);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const auto overwrite = [this]() {
|
|
|
|
const auto overwrite = [this](const QString& file) {
|
|
|
|
return QMessageBox::question(this, tr("Failed to Install"),
|
|
|
|
return QMessageBox::question(
|
|
|
|
tr("The file you are attempting to install already exists "
|
|
|
|
this, tr("Failed to Install %1").arg(QFileInfo(file).fileName()),
|
|
|
|
"in the cache. Would you like to overwrite it?")) ==
|
|
|
|
tr("The file you are attempting to install already exists "
|
|
|
|
QMessageBox::Yes;
|
|
|
|
"in the cache. Would you like to overwrite it?")) == QMessageBox::Yes;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (filename.endsWith(QStringLiteral("xci"), Qt::CaseInsensitive) ||
|
|
|
|
for (const QString& filename : filenames) {
|
|
|
|
filename.endsWith(QStringLiteral("nsp"), Qt::CaseInsensitive)) {
|
|
|
|
if (filename.endsWith(QStringLiteral("xci"), Qt::CaseInsensitive) ||
|
|
|
|
std::shared_ptr<FileSys::NSP> nsp;
|
|
|
|
filename.endsWith(QStringLiteral("nsp"), Qt::CaseInsensitive)) {
|
|
|
|
if (filename.endsWith(QStringLiteral("nsp"), Qt::CaseInsensitive)) {
|
|
|
|
std::shared_ptr<FileSys::NSP> nsp;
|
|
|
|
nsp = std::make_shared<FileSys::NSP>(
|
|
|
|
if (filename.endsWith(QStringLiteral("nsp"), Qt::CaseInsensitive)) {
|
|
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
|
|
nsp = std::make_shared<FileSys::NSP>(
|
|
|
|
if (nsp->IsExtractedType())
|
|
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
|
|
failed();
|
|
|
|
if (nsp->IsExtractedType()) {
|
|
|
|
} else {
|
|
|
|
failed(filename);
|
|
|
|
const auto xci = std::make_shared<FileSys::XCI>(
|
|
|
|
break;
|
|
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
|
|
}
|
|
|
|
nsp = xci->GetSecurePartitionNSP();
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
const auto xci = std::make_shared<FileSys::XCI>(
|
|
|
|
|
|
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
|
|
|
|
|
|
nsp = xci->GetSecurePartitionNSP();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (nsp->GetStatus() != Loader::ResultStatus::Success) {
|
|
|
|
if (nsp->GetStatus() != Loader::ResultStatus::Success) {
|
|
|
|
failed();
|
|
|
|
failed(filename);
|
|
|
|
return;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const auto res = Core::System::GetInstance()
|
|
|
|
const auto res = Core::System::GetInstance()
|
|
|
|
.GetFileSystemController()
|
|
|
|
.GetFileSystemController()
|
|
|
|
.GetUserNANDContents()
|
|
|
|
.GetUserNANDContents()
|
|
|
|
->InstallEntry(*nsp, false, qt_raw_copy);
|
|
|
|
->InstallEntry(*nsp, false, qt_raw_copy);
|
|
|
|
if (res == FileSys::InstallResult::Success) {
|
|
|
|
if (res == FileSys::InstallResult::Success) {
|
|
|
|
success();
|
|
|
|
++count;
|
|
|
|
} else {
|
|
|
|
} else if (res == FileSys::InstallResult::ErrorAlreadyExists) {
|
|
|
|
if (res == FileSys::InstallResult::ErrorAlreadyExists) {
|
|
|
|
if (overwrite_files && overwrite(filename)) {
|
|
|
|
if (overwrite()) {
|
|
|
|
|
|
|
|
const auto res2 = Core::System::GetInstance()
|
|
|
|
const auto res2 = Core::System::GetInstance()
|
|
|
|
.GetFileSystemController()
|
|
|
|
.GetFileSystemController()
|
|
|
|
.GetUserNANDContents()
|
|
|
|
.GetUserNANDContents()
|
|
|
|
->InstallEntry(*nsp, true, qt_raw_copy);
|
|
|
|
->InstallEntry(*nsp, true, qt_raw_copy);
|
|
|
|
if (res2 == FileSys::InstallResult::Success) {
|
|
|
|
if (res2 != FileSys::InstallResult::Success) {
|
|
|
|
success();
|
|
|
|
failed(filename);
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
failed();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
++count;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
--total_count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
failed();
|
|
|
|
failed(filename);
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
const auto nca = std::make_shared<FileSys::NCA>(
|
|
|
|
|
|
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
|
|
|
|
|
|
const auto id = nca->GetStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Game updates necessary are missing base RomFS
|
|
|
|
|
|
|
|
if (id != Loader::ResultStatus::Success &&
|
|
|
|
|
|
|
|
id != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) {
|
|
|
|
|
|
|
|
failed();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const QStringList tt_options{tr("System Application"),
|
|
|
|
|
|
|
|
tr("System Archive"),
|
|
|
|
|
|
|
|
tr("System Application Update"),
|
|
|
|
|
|
|
|
tr("Firmware Package (Type A)"),
|
|
|
|
|
|
|
|
tr("Firmware Package (Type B)"),
|
|
|
|
|
|
|
|
tr("Game"),
|
|
|
|
|
|
|
|
tr("Game Update"),
|
|
|
|
|
|
|
|
tr("Game DLC"),
|
|
|
|
|
|
|
|
tr("Delta Title")};
|
|
|
|
|
|
|
|
bool ok;
|
|
|
|
|
|
|
|
const auto item = QInputDialog::getItem(
|
|
|
|
|
|
|
|
this, tr("Select NCA Install Type..."),
|
|
|
|
|
|
|
|
tr("Please select the type of title you would like to install this NCA as:\n(In "
|
|
|
|
|
|
|
|
"most instances, the default 'Game' is fine.)"),
|
|
|
|
|
|
|
|
tt_options, 5, false, &ok);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto index = tt_options.indexOf(item);
|
|
|
|
|
|
|
|
if (!ok || index == -1) {
|
|
|
|
|
|
|
|
QMessageBox::warning(this, tr("Failed to Install"),
|
|
|
|
|
|
|
|
tr("The title type you selected for the NCA is invalid."));
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If index is equal to or past Game, add the jump in TitleType.
|
|
|
|
|
|
|
|
if (index >= 5) {
|
|
|
|
|
|
|
|
index += static_cast<size_t>(FileSys::TitleType::Application) -
|
|
|
|
|
|
|
|
static_cast<size_t>(FileSys::TitleType::FirmwarePackageB);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::InstallResult res;
|
|
|
|
|
|
|
|
if (index >= static_cast<s32>(FileSys::TitleType::Application)) {
|
|
|
|
|
|
|
|
res = Core::System::GetInstance()
|
|
|
|
|
|
|
|
.GetFileSystemController()
|
|
|
|
|
|
|
|
.GetUserNANDContents()
|
|
|
|
|
|
|
|
->InstallEntry(*nca, static_cast<FileSys::TitleType>(index), false,
|
|
|
|
|
|
|
|
qt_raw_copy);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
res = Core::System::GetInstance()
|
|
|
|
const auto nca = std::make_shared<FileSys::NCA>(
|
|
|
|
.GetFileSystemController()
|
|
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
|
|
.GetSystemNANDContents()
|
|
|
|
const auto id = nca->GetStatus();
|
|
|
|
->InstallEntry(*nca, static_cast<FileSys::TitleType>(index), false,
|
|
|
|
|
|
|
|
qt_raw_copy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (res == FileSys::InstallResult::Success) {
|
|
|
|
// Game updates necessary are missing base RomFS
|
|
|
|
success();
|
|
|
|
if (id != Loader::ResultStatus::Success &&
|
|
|
|
} else if (res == FileSys::InstallResult::ErrorAlreadyExists) {
|
|
|
|
id != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) {
|
|
|
|
if (overwrite()) {
|
|
|
|
failed(filename);
|
|
|
|
const auto res2 = Core::System::GetInstance()
|
|
|
|
break;
|
|
|
|
.GetFileSystemController()
|
|
|
|
}
|
|
|
|
.GetUserNANDContents()
|
|
|
|
|
|
|
|
->InstallEntry(*nca, static_cast<FileSys::TitleType>(index),
|
|
|
|
const QStringList tt_options{tr("System Application"),
|
|
|
|
true, qt_raw_copy);
|
|
|
|
tr("System Archive"),
|
|
|
|
if (res2 == FileSys::InstallResult::Success) {
|
|
|
|
tr("System Application Update"),
|
|
|
|
success();
|
|
|
|
tr("Firmware Package (Type A)"),
|
|
|
|
|
|
|
|
tr("Firmware Package (Type B)"),
|
|
|
|
|
|
|
|
tr("Game"),
|
|
|
|
|
|
|
|
tr("Game Update"),
|
|
|
|
|
|
|
|
tr("Game DLC"),
|
|
|
|
|
|
|
|
tr("Delta Title")};
|
|
|
|
|
|
|
|
bool ok;
|
|
|
|
|
|
|
|
const auto item = QInputDialog::getItem(
|
|
|
|
|
|
|
|
this, tr("Select NCA Install Type..."),
|
|
|
|
|
|
|
|
tr("Please select the type of title you would like to install this NCA as:\n(In "
|
|
|
|
|
|
|
|
"most instances, the default 'Game' is fine.)"),
|
|
|
|
|
|
|
|
tt_options, 5, false, &ok);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto index = tt_options.indexOf(item);
|
|
|
|
|
|
|
|
if (!ok || index == -1) {
|
|
|
|
|
|
|
|
QMessageBox::warning(this, tr("Failed to Install"),
|
|
|
|
|
|
|
|
tr("The title type you selected for the NCA is invalid."));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If index is equal to or past Game, add the jump in TitleType.
|
|
|
|
|
|
|
|
if (index >= 5) {
|
|
|
|
|
|
|
|
index += static_cast<size_t>(FileSys::TitleType::Application) -
|
|
|
|
|
|
|
|
static_cast<size_t>(FileSys::TitleType::FirmwarePackageB);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::InstallResult res;
|
|
|
|
|
|
|
|
if (index >= static_cast<s32>(FileSys::TitleType::Application)) {
|
|
|
|
|
|
|
|
res = Core::System::GetInstance()
|
|
|
|
|
|
|
|
.GetFileSystemController()
|
|
|
|
|
|
|
|
.GetUserNANDContents()
|
|
|
|
|
|
|
|
->InstallEntry(*nca, static_cast<FileSys::TitleType>(index), false,
|
|
|
|
|
|
|
|
qt_raw_copy);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
res = Core::System::GetInstance()
|
|
|
|
|
|
|
|
.GetFileSystemController()
|
|
|
|
|
|
|
|
.GetSystemNANDContents()
|
|
|
|
|
|
|
|
->InstallEntry(*nca, static_cast<FileSys::TitleType>(index), false,
|
|
|
|
|
|
|
|
qt_raw_copy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (res == FileSys::InstallResult::Success) {
|
|
|
|
|
|
|
|
++count;
|
|
|
|
|
|
|
|
} else if (res == FileSys::InstallResult::ErrorAlreadyExists) {
|
|
|
|
|
|
|
|
if (overwrite_files && overwrite(filename)) {
|
|
|
|
|
|
|
|
const auto res2 =
|
|
|
|
|
|
|
|
Core::System::GetInstance()
|
|
|
|
|
|
|
|
.GetFileSystemController()
|
|
|
|
|
|
|
|
.GetUserNANDContents()
|
|
|
|
|
|
|
|
->InstallEntry(*nca, static_cast<FileSys::TitleType>(index), true,
|
|
|
|
|
|
|
|
qt_raw_copy);
|
|
|
|
|
|
|
|
if (res2 != FileSys::InstallResult::Success) {
|
|
|
|
|
|
|
|
failed(filename);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
++count;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
failed();
|
|
|
|
--total_count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
failed(filename);
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
failed();
|
|
|
|
|
|
|
|
|
|
|
|
// Return success only on the last file
|
|
|
|
|
|
|
|
if (filename == filenames.last()) {
|
|
|
|
|
|
|
|
success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|