compilation & ida pro path fix

This commit is contained in:
Dmitry Frolov 2018-08-23 10:23:46 +03:00
parent 856ea2a3aa
commit ec43311867

View file

@ -761,6 +761,10 @@ void UEFITool::inspectIDA64()
void UEFITool::inspect(const UINT8 mode) void UEFITool::inspect(const UINT8 mode)
{ {
if((mode == INSPECT_MODE_IDA32 && idaPath32.trimmed().isEmpty()) ||
(mode == INSPECT_MODE_IDA64 && idaPath64.trimmed().isEmpty()))
return;
UString filePath; UString filePath;
extract(EXTRACT_MODE_BODY, &filePath); extract(EXTRACT_MODE_BODY, &filePath);
@ -770,10 +774,7 @@ void UEFITool::inspect(const UINT8 mode)
QStringList arg; QStringList arg;
arg << filePath; arg << filePath;
QProcess idaProcess; if(!QProcess::startDetached(mode == INSPECT_MODE_IDA32 ? idaPath32 : idaPath64, arg)) {
idaProcess.setProgram(mode == INSPECT_MODE_IDA32 ? idaPath32 : idaPath64);
idaProcess.setArguments(arg);
if(!idaProcess.startDetached()) {
QMessageBox::critical(this, tr("Inspect failed"), tr("Can't start IDA process"), QMessageBox::Ok); QMessageBox::critical(this, tr("Inspect failed"), tr("Can't start IDA process"), QMessageBox::Ok);
return; return;
} }
@ -941,21 +942,28 @@ void UEFITool::specifyPathIDA()
void UEFITool::specifyPathIDA32() void UEFITool::specifyPathIDA32()
{ {
QString path; UString path;
#if defined Q_OS_WIN
path = QFileDialog::getOpenFileName(this, tr("Specify path to ida.exe"), "ida.exe", tr("IDA Pro executable (ida.exe);;All files (*)")); path = QFileDialog::getOpenFileName(this, tr("Specify path to ida.exe"), "ida.exe", tr("IDA Pro executable (ida.exe);;All files (*)"));
#else
path = QFileDialog::getOpenFileName(this, tr("Specify path to ida.exe"), "ida.exe", tr("IDA Pro executable (ida);;All files (*)"));
#endif
if (path.trimmed().isEmpty()) if (path.trimmed().isEmpty())
return; return;
idaPath32 = path; idaPath32 = path;
} }
void UEFITool::specifyPathIDA64() void UEFITool::specifyPathIDA64()
{ {
QString path; UString path;
#if defined Q_OS_WIN
path = QFileDialog::getOpenFileName(this, tr("Specify path to ida64.exe"), "ida64.exe", tr("IDA Pro 64 executable (ida64.exe);;All files (*)")); path = QFileDialog::getOpenFileName(this, tr("Specify path to ida64.exe"), "ida64.exe", tr("IDA Pro 64 executable (ida64.exe);;All files (*)"));
#else
path = QFileDialog::getOpenFileName(this, tr("Specify path to ida64.exe"), "ida64.exe", tr("IDA Pro 64 executable (ida64);;All files (*)"));
#endif
if (path.trimmed().isEmpty()) if (path.trimmed().isEmpty())
return; return;