Version 0.16.0

- image reconstruction code refactored
- implemented patching of VTF in case of PEI core entry point change
This commit is contained in:
Nikolaj Schlej 2014-01-11 10:20:58 +01:00
parent 9665d0bcff
commit a764f15679
20 changed files with 1116 additions and 768 deletions

View File

@ -1,6 +1,6 @@
/* LZMA Compress Header /* LZMA Compress Header
Copyright (c) 2012, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

View File

@ -1,6 +1,6 @@
/* basetypes.h /* basetypes.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __BASETYPES_H__ #ifndef __BASETYPES_H__
#define __BASETYPES_H__ #define __BASETYPES_H__
#include <stdarg.h> #include <stdarg.h>
#include <stdint.h> #include <stdint.h>
@ -79,6 +80,9 @@ typedef uint16_t CHAR16;
#define ERR_UNKNOWN_IMAGE_TYPE 29 #define ERR_UNKNOWN_IMAGE_TYPE 29
#define ERR_UNKNOWN_PE_OPTIONAL_HEADER_TYPE 30 #define ERR_UNKNOWN_PE_OPTIONAL_HEADER_TYPE 30
#define ERR_UNKNOWN_RELOCATION_TYPE 31 #define ERR_UNKNOWN_RELOCATION_TYPE 31
#define ERR_GENERIC_CALL_NOT_SUPPORTED 32
#define ERR_VOLUME_BASE_NOT_FOUND 33
#define ERR_PEI_CORE_ENTRY_POINT_NOT_FOUND 34
#define ERR_NOT_IMPLEMENTED 0xFF #define ERR_NOT_IMPLEMENTED 0xFF
// Compression algorithms // Compression algorithms
@ -120,7 +124,8 @@ enum ActionTypes {
Insert, Insert,
Replace, Replace,
Remove, Remove,
Rebuild Rebuild,
Rebase
}; };
// Types // Types
@ -134,6 +139,7 @@ enum ItemTypes {
File, File,
Section Section
}; };
// Subtypes // Subtypes
enum ImageSubtypes{ enum ImageSubtypes{
IntelImage = 70, IntelImage = 70,
@ -145,8 +151,12 @@ enum CapsuleSubtypes {
UefiCapsule UefiCapsule
}; };
enum VolumeSubtypes {
BootVolume = 90
};
enum RegionSubtypes { enum RegionSubtypes {
DescriptorRegion = 90, DescriptorRegion = 100,
GbeRegion, GbeRegion,
MeRegion, MeRegion,
BiosRegion, BiosRegion,

View File

@ -1,6 +1,6 @@
/* descriptor.h /* descriptor.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

6
ffs.h
View File

@ -1,6 +1,6 @@
/* ffs.h /* ffs.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -94,9 +94,13 @@ typedef struct {
// Filesystem GUIDs // Filesystem GUIDs
const QByteArray EFI_FIRMWARE_FILE_SYSTEM_GUID const QByteArray EFI_FIRMWARE_FILE_SYSTEM_GUID
("\xD9\x54\x93\x7A\x68\x04\x4A\x44\x81\xCE\x0B\xF6\x17\xD8\x90\xDF", 16); ("\xD9\x54\x93\x7A\x68\x04\x4A\x44\x81\xCE\x0B\xF6\x17\xD8\x90\xDF", 16);
const QByteArray EFI_APPLE_BOOT_VOLUME_FILE_SYSTEM_GUID
("\xAD\xEE\xAD\x04\xFF\x61\x31\x4D\xB6\xBA\x64\xF8\xBF\x90\x1F\x5A", 16);
const QByteArray EFI_FIRMWARE_FILE_SYSTEM2_GUID const QByteArray EFI_FIRMWARE_FILE_SYSTEM2_GUID
("\x78\xE5\x8C\x8C\x3D\x8A\x1C\x4F\x99\x35\x89\x61\x85\xC3\x2D\xD3", 16); ("\x78\xE5\x8C\x8C\x3D\x8A\x1C\x4F\x99\x35\x89\x61\x85\xC3\x2D\xD3", 16);
// Firmware volume signature // Firmware volume signature
const QByteArray EFI_FV_SIGNATURE("_FVH", 4); const QByteArray EFI_FV_SIGNATURE("_FVH", 4);
#define EFI_FV_SIGNATURE_OFFSET 0x28 #define EFI_FV_SIGNATURE_OFFSET 0x28

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* ffsengine.h /* ffsengine.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -45,7 +45,7 @@ public:
// Firmware image parsing // Firmware image parsing
UINT8 parseInputFile(const QByteArray & buffer); UINT8 parseInputFile(const QByteArray & buffer);
UINT8 parseIntelImage(const QByteArray & flashImage, QModelIndex & index, const QModelIndex & parent = QModelIndex()); UINT8 parseIntelImage(const QByteArray & intelImage, QModelIndex & index, const QModelIndex & parent = QModelIndex());
UINT8 parseGbeRegion(const QByteArray & gbe, QModelIndex & index, const QModelIndex & parent); UINT8 parseGbeRegion(const QByteArray & gbe, QModelIndex & index, const QModelIndex & parent);
UINT8 parseMeRegion(const QByteArray & me, QModelIndex & index, const QModelIndex & parent); UINT8 parseMeRegion(const QByteArray & me, QModelIndex & index, const QModelIndex & parent);
UINT8 parseBiosRegion(const QByteArray & bios, QModelIndex & index, const QModelIndex & parent); UINT8 parseBiosRegion(const QByteArray & bios, QModelIndex & index, const QModelIndex & parent);
@ -65,10 +65,15 @@ public:
UINT8 compress(const QByteArray & data, const UINT8 algorithm, QByteArray & compressedData); UINT8 compress(const QByteArray & data, const UINT8 algorithm, QByteArray & compressedData);
// Construction routines // Construction routines
UINT8 reconstructImage(QByteArray & reconstructed);
UINT8 constructPadFile(const UINT32 size, const UINT8 revision, const UINT8 erasePolarity, QByteArray & pad); UINT8 constructPadFile(const UINT32 size, const UINT8 revision, const UINT8 erasePolarity, QByteArray & pad);
UINT8 reconstruct(const QModelIndex & index, QQueue<QByteArray> & queue, const UINT8 revision = 2, const UINT8 erasePolarity = ERASE_POLARITY_UNKNOWN, const UINT32 base = 0);
UINT8 growVolume(QByteArray & header, const UINT32 size, UINT32 & newSize); UINT8 growVolume(QByteArray & header, const UINT32 size, UINT32 & newSize);
UINT8 reconstruct(const QModelIndex &index, QByteArray & reconstructed);
UINT8 reconstructIntelImage(const QModelIndex& index, QByteArray & reconstructed);
UINT8 reconstructRegion(const QModelIndex& index, QByteArray & reconstructed);
UINT8 reconstructBios(const QModelIndex& index, QByteArray & reconstructed);
UINT8 reconstructVolume(const QModelIndex& index, QByteArray & reconstructed);
UINT8 reconstructFile(const QModelIndex& index, const UINT8 revision, const UINT8 erasePolarity, const UINT32 base, QByteArray& reconstructed);
UINT8 reconstructSection(const QModelIndex& index, const UINT32 base, QByteArray & reconstructed);
// Operations on tree items // Operations on tree items
UINT8 extract(const QModelIndex & index, QByteArray & extracted, const UINT8 mode); UINT8 extract(const QModelIndex & index, QByteArray & extracted, const UINT8 mode);
@ -87,12 +92,21 @@ public:
UINT8 findTextPattern(const QString & pattern, const bool unicode, const Qt::CaseSensitivity caseSensitive); UINT8 findTextPattern(const QString & pattern, const bool unicode, const Qt::CaseSensitivity caseSensitive);
UINT8 findTextPatternIn(const QModelIndex & index, const QString & pattern, const bool unicode, const Qt::CaseSensitivity caseSensitive); UINT8 findTextPatternIn(const QModelIndex & index, const QString & pattern, const bool unicode, const Qt::CaseSensitivity caseSensitive);
// Rebase routines
UINT8 rebase(QByteArray & executable, const UINT32 base);
private: private:
TreeModel *model; TreeModel *model;
// PEI Core entry point
UINT32 oldPeiCoreEntryPoint;
UINT32 newPeiCoreEntryPoint;
// Rebase routines
UINT8 getBase(const QByteArray& file, UINT32& base);
UINT8 getEntryPoint(const QByteArray& file, UINT32 &peiCoreEntryPoint);
UINT8 rebase(QByteArray & executable, const UINT32 base);
// Patch routines
UINT8 patchVtf(QByteArray &vtf);
// Message helper // Message helper
QQueue<MessageListItem> messageItems; QQueue<MessageListItem> messageItems;
void msg(const QString & message, const QModelIndex index = QModelIndex()); void msg(const QString & message, const QModelIndex index = QModelIndex());

2
gbe.h
View File

@ -1,6 +1,6 @@
/* gbe.h /* gbe.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

View File

@ -1,6 +1,6 @@
/* main.cpp /* main.cpp
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -18,12 +18,11 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
a.setOrganizationName("CodeRush");
a.setOrganizationDomain("coderush.me");
a.setApplicationName("UEFITool");
UEFITool w; UEFITool w;
QCoreApplication::setOrganizationName("CodeRush");
QCoreApplication::setOrganizationDomain("coderush.me");
QCoreApplication::setApplicationName("UEFITool");
if (a.arguments().length() > 1) if (a.arguments().length() > 1)
w.openImageFile(a.arguments().at(1)); w.openImageFile(a.arguments().at(1));
w.show(); w.show();

2
me.h
View File

@ -1,6 +1,6 @@
/* me.h /* me.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

View File

@ -1,6 +1,6 @@
/* messagelistitem.h /* messagelistitem.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

View File

@ -1,12 +1,4 @@
/** peimage.h /* peimage.h
EFI image format for PE32, PE32+ and TE. Please note some data structures are
different for PE32 and PE32+. EFI_IMAGE_NT_HEADERS32 is for PE32 and
EFI_IMAGE_NT_HEADERS64 is for PE32+.
This file is coded to the Visual Studio, Microsoft Portable Executable and
Common Object File Format Specification, Revision 8.0 - May 16, 2006.
This file also includes some definitions in PI Specification, Revision 1.0.
Copyright (c) 2014, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
@ -19,7 +11,7 @@ http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ */
#ifndef __PE_IMAGE_H__ #ifndef __PE_IMAGE_H__
#define __PE_IMAGE_H__ #define __PE_IMAGE_H__
@ -699,10 +691,10 @@ typedef struct {
// //
typedef struct { typedef struct {
UINT16 Signature; // The signature for TE format = "VZ" UINT16 Signature; // The signature for TE format = "VZ"
UINT16 Machine; // From the original file header UINT16 Machine; // From original file header
UINT8 NumberOfSections; // From the original file header UINT8 NumberOfSections; // From original file header
UINT8 Subsystem; // From original optional header UINT8 Subsystem; // From original optional header
UINT16 StrippedSize; // Number of bytes we removed from the header UINT16 StrippedSize; // Number of bytes we removed from header
UINT32 AddressOfEntryPoint; // Offset to entry point -- from original optional header UINT32 AddressOfEntryPoint; // Offset to entry point -- from original optional header
UINT32 BaseOfCode; // From original image -- required for ITP debug UINT32 BaseOfCode; // From original image -- required for ITP debug
UINT64 ImageBase; // From original file header UINT64 ImageBase; // From original file header

View File

@ -1,6 +1,6 @@
/* searchdialog.cpp /* searchdialog.cpp
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -19,30 +19,9 @@ SearchDialog::SearchDialog(QWidget *parent) :
{ {
// Create UI // Create UI
ui->setupUi(this); ui->setupUi(this);
// Connect
//connect(ui->dataTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setEditMask()));
//connect(ui->translateFromHexCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setEditMask()));
} }
SearchDialog::~SearchDialog() SearchDialog::~SearchDialog()
{ {
delete ui; delete ui;
} }
/*void SearchDialog::setEditMask()
{
int index = ui->dataTypeComboBox->currentIndex();
QString mask;
if (index == 0) // Hex pattern, max 48 bytes long
mask = "";
else if (index == 1) {
if (ui->translateFromHexCheckBox->isChecked())
mask = "<HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH;_";
else
mask = "<HHHHHHHH-HHHH-HHHH-HHHHHHHHHHHHHHHH;_";
}
else
mask = "";
ui->searchEdit->setInputMask(mask);
}*/

View File

@ -1,6 +1,6 @@
/* searchdialog.h /* searchdialog.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

View File

@ -1,6 +1,6 @@
/* treeitem.cpp /* treeitem.cpp
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -52,8 +52,12 @@ QString itemSubtypeToQString(const UINT8 type, const UINT8 subtype)
else else
return QObject::tr("Unknown"); return QObject::tr("Unknown");
case Padding: case Padding:
case Volume:
return ""; return "";
case Volume:
if (subtype == BootVolume)
return QObject::tr("Boot");
else
return "";
case Capsule: case Capsule:
if (subtype == AptioCapsule) if (subtype == AptioCapsule)
return QObject::tr("Aptio extended"); return QObject::tr("Aptio extended");
@ -182,6 +186,8 @@ QVariant TreeItem::data(int column) const
return QObject::tr("Remove"); return QObject::tr("Remove");
if (itemAction == Rebuild) if (itemAction == Rebuild)
return QObject::tr("Rebuild"); return QObject::tr("Rebuild");
if (itemAction == Rebase)
return QObject::tr("Rebase");
return QVariant(); return QVariant();
case 2: //Type case 2: //Type
return itemTypeName; return itemTypeName;
@ -297,3 +303,8 @@ void TreeItem::setAction(const UINT8 action)
parentItem->setAction(Rebuild); parentItem->setAction(Rebuild);
} }
void TreeItem::setSubtype(const UINT8 subtype)
{
itemSubtype = subtype;
itemSubtypeName = itemSubtypeToQString(itemType, itemSubtype);
}

View File

@ -1,6 +1,6 @@
/* treeitem.h /* treeitem.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -63,6 +63,7 @@ public:
// Some values can be changed after item construction // Some values can be changed after item construction
void setAction(const UINT8 action); void setAction(const UINT8 action);
void setSubtype(const UINT8 subtype);
void setTypeName(const QString &text); void setTypeName(const QString &text);
void setSubtypeName(const QString &text); void setSubtypeName(const QString &text);
void setName(const QString &text); void setName(const QString &text);

View File

@ -1,6 +1,6 @@
/* treemodel.cpp /* treemodel.cpp
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -220,6 +220,16 @@ UINT8 TreeModel::compression(const QModelIndex &index) const
return item->compression(); return item->compression();
} }
void TreeModel::setSubtype(const QModelIndex & index, UINT8 subtype)
{
if(!index.isValid())
return;
TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
item->setSubtype(subtype);
emit dataChanged(index, index);
}
void TreeModel::setNameString(const QModelIndex &index, const QString &data) void TreeModel::setNameString(const QModelIndex &index, const QString &data)
{ {
if(!index.isValid()) if(!index.isValid())

View File

@ -1,6 +1,6 @@
/* treemodel.h /* treemodel.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -53,6 +53,8 @@ public:
void setNameString(const QModelIndex &index, const QString &text); void setNameString(const QModelIndex &index, const QString &text);
void setTextString(const QModelIndex &index, const QString &text); void setTextString(const QModelIndex &index, const QString &text);
void setSubtype(const QModelIndex & index, UINT8 subtype);
UINT8 type(const QModelIndex &index) const; UINT8 type(const QModelIndex &index) const;
UINT8 subtype(const QModelIndex &index) const; UINT8 subtype(const QModelIndex &index) const;
QByteArray header(const QModelIndex &index) const; QByteArray header(const QModelIndex &index) const;

View File

@ -1,6 +1,6 @@
/* uefitool.cpp /* uefitool.cpp
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -448,7 +448,7 @@ void UEFITool::saveImageFile()
} }
QByteArray reconstructed; QByteArray reconstructed;
UINT8 result = ffsEngine->reconstructImage(reconstructed); UINT8 result = ffsEngine->reconstruct(ffsEngine->treeModel()->index(0,0), reconstructed);
showMessages(); showMessages();
if (result) { if (result) {
ui->statusBar->showMessage(tr("Reconstruction failed (%1)").arg(result)); ui->statusBar->showMessage(tr("Reconstruction failed (%1)").arg(result));
@ -461,13 +461,6 @@ void UEFITool::saveImageFile()
ui->statusBar->showMessage(tr("Reconstructed image written")); ui->statusBar->showMessage(tr("Reconstructed image written"));
} }
/*void UEFITool::resizeTreeViewColumns()
{
int count = ffsEngine->model()->columnCount();
for(int i = 0; i < count; i++)
ui->structureTreeView->resizeColumnToContents(i);
}*/
void UEFITool::openImageFile() void UEFITool::openImageFile()
{ {
QString path = QFileDialog::getOpenFileName(this, tr("Open BIOS image file"),".","BIOS image files (*.rom *.bin *.cap *.bio *.fd *.wph *.efi);;All files (*.*)"); QString path = QFileDialog::getOpenFileName(this, tr("Open BIOS image file"),".","BIOS image files (*.rom *.bin *.cap *.bio *.fd *.wph *.efi);;All files (*.*)");
@ -591,7 +584,7 @@ void UEFITool::contextMenuEvent(QContextMenuEvent* event)
void UEFITool::readSettings() void UEFITool::readSettings()
{ {
QSettings settings("UEFITool.ini", QSettings::IniFormat, this); QSettings settings(this);
resize(settings.value("mainWindow/size", QSize(800, 600)).toSize()); resize(settings.value("mainWindow/size", QSize(800, 600)).toSize());
move(settings.value("mainWindow/position", QPoint(0, 0)).toPoint()); move(settings.value("mainWindow/position", QPoint(0, 0)).toPoint());
QList<int> horList, vertList; QList<int> horList, vertList;
@ -610,7 +603,7 @@ void UEFITool::readSettings()
void UEFITool::writeSettings() void UEFITool::writeSettings()
{ {
QSettings settings("UEFITool.ini", QSettings::IniFormat, this); QSettings settings(this);
settings.setValue("mainWindow/size", size()); settings.setValue("mainWindow/size", size());
settings.setValue("mainWindow/position", pos()); settings.setValue("mainWindow/position", pos());
settings.setValue("mainWindow/treeWidth", ui->structureGroupBox->width()); settings.setValue("mainWindow/treeWidth", ui->structureGroupBox->width());

View File

@ -1,6 +1,6 @@
/* uefitool.h /* uefitool.h
Copyright (c) 2013, Nikolaj Schlej. All rights reserved. Copyright (c) 2014, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at

View File

@ -20,7 +20,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>UEFITool 0.15.0</string> <string>UEFITool 0.16.0</string>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<property name="sizePolicy"> <property name="sizePolicy">