#include <QProcess>
#include <QSqlTableModel>
#include <QItemSelectionModel>
-//#include "utils/OSDaB-Zip/unzip.h"
#include "emulauncher.h"
#include "db/dbmediatype.h"
#include "db/dbplatform.h"
{
// extract the media image container to tmp folder
// (TODO: tmp folder configuration)
- //UnZip unz;
QString fp;
fp.append(mic->getFilePath()->getName());
if (!fp.endsWith('/')) fp.append("/");
fp.append(mic->getName());
- //unz.openArchive(fp);
- //int err = unz.extractAll("/tmp/"); // TODO: this must be set dynamically
- //qDebug() << "extractAll to " << fp << " : " << err;
-
int ret = unzipHelper->extractAll(fp, "/tmp/");
if (ret) {
fileList << effo;
}
- /*UnZip uz;
- UnZip::ErrorCode ec = uz.openArchive(filePath);
- if (ec != UnZip::Ok)
- throw EmuFrontException(tr("Error while opening zip-file %1, error code %2").arg(filePath).arg(ec));
-
- QList<UnZip::ZipEntry> list = uz.entryList();
- foreach(UnZip::ZipEntry entry, list)
- {
- qDebug() << "Zip entry " << entry.filename;
- if (isSupportedFile(entry.filename, sup->getSupportedFileTypeExtensions()))
- {
- QString checksum = QString("%1").arg(entry.crc32, 0, 16);
- qDebug() << "Checksum " << checksum;
- MediaImage *effo = new MediaImage(entry.filename,
- checksum, entry.uncompressedSize);
- fileList << effo;
- }
- }*/
-
qDebug() << "File list has " << fileList.size() << " entries.";
return fileList;