Add -o / --output flag to UEFIPatch

This commit is contained in:
vit9696 2018-05-19 18:55:51 +03:00
parent 8db52ea51a
commit b5961a7155
3 changed files with 25 additions and 15 deletions

View file

@ -25,7 +25,7 @@ UEFIPatch::~UEFIPatch()
delete ffsEngine;
}
UINT8 UEFIPatch::patchFromFile(QString path, QString patches)
UINT8 UEFIPatch::patchFromFile(const QString & path, const QString & patches, const QString & outputPath)
{
QFileInfo patchInfo = QFileInfo(patches);
@ -110,7 +110,7 @@ UINT8 UEFIPatch::patchFromFile(QString path, QString patches)
return ERR_NOTHING_TO_PATCH;
QFile outputFile;
outputFile.setFileName(path.append(".patched"));
outputFile.setFileName(outputPath);
if (!outputFile.open(QFile::WriteOnly))
return ERR_FILE_WRITE;