mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
UEFITool 0.18.6
- solved a bug with unneeded original PEI core entry point recalculation - name of opened file is now shown in window title - added compression type and decompressed size info for compressed GUID-defined sections
This commit is contained in:
parent
41243f6d25
commit
41448ea49f
@ -1240,18 +1240,36 @@ UINT8 FfsEngine::parseSection(const QByteArray & section, QModelIndex & index, c
|
||||
// Tiano compressed section
|
||||
if (QByteArray((const char*)&guidDefinedSectionHeader->SectionDefinitionGuid, sizeof(EFI_GUID)) == EFI_GUIDED_SECTION_TIANO) {
|
||||
algorithm = COMPRESSION_ALGORITHM_UNKNOWN;
|
||||
info += tr("\nCompression type: Tiano");
|
||||
|
||||
result = decompress(body, EFI_STANDARD_COMPRESSION, decompressed, &algorithm);
|
||||
if (result)
|
||||
parseCurrentSection = false;
|
||||
|
||||
if (algorithm == COMPRESSION_ALGORITHM_TIANO) {
|
||||
info += tr("\nCompression type: Tiano");
|
||||
info += tr("\nDecompressed size: %1").arg(decompressed.length(), 8, 16, QChar('0'));
|
||||
}
|
||||
else if (algorithm == COMPRESSION_ALGORITHM_EFI11) {
|
||||
info += tr("\nCompression type: EFI 1.1");
|
||||
info += tr("\nDecompressed size: %1").arg(decompressed.length(), 8, 16, QChar('0'));
|
||||
}
|
||||
else
|
||||
info += tr("\nCompression type: unknown");
|
||||
}
|
||||
// LZMA compressed section
|
||||
else if (QByteArray((const char*)&guidDefinedSectionHeader->SectionDefinitionGuid, sizeof(EFI_GUID)) == EFI_GUIDED_SECTION_LZMA) {
|
||||
algorithm = COMPRESSION_ALGORITHM_UNKNOWN;
|
||||
info += tr("\nCompression type: LZMA");
|
||||
|
||||
result = decompress(body, EFI_CUSTOMIZED_COMPRESSION, decompressed, &algorithm);
|
||||
if (result)
|
||||
parseCurrentSection = false;
|
||||
|
||||
if (algorithm == COMPRESSION_ALGORITHM_LZMA) {
|
||||
info += tr("\nCompression type: LZMA");
|
||||
info += tr("\nDecompressed size: %1").arg(decompressed.length(), 8, 16, QChar('0'));
|
||||
}
|
||||
else
|
||||
info += tr("\nCompression type: unknown");
|
||||
}
|
||||
// Unknown GUIDed section
|
||||
else {
|
||||
@ -1342,10 +1360,12 @@ UINT8 FfsEngine::parseSection(const QByteArray & section, QModelIndex & index, c
|
||||
index = model->addItem(Types::Section, sectionHeader->Type, COMPRESSION_ALGORITHM_NONE, name, "", info, header, body, QByteArray(), parent, mode);
|
||||
|
||||
// Special case of PEI Core
|
||||
if ((sectionHeader->Type == EFI_SECTION_PE32 || sectionHeader->Type == EFI_SECTION_TE) && model->subtype(parent) == EFI_FV_FILETYPE_PEI_CORE) {
|
||||
if ((sectionHeader->Type == EFI_SECTION_PE32 || sectionHeader->Type == EFI_SECTION_TE)
|
||||
&& model->subtype(parent) == EFI_FV_FILETYPE_PEI_CORE
|
||||
&& oldPeiCoreEntryPoint == 0) {
|
||||
result = getEntryPoint(model->body(index), oldPeiCoreEntryPoint);
|
||||
if (result)
|
||||
msg(tr("parseSection: Can't get entry point of image file"), index);
|
||||
msg(tr("parseSection: Can't get original PEI core entry point"), index);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
11
uefitool.cpp
11
uefitool.cpp
@ -16,7 +16,8 @@
|
||||
|
||||
UEFITool::UEFITool(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::UEFITool)
|
||||
ui(new Ui::UEFITool),
|
||||
version(tr("0.18.6"))
|
||||
{
|
||||
clipboard = QApplication::clipboard();
|
||||
|
||||
@ -25,6 +26,9 @@ ui(new Ui::UEFITool)
|
||||
searchDialog = new SearchDialog(this);
|
||||
ffsEngine = NULL;
|
||||
|
||||
// Set window title
|
||||
this->setWindowTitle(tr("UEFITool %1").arg(version));
|
||||
|
||||
// Connect signals to slots
|
||||
connect(ui->actionOpenImageFile, SIGNAL(triggered()), this, SLOT(openImageFile()));
|
||||
connect(ui->actionSaveImageFile, SIGNAL(triggered()), this, SLOT(saveImageFile()));
|
||||
@ -72,6 +76,9 @@ void UEFITool::init()
|
||||
ui->messageListWidget->clear();
|
||||
ui->infoEdit->clear();
|
||||
|
||||
// Set window title
|
||||
this->setWindowTitle(tr("UEFITool %1").arg(version));
|
||||
|
||||
// Disable menus
|
||||
ui->menuCapsuleActions->setDisabled(true);
|
||||
ui->menuImageActions->setDisabled(true);
|
||||
@ -544,6 +551,8 @@ void UEFITool::openImageFile(QString path)
|
||||
inputFile.close();
|
||||
|
||||
init();
|
||||
this->setWindowTitle(tr("UEFITool %1 - %2").arg(version).arg(fileInfo.fileName()));
|
||||
|
||||
UINT8 result = ffsEngine->parseImageFile(buffer);
|
||||
showMessages();
|
||||
if (result)
|
||||
|
@ -96,6 +96,7 @@ private:
|
||||
QClipboard* clipboard;
|
||||
QString currentDir;
|
||||
QQueue<MessageListItem> messageItems;
|
||||
const QString version;
|
||||
|
||||
void showMessages();
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>UEFITool 0.18.5</string>
|
||||
<string>UEFITool</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<property name="sizePolicy">
|
||||
|
Loading…
Reference in New Issue
Block a user