Wizard now autodetects correct installation archive

pull/136/head
pvdk 11 years ago
parent b2156351d8
commit ef16b46148

@ -148,13 +148,18 @@ void Wizard::InstallationPage::showFileDialog(Wizard::Component component)
break; break;
} }
QString fileName = QFileDialog::getOpenFileName( // QString fileName = QFileDialog::getOpenFileName(
this, // this,
tr("Select %1 installation file").arg(name), // tr("Select %1 installation file").arg(name),
QDir::rootPath(), // QDir::rootPath(),
tr("InstallShield header files (*.hdr)")); // tr("InstallShield header files (*.hdr)"));
if (fileName.isEmpty()) {
QString path = QFileDialog::getExistingDirectory(this,
tr("Select %1 installation media").arg(name),
QDir::rootPath());
if (path.isEmpty()) {
qDebug() << "Cancel was clicked!"; qDebug() << "Cancel was clicked!";
logTextEdit->appendHtml(tr("<p><br/><span style=\"color:red;\"> \ logTextEdit->appendHtml(tr("<p><br/><span style=\"color:red;\"> \
@ -164,8 +169,7 @@ void Wizard::InstallationPage::showFileDialog(Wizard::Component component)
return; return;
} }
QFileInfo info(fileName); mUnshield->setDiskPath(path);
mUnshield->setComponentPath(component, info.absolutePath());
} }
void Wizard::InstallationPage::installationFinished() void Wizard::InstallationPage::installationFinished()

@ -20,12 +20,9 @@ Wizard::UnshieldWorker::UnshieldWorker(QObject *parent) :
{ {
unshield_set_log_level(0); unshield_set_log_level(0);
mMorrowindPath = QString();
mTribunalPath = QString();
mBloodmoonPath = QString();
mPath = QString(); mPath = QString();
mIniPath = QString(); mIniPath = QString();
mDiskPath = QString();
// Default to Latin encoding // Default to Latin encoding
mIniCodec = QTextCodec::codecForName("windows-1252"); mIniCodec = QTextCodec::codecForName("windows-1252");
@ -78,41 +75,6 @@ bool Wizard::UnshieldWorker::getInstallComponent(Component component)
return false; return false;
} }
void Wizard::UnshieldWorker::setComponentPath(Wizard::Component component, const QString &path)
{
QWriteLocker writeLock(&mLock);
switch (component) {
case Wizard::Component_Morrowind:
mMorrowindPath = path;
break;
case Wizard::Component_Tribunal:
mTribunalPath = path;
break;
case Wizard::Component_Bloodmoon:
mBloodmoonPath = path;
break;
}
mWait.wakeAll();
}
QString Wizard::UnshieldWorker::getComponentPath(Component component)
{
QReadLocker readLock(&mLock);
switch (component) {
case Wizard::Component_Morrowind:
return mMorrowindPath;
case Wizard::Component_Tribunal:
return mTribunalPath;
case Wizard::Component_Bloodmoon:
return mBloodmoonPath;
}
return QString();
}
void Wizard::UnshieldWorker::setComponentDone(Component component, bool done) void Wizard::UnshieldWorker::setComponentDone(Component component, bool done)
{ {
QWriteLocker writeLock(&mLock); QWriteLocker writeLock(&mLock);
@ -159,6 +121,13 @@ void Wizard::UnshieldWorker::setIniPath(const QString &path)
mIniPath = path; mIniPath = path;
} }
void Wizard::UnshieldWorker::setDiskPath(const QString &path)
{
QWriteLocker writeLock(&mLock);
mDiskPath = path;
mWait.wakeAll();
}
QString Wizard::UnshieldWorker::getPath() QString Wizard::UnshieldWorker::getPath()
{ {
QReadLocker readLock(&mLock); QReadLocker readLock(&mLock);
@ -171,6 +140,13 @@ QString Wizard::UnshieldWorker::getIniPath()
return mIniPath; return mIniPath;
} }
QString Wizard::UnshieldWorker::getDiskPath()
{
QReadLocker readLock(&mLock);
return mDiskPath;
}
void Wizard::UnshieldWorker::setIniCodec(QTextCodec *codec) void Wizard::UnshieldWorker::setIniCodec(QTextCodec *codec)
{ {
QWriteLocker writeLock(&mLock); QWriteLocker writeLock(&mLock);
@ -332,7 +308,7 @@ bool Wizard::UnshieldWorker::installFile(const QString &fileName, const QString
QFileInfoList list(dir.entryInfoList(QDir::NoDotAndDotDot | QFileInfoList list(dir.entryInfoList(QDir::NoDotAndDotDot |
QDir::System | QDir::Hidden | QDir::System | QDir::Hidden |
QDir::AllDirs | QDir::Files, QDir::DirsFirst)); QDir::AllDirs | QDir::Files, QDir::DirsFirst));
foreach(QFileInfo info, list) { foreach(const QFileInfo &info, list) {
if (info.isDir()) { if (info.isDir()) {
result = installFile(fileName, info.absoluteFilePath()); result = installFile(fileName, info.absoluteFilePath());
} else { } else {
@ -360,7 +336,7 @@ bool Wizard::UnshieldWorker::installDirectory(const QString &dirName, const QStr
QFileInfoList list(dir.entryInfoList(QDir::NoDotAndDotDot | QFileInfoList list(dir.entryInfoList(QDir::NoDotAndDotDot |
QDir::System | QDir::Hidden | QDir::System | QDir::Hidden |
QDir::AllDirs)); QDir::AllDirs));
foreach(QFileInfo info, list) { foreach(const QFileInfo &info, list) {
if (info.isSymLink()) if (info.isSymLink())
continue; continue;
@ -383,190 +359,139 @@ void Wizard::UnshieldWorker::extract()
{ {
qDebug() << "extract!"; qDebug() << "extract!";
qDebug() << findFiles(QLatin1String("data1.hdr"), QLatin1String("/mnt/cdrom")); if (getInstallComponent(Wizard::Component_Morrowind))
// QDir disk; {
if (!getComponentDone(Wizard::Component_Morrowind))
// if (getInstallComponent(Wizard::Component_Morrowind)) if (!setupComponent(Wizard::Component_Morrowind))
// { return;
// if (!getComponentDone(Wizard::Component_Morrowind)) }
// {
// if (getComponentPath(Wizard::Component_Morrowind).isEmpty()) {
// qDebug() << "request file dialog";
// QReadLocker readLock(&mLock);
// emit requestFileDialog(Wizard::Component_Morrowind);
// mWait.wait(&mLock);
// }
// if (!getComponentPath(Wizard::Component_Morrowind).isEmpty()) {
// disk.setPath(getComponentPath(Wizard::Component_Morrowind));
// if (!findInCab(disk.absoluteFilePath(QLatin1String("data1.hdr")), QLatin1String("Morrowind.bsa")))
// {
// QReadLocker readLock(&mLock);
// emit requestFileDialog(Wizard::Component_Morrowind);
// mWait.wait(&mLock);
// } else {
// if (installComponent(Wizard::Component_Morrowind)) {
// setComponentDone(Wizard::Component_Morrowind, true);
// } else {
// qDebug() << "Erorr installing Morrowind";
// return;
// }
// }
// }
// }
// }
// if (getInstallComponent(Wizard::Component_Tribunal))
// {
// setupAddon(Wizard::Component_Tribunal);
// }
// if (getInstallComponent(Wizard::Component_Bloodmoon)) if (getInstallComponent(Wizard::Component_Tribunal))
// { {
// setupAddon(Wizard::Component_Bloodmoon); if (!getComponentDone(Wizard::Component_Tribunal))
// } if (!setupComponent(Wizard::Component_Tribunal))
return;
}
// // Update Morrowind configuration if (getInstallComponent(Wizard::Component_Bloodmoon))
// if (getInstallComponent(Wizard::Component_Tribunal)) {
// { if (!getComponentDone(Wizard::Component_Bloodmoon))
// mIniSettings.setValue(QLatin1String("Archives/Archive0"), QVariant(QString("Tribunal.bsa"))); if (!setupComponent(Wizard::Component_Bloodmoon))
// mIniSettings.setValue(QLatin1String("Game Files/Game File1"), QVariant(QString("Tribunal.esm"))); return;
// } }
// if (getInstallComponent(Wizard::Component_Bloodmoon)) // Update Morrowind configuration
// { if (getInstallComponent(Wizard::Component_Tribunal))
// mIniSettings.setValue(QLatin1String("Archives/Archive0"), QVariant(QString("Bloodmoon.bsa"))); {
// mIniSettings.setValue(QLatin1String("Game Files/Game File1"), QVariant(QString("Bloodmoon.esm"))); mIniSettings.setValue(QLatin1String("Archives/Archive0"), QVariant(QString("Tribunal.bsa")));
// } mIniSettings.setValue(QLatin1String("Game Files/Game File1"), QVariant(QString("Tribunal.esm")));
}
// if (getInstallComponent(Wizard::Component_Tribunal) && if (getInstallComponent(Wizard::Component_Bloodmoon))
// getInstallComponent(Wizard::Component_Bloodmoon)) {
// { mIniSettings.setValue(QLatin1String("Archives/Archive0"), QVariant(QString("Bloodmoon.bsa")));
// mIniSettings.setValue(QLatin1String("Archives/Archive0"), QVariant(QString("Tribunal.bsa"))); mIniSettings.setValue(QLatin1String("Game Files/Game File1"), QVariant(QString("Bloodmoon.esm")));
// mIniSettings.setValue(QLatin1String("Archives/Archive1"), QVariant(QString("Bloodmoon.bsa"))); }
// mIniSettings.setValue(QLatin1String("Game Files/Game File1"), QVariant(QString("Tribunal.esm")));
// mIniSettings.setValue(QLatin1String("Game Files/Game File2"), QVariant(QString("Bloodmoon.esm")));
// }
if (getInstallComponent(Wizard::Component_Tribunal) &&
getInstallComponent(Wizard::Component_Bloodmoon))
{
mIniSettings.setValue(QLatin1String("Archives/Archive0"), QVariant(QString("Tribunal.bsa")));
mIniSettings.setValue(QLatin1String("Archives/Archive1"), QVariant(QString("Bloodmoon.bsa")));
mIniSettings.setValue(QLatin1String("Game Files/Game File1"), QVariant(QString("Tribunal.esm")));
mIniSettings.setValue(QLatin1String("Game Files/Game File2"), QVariant(QString("Bloodmoon.esm")));
}
// // Write the settings to the Morrowind config file // Write the settings to the Morrowind config file
// 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;
// if (getInstallComponent(Wizard::Component_Morrowind)) if (getInstallComponent(Wizard::Component_Morrowind))
// total = 100; total = 100;
// if (getInstallComponent(Wizard::Component_Tribunal)) if (getInstallComponent(Wizard::Component_Tribunal))
// total = total + 100; total = total + 100;
// if (getInstallComponent(Wizard::Component_Bloodmoon)) if (getInstallComponent(Wizard::Component_Bloodmoon))
// total = total + 100; total = total + 100;
// emit textChanged(tr("Installation finished!")); emit textChanged(tr("Installation finished!"));
// emit progressChanged(total); emit progressChanged(total);
// emit finished(); emit finished();
// qDebug() << "installation finished!"; qDebug() << "installation finished!";
} }
void Wizard::UnshieldWorker::setupAddon(Component component) bool Wizard::UnshieldWorker::setupComponent(Component component)
{
qDebug() << "SetupAddon!" << getComponentPath(component) << getComponentPath(Wizard::Component_Morrowind);
if (!getComponentDone(component))
{ {
qDebug() << "Component not done!";
QDir disk(getComponentPath(Wizard::Component_Morrowind));
QString name; QString name;
if (component == Wizard::Component_Tribunal) switch (component) {
name = QLatin1String("Tribunal");
if (component == Wizard::Component_Bloodmoon) case Wizard::Component_Morrowind:
name = QLatin1String("Morrowind");
break;
case Wizard::Component_Tribunal:
name = QLatin1String("Tribunal");
break;
case Wizard::Component_Bloodmoon:
name = QLatin1String("Bloodmoon"); name = QLatin1String("Bloodmoon");
break;
}
if (name.isEmpty()) { if (name.isEmpty()) {
emit error(tr("Component parameter is invalid!"), tr("An invalid component parameter was supplied.")); emit error(tr("Component parameter is invalid!"), tr("An invalid component parameter was supplied."));
return; return false;
} }
qDebug() << "Determine if file is in current data1.hdr: " << name; bool found = false;
QString cabFile;
if (!disk.isEmpty()) { QDir disk;
if (!findInCab(disk.absoluteFilePath(QLatin1String("data1.hdr")), name + QLatin1String(".bsa")))
{
if (!disk.cd(name)) {
qDebug() << "not found on cd!";
QReadLocker locker(&mLock);
emit requestFileDialog(component);
mWait.wait(&mLock);
} else if (disk.exists(QLatin1String("data1.hdr"))) { // Keep showing the file dialog until we find the necessary install files
if (!findInCab(disk.absoluteFilePath(QLatin1String("data1.hdr")), name + QLatin1String(".bsa"))) while (!found) {
{ if (getDiskPath().isEmpty()) {
QReadLocker locker(&mLock); QReadLocker readLock(&mLock);
emit requestFileDialog(component); emit requestFileDialog(component);
mWait.wait(&mLock); mWait.wait(&mLock);
disk.setPath(getDiskPath());
} else { } else {
setComponentPath(component, disk.absolutePath()); disk.setPath(getDiskPath());
disk.setPath(getComponentPath(component));
}
}
} }
} else { QStringList list(findFiles(QLatin1String("data1.hdr"), disk.absolutePath()));
QReadLocker locker(&mLock);
emit requestFileDialog(component);
mWait.wait(&mLock);
}
disk.setPath(getComponentPath(component)); foreach (const QString &file, list) {
qDebug() << "current cab file is: " << file;
if (!findInCab(disk.absoluteFilePath(QLatin1String("data1.hdr")), name + QLatin1String(".bsa"))) if (findInCab(file, name + QLatin1String(".bsa"))) {
{ cabFile = file;
if (!disk.cd(name)) { found = true;
qDebug() << "not found on cd!"; }
QReadLocker locker(&mLock); }
emit requestFileDialog(component);
mWait.wait(&mLock);
} else if (disk.exists(QLatin1String("data1.hdr"))) { if (!found) {
if (!findInCab(disk.absoluteFilePath(QLatin1String("data1.hdr")), name + QLatin1String(".bsa"))) QReadLocker readLock(&mLock);
{
QReadLocker locker(&mLock);
emit requestFileDialog(component); emit requestFileDialog(component);
mWait.wait(&mLock); mWait.wait(&mLock);
} else {
setComponentPath(component, disk.absolutePath());
disk.setPath(getComponentPath(component));
}
} }
// Make sure the dir is up-to-date
//disk.setPath(getComponentPath(component));
} }
// Now do the actual installing if (installComponent(component, cabFile)) {
if (installComponent(component)) {
setComponentDone(component, true); setComponentDone(component, true);
return true;
} else { } else {
qDebug() << "Error installing " << name; qDebug() << "Erorr installing " << name;
return; return false;
} }
return true;
}
} }
bool Wizard::UnshieldWorker::installComponent(Component component) bool Wizard::UnshieldWorker::installComponent(Component component, const QString &path)
{ {
QString name; QString name;
switch (component) { switch (component) {
@ -587,13 +512,15 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
return false; return false;
} }
qDebug() << "Install " << name << " from " << path;
emit textChanged(tr("Installing %1").arg(name)); emit textChanged(tr("Installing %1").arg(name));
QDir disk(getComponentPath(component)); QFileInfo info(path);
if (!disk.exists()) { if (!info.exists()) {
qDebug() << "Component path not set: " << getComponentPath(Wizard::Component_Morrowind); emit error(tr("Installation media path not set!"), tr("The source path for %1 was not set.").arg(name));
emit error(tr("Component path not set!"), tr("The source path for %1 was not set.").arg(name));
return false; return false;
} }
@ -606,7 +533,6 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
removeDirectory(tempPath); removeDirectory(tempPath);
if (!temp.mkpath(tempPath)) { if (!temp.mkpath(tempPath)) {
qDebug() << "Can't make path";
emit error(tr("Cannot create temporary directory!"), tr("Failed to create %1.").arg(tempPath)); emit error(tr("Cannot create temporary directory!"), tr("Failed to create %1.").arg(tempPath));
return false; return false;
} }
@ -619,24 +545,15 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
} }
if (!temp.cd(name)) { if (!temp.cd(name)) {
qDebug() << "Can't cd to dir";
emit error(tr("Cannot move into temporary directory!"), tr("Failed to move into %1.").arg(temp.absoluteFilePath(name))); emit error(tr("Cannot move into temporary directory!"), tr("Failed to move into %1.").arg(temp.absoluteFilePath(name)));
return false; return false;
} }
// Extract the installation files // Extract the installation files
if (!extractCab(disk.absoluteFilePath(QLatin1String("data1.hdr")), temp.absolutePath())) if (!extractCab(info.absoluteFilePath(), temp.absolutePath()))
return false; return false;
// Move the files from the temporary path to the destination folder // Move the files from the temporary path to the destination folder
// emit textChanged(tr("Moving installation files"));
// if (!moveDirectory(temp.absoluteFilePath(QLatin1String("Data Files")), getPath())) {
// qDebug() << "failed to move files!";
// emit error(tr("Moving extracted files failed!"),
// tr("Failed to move files from %1 to %2.").arg(temp.absoluteFilePath(QLatin1String("Data Files")),
// getPath()));
// return false;
// }
emit textChanged(tr("Moving installation files")); emit textChanged(tr("Moving installation files"));
// Install extracted directories // Install extracted directories
@ -658,20 +575,20 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
// Install directories from disk // Install directories from disk
foreach (const QString &dir, directories) { foreach (const QString &dir, directories) {
qDebug() << "\n\nDISK DIRS!"; qDebug() << "\n\nDISK DIRS!";
installDirectory(dir, disk.absolutePath(), false); installDirectory(dir, info.absolutePath(), false);
} }
QFileInfo info(disk.absoluteFilePath("Data Files")); QFileInfo datafiles(info.absolutePath() + QDir::separator() + QLatin1String("Data Files"));
if (info.exists()) { if (datafiles.exists()) {
emit textChanged(tr("Installing: Data Files directory")); emit textChanged(tr("Installing: Data Files directory"));
copyDirectory(info.absoluteFilePath(), getPath()); copyDirectory(datafiles.absoluteFilePath(), getPath());
} }
if (component == Wizard::Component_Morrowind) if (component == Wizard::Component_Morrowind)
{ {
QStringList files; QStringList files;
files << QLatin1String("Morrowind.esm") files << QLatin1String("Morrowind.esm")
<< QLatin1String("Morrowin.bsa"); << QLatin1String("Morrowind.bsa");
foreach (const QString &file, files) { foreach (const QString &file, files) {
if (!installFile(file, temp.absolutePath())) { if (!installFile(file, temp.absolutePath())) {
@ -702,7 +619,9 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
QStringList files; QStringList files;
files << QLatin1String("Tribunal.esm") files << QLatin1String("Tribunal.esm")
<< QLatin1String("Tribunal.bsa"); << QLatin1String("Tribunal.bsa")
<< QLatin1String("Morrowind.esm")
<< QLatin1String("Morrowind.bsa");
foreach (const QString &file, files) { foreach (const QString &file, files) {
if (!installFile(file, temp.absolutePath())) { if (!installFile(file, temp.absolutePath())) {
@ -710,7 +629,6 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
return false; return false;
} }
} }
} }
if (component == Wizard::Component_Bloodmoon) if (component == Wizard::Component_Bloodmoon)
@ -726,7 +644,9 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
QStringList files; QStringList files;
files << QLatin1String("Bloodmoon.esm") files << QLatin1String("Bloodmoon.esm")
<< QLatin1String("Bloodmoon.bsa"); << QLatin1String("Bloodmoon.bsa")
<< QLatin1String("Morrowind.esm")
<< QLatin1String("Morrowind.bsa");
foreach (const QString &file, files) { foreach (const QString &file, files) {
if (!installFile(file, temp.absolutePath())) { if (!installFile(file, temp.absolutePath())) {
@ -736,13 +656,12 @@ bool Wizard::UnshieldWorker::installComponent(Component component)
} }
// Load Morrowind configuration settings from the setup script // Load Morrowind configuration settings from the setup script
QFileInfo inx(disk.absoluteFilePath(QLatin1String("setup.inx"))); QStringList list(findFiles(QLatin1String("setup.inx"), getDiskPath()));
if (inx.exists()) {
emit textChanged(tr("Updating Morrowind configuration file")); emit textChanged(tr("Updating Morrowind configuration file"));
mIniSettings.parseInx(inx.absoluteFilePath());
} else { foreach (const QString &inx, list) {
qDebug() << "setup.inx not found!"; mIniSettings.parseInx(inx);
} }
} }
@ -799,15 +718,23 @@ bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &dest
return success; return success;
} }
QString Wizard::UnshieldWorker::findFile(const QString &fileName, const QString &path) QString Wizard::UnshieldWorker::findFile(const QString &fileName, const QString &path, int depth)
{ {
return findFiles(fileName, path).first(); return findFiles(fileName, path, depth).first();
} }
QStringList Wizard::UnshieldWorker::findFiles(const QString &fileName, const QString &path) QStringList Wizard::UnshieldWorker::findFiles(const QString &fileName, const QString &path, int depth)
{ {
qDebug() << "Searching path: " << path << " for: " << fileName;
static const int MAXIMUM_DEPTH = 5;
if (depth >= MAXIMUM_DEPTH) {
qWarning("Maximum directory depth limit reached.");
return QStringList();
}
QStringList result; QStringList result;
QDir dir(source); QDir dir(path);
if (!dir.exists()) if (!dir.exists())
return QStringList(); return QStringList();
@ -821,7 +748,7 @@ QStringList Wizard::UnshieldWorker::findFiles(const QString &fileName, const QSt
continue; continue;
if (info.isDir()) { if (info.isDir()) {
result = findFiles(file, info.absoluteFilePath()); result.append(findFiles(fileName, info.absoluteFilePath(), depth + 1));
} else { } else {
if (info.fileName() == fileName) { if (info.fileName() == fileName) {
qDebug() << "File found at: " << info.absoluteFilePath(); qDebug() << "File found at: " << info.absoluteFilePath();
@ -831,7 +758,6 @@ QStringList Wizard::UnshieldWorker::findFiles(const QString &fileName, const QSt
} }
return result; return result;
} }
bool Wizard::UnshieldWorker::findInCab(const QString &cabFile, const QString &fileName) bool Wizard::UnshieldWorker::findInCab(const QString &cabFile, const QString &fileName)
@ -855,7 +781,6 @@ bool Wizard::UnshieldWorker::findInCab(const QString &cabFile, const QString &fi
if (unshield_file_is_valid(unshield, j)) { if (unshield_file_is_valid(unshield, j)) {
QString current(QString::fromUtf8(unshield_file_name(unshield, j))); QString current(QString::fromUtf8(unshield_file_name(unshield, j)));
qDebug() << "Current is: " << current;
if (current.toLower() == fileName.toLower()) if (current.toLower() == fileName.toLower())
return true; // File is found! return true; // File is found!
} }

@ -31,7 +31,8 @@ namespace Wizard
void setInstallComponent(Wizard::Component component, bool install); void setInstallComponent(Wizard::Component component, bool install);
void setComponentPath(Wizard::Component component, const QString &path); // void setComponentPath(Wizard::Component component, const QString &path);
void setDiskPath(const QString &path);
void setPath(const QString &path); void setPath(const QString &path);
void setIniPath(const QString &path); void setIniPath(const QString &path);
@ -49,7 +50,8 @@ namespace Wizard
bool getInstallComponent(Component component); bool getInstallComponent(Component component);
QString getComponentPath(Component component); //QString getComponentPath(Component component);
QString getDiskPath();
void setComponentDone(Component component, bool done = true); void setComponentDone(Component component, bool done = true);
bool getComponentDone(Component component); bool getComponentDone(Component component);
@ -66,18 +68,14 @@ namespace Wizard
bool extractFile(Unshield *unshield, const QString &destination, const QString &prefix, int index, int counter); bool extractFile(Unshield *unshield, const QString &destination, const QString &prefix, int index, int counter);
bool findInCab(const QString &cabFile, const QString &fileName); bool findInCab(const QString &cabFile, const QString &fileName);
QString findFile(const QString &fileName, const QString &path); QString findFile(const QString &fileName, const QString &path, int depth = 0);
QStringList findFiles(const QString &fileName, const QString &path); QStringList findFiles(const QString &fileName, const QString &path, int depth = 0);
bool installFile(const QString &fileName, const QString &path); bool installFile(const QString &fileName, const QString &path);
bool installDirectory(const QString &dirName, const QString &path, bool recursive = true); bool installDirectory(const QString &dirName, const QString &path, bool recursive = true);
bool installMorrowind(); bool installComponent(Component component, const QString &path);
bool installTribunal(); bool setupComponent(Component component);
bool installBloodmoon();
bool installComponent(Component component);
void setupAddon(Component component);
bool mInstallMorrowind; bool mInstallMorrowind;
bool mInstallTribunal; bool mInstallTribunal;
@ -87,12 +85,9 @@ namespace Wizard
bool mTribunalDone; bool mTribunalDone;
bool mBloodmoonDone; bool mBloodmoonDone;
QString mMorrowindPath;
QString mTribunalPath;
QString mBloodmoonPath;
QString mPath; QString mPath;
QString mIniPath; QString mIniPath;
QString mDiskPath;
IniSettings mIniSettings; IniSettings mIniSettings;

Loading…
Cancel
Save