mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Minor fixes, installation should stop after one error message now
This commit is contained in:
parent
9e5e19f9cb
commit
2e1248537e
2 changed files with 14 additions and 13 deletions
|
@ -13,11 +13,11 @@ Wizard::ConclusionPage::ConclusionPage(MainWizard *wizard) :
|
||||||
|
|
||||||
void Wizard::ConclusionPage::initializePage()
|
void Wizard::ConclusionPage::initializePage()
|
||||||
{
|
{
|
||||||
// // Write the path to openmw.cfg
|
// Write the path to openmw.cfg
|
||||||
// if (field(QLatin1String("installation.new")).toBool() == true) {
|
if (field(QLatin1String("installation.new")).toBool() == true) {
|
||||||
// QString path(field(QLatin1String("installation.path")).toString());
|
QString path(field(QLatin1String("installation.path")).toString());
|
||||||
// mWizard->addInstallation(path);
|
mWizard->addInstallation(path);
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (!mWizard->mError)
|
if (!mWizard->mError)
|
||||||
{
|
{
|
||||||
|
|
|
@ -251,15 +251,14 @@ bool Wizard::UnshieldWorker::copyDirectory(const QString &source, const QString
|
||||||
{
|
{
|
||||||
QDir sourceDir(source);
|
QDir sourceDir(source);
|
||||||
QDir destDir(destination);
|
QDir destDir(destination);
|
||||||
bool result = false;
|
bool result = true;
|
||||||
|
|
||||||
if (!destDir.exists()) {
|
if (!destDir.exists()) {
|
||||||
if (!sourceDir.mkpath(destination)) {
|
if (!sourceDir.mkpath(destination))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
destDir.refresh();
|
destDir.refresh();
|
||||||
}
|
|
||||||
|
|
||||||
if (!destDir.exists())
|
if (!destDir.exists())
|
||||||
return false;
|
return false;
|
||||||
|
@ -387,7 +386,7 @@ void Wizard::UnshieldWorker::extract()
|
||||||
writeSettings();
|
writeSettings();
|
||||||
|
|
||||||
// Remove the temporary directory
|
// Remove the temporary directory
|
||||||
removeDirectory(getPath() + QDir::separator() + QLatin1String("extract-temp"));
|
//removeDirectory(getPath() + QDir::separator() + QLatin1String("extract-temp"));
|
||||||
|
|
||||||
// Fill the progress bar
|
// Fill the progress bar
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
@ -572,6 +571,7 @@ bool Wizard::UnshieldWorker::installComponent(Component component, const QString
|
||||||
if (!installDirectories(dir, info.absolutePath(), false, true)) {
|
if (!installDirectories(dir, info.absolutePath(), false, true)) {
|
||||||
emit error(tr("Could not install directory!"),
|
emit error(tr("Could not install directory!"),
|
||||||
tr("Installing %1 to %2 failed.").arg(dir, info.absolutePath()));
|
tr("Installing %1 to %2 failed.").arg(dir, info.absolutePath()));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -626,6 +626,7 @@ bool Wizard::UnshieldWorker::installComponent(Component component, const QString
|
||||||
if (!copyDirectory(sounds.absoluteFilePath(), dest)) {
|
if (!copyDirectory(sounds.absoluteFilePath(), dest)) {
|
||||||
emit error(tr("Could not install directory!"),
|
emit error(tr("Could not install directory!"),
|
||||||
tr("Installing %1 to %2 failed.").arg(sounds.absoluteFilePath(), dest));
|
tr("Installing %1 to %2 failed.").arg(sounds.absoluteFilePath(), dest));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -699,7 +700,7 @@ bool Wizard::UnshieldWorker::installComponent(Component component, const QString
|
||||||
|
|
||||||
bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &destination, const QString &prefix, int index, int counter)
|
bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &destination, const QString &prefix, int index, int counter)
|
||||||
{
|
{
|
||||||
bool success;
|
bool success = false;
|
||||||
QString path(destination);
|
QString path(destination);
|
||||||
path.append(QDir::separator());
|
path.append(QDir::separator());
|
||||||
|
|
||||||
|
@ -845,7 +846,7 @@ bool Wizard::UnshieldWorker::findInCab(const QString &cabFile, const QString &fi
|
||||||
|
|
||||||
bool Wizard::UnshieldWorker::extractCab(const QString &cabFile, const QString &destination)
|
bool Wizard::UnshieldWorker::extractCab(const QString &cabFile, const QString &destination)
|
||||||
{
|
{
|
||||||
bool success;
|
bool success = false;
|
||||||
|
|
||||||
QByteArray array(cabFile.toUtf8());
|
QByteArray array(cabFile.toUtf8());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue