update
This commit is contained in:
parent
51c3eb744a
commit
c9fff656f8
|
@ -24,9 +24,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
winghexdisasm.cpp \
|
||||
authordialog.cpp \
|
||||
sponsordialog.cpp
|
||||
winghexdisasm.cpp
|
||||
|
||||
HEADERS += \
|
||||
capstone/arm.h \
|
||||
|
@ -48,9 +46,8 @@ HEADERS += \
|
|||
capstone/x86.h \
|
||||
capstone/xcore.h \
|
||||
winghexdisasm.h \
|
||||
../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h \
|
||||
authordialog.h \
|
||||
sponsordialog.h
|
||||
../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h
|
||||
|
||||
DISTFILES += WingHexDisasm.json
|
||||
|
||||
LIBS += $$PWD/capstone/libcapstone.a
|
||||
|
@ -58,10 +55,5 @@ LIBS += $$PWD/capstone/libcapstone.a
|
|||
RESOURCES += \
|
||||
resource.qrc
|
||||
|
||||
|
||||
TRANSLATIONS += \
|
||||
$$PWD/WingHexDisasm.ts
|
||||
|
||||
FORMS += \
|
||||
authordialog.ui \
|
||||
sponsordialog.ui
|
||||
|
|
BIN
WingHexDisasm.qm
BIN
WingHexDisasm.qm
Binary file not shown.
|
@ -4,61 +4,58 @@
|
|||
<context>
|
||||
<name>AuthorDialog</name>
|
||||
<message>
|
||||
<location filename="authordialog.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation>关于作者</translation>
|
||||
<translation type="vanished">关于作者</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SponsorDialog</name>
|
||||
<message>
|
||||
<location filename="sponsordialog.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation>赞助</translation>
|
||||
<translation type="vanished">赞助</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="sponsordialog.ui" line="26"/>
|
||||
<source>Thanks for sponsor!</source>
|
||||
<translation>感谢大家的赞助支持!</translation>
|
||||
<translation type="vanished">感谢大家的赞助支持!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WingHexDisasm</name>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="43"/>
|
||||
<location filename="winghexdisasm.cpp" line="41"/>
|
||||
<source>Arch :</source>
|
||||
<translation>架构:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="111"/>
|
||||
<location filename="winghexdisasm.cpp" line="109"/>
|
||||
<source>Mode :</source>
|
||||
<translation>模式:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="159"/>
|
||||
<location filename="winghexdisasm.cpp" line="157"/>
|
||||
<source>DisasmWindow</source>
|
||||
<translation>反汇编</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="161"/>
|
||||
<location filename="winghexdisasm.cpp" line="208"/>
|
||||
<location filename="winghexdisasm.cpp" line="159"/>
|
||||
<location filename="winghexdisasm.cpp" line="209"/>
|
||||
<source>WingHexDisasm</source>
|
||||
<translation>羽云反汇编器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="165"/>
|
||||
<location filename="winghexdisasm.cpp" line="184"/>
|
||||
<location filename="winghexdisasm.cpp" line="163"/>
|
||||
<location filename="winghexdisasm.cpp" line="185"/>
|
||||
<source>Clear</source>
|
||||
<translation>清空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="163"/>
|
||||
<location filename="winghexdisasm.cpp" line="182"/>
|
||||
<location filename="winghexdisasm.cpp" line="161"/>
|
||||
<location filename="winghexdisasm.cpp" line="183"/>
|
||||
<source>Disasm</source>
|
||||
<translation>反汇编</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="168"/>
|
||||
<location filename="winghexdisasm.cpp" line="166"/>
|
||||
<source>Author</source>
|
||||
<translation>作者</translation>
|
||||
</message>
|
||||
|
@ -68,28 +65,28 @@
|
|||
<translation>赞助</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="217"/>
|
||||
<location filename="winghexdisasm.cpp" line="218"/>
|
||||
<source>A small disassembly plugin for WingHexExplorer.</source>
|
||||
<oldsource>A small disasmbly plugin for WingHexExplorer.</oldsource>
|
||||
<translation>一个轻量的羽云十六进制编辑器的反汇编插件。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="231"/>
|
||||
<location filename="winghexdisasm.cpp" line="232"/>
|
||||
<source>Error: Failed capstone initialization</source>
|
||||
<translation>【错误】无法初始化 capstone 反汇编引擎</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="257"/>
|
||||
<location filename="winghexdisasm.cpp" line="258"/>
|
||||
<source>Error: Failed to disassemble given op codes</source>
|
||||
<translation>【错误】无法对选中字节进行反汇编</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="266"/>
|
||||
<location filename="winghexdisasm.cpp" line="267"/>
|
||||
<source>No Document Opened</source>
|
||||
<translation>没有任何打开的文档!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="272"/>
|
||||
<location filename="winghexdisasm.cpp" line="273"/>
|
||||
<source>No Selection Bytes</source>
|
||||
<translation>无选择字节!</translation>
|
||||
</message>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#include "authordialog.h"
|
||||
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
|
||||
#include "ui_authordialog.h"
|
||||
|
||||
AuthorDialog::AuthorDialog(QWidget *parent)
|
||||
: QDialog(parent), ui(new Ui::AuthorDialog) {
|
||||
ui->setupUi(this);
|
||||
ui->retranslateUi(this);
|
||||
ui->label->setPixmap(QPixmap(HOSTAUTHORPIMG));
|
||||
auto txtb = ui->txtb;
|
||||
txtb->setSearchPaths(QStringList({":/WingHexDisasm", ":/WingHexDisasm/img"}));
|
||||
txtb->setSource(QUrl("README.md"), QTextDocument::MarkdownResource);
|
||||
}
|
||||
|
||||
AuthorDialog::~AuthorDialog() { delete ui; }
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef AUTHORDIALOG_H
|
||||
#define AUTHORDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AuthorDialog;
|
||||
}
|
||||
|
||||
class AuthorDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AuthorDialog(QWidget *parent = nullptr);
|
||||
~AuthorDialog();
|
||||
|
||||
private:
|
||||
Ui::AuthorDialog *ui;
|
||||
};
|
||||
|
||||
#endif // AUTHORDIALOG_H
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AuthorDialog</class>
|
||||
<widget class="QDialog" name="AuthorDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>550</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>20</y>
|
||||
<width>150</width>
|
||||
<height>150</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextBrowser" name="txtb">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>190</y>
|
||||
<width>511</width>
|
||||
<height>381</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="markdown">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,12 +0,0 @@
|
|||
#include "sponsordialog.h"
|
||||
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
|
||||
#include "ui_sponsordialog.h"
|
||||
|
||||
SponsorDialog::SponsorDialog(QWidget *parent)
|
||||
: QDialog(parent), ui(new Ui::SponsorDialog) {
|
||||
ui->setupUi(this);
|
||||
ui->retranslateUi(this);
|
||||
ui->label_2->setPixmap(QPixmap(SPONSORQRCODE));
|
||||
}
|
||||
|
||||
SponsorDialog::~SponsorDialog() { delete ui; }
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef SPONSORDIALOG_H
|
||||
#define SPONSORDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class SponsorDialog;
|
||||
}
|
||||
|
||||
class SponsorDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SponsorDialog(QWidget *parent = nullptr);
|
||||
~SponsorDialog();
|
||||
|
||||
private:
|
||||
Ui::SponsorDialog *ui;
|
||||
};
|
||||
|
||||
#endif // SPONSORDIALOG_H
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SponsorDialog</class>
|
||||
<widget class="QDialog" name="SponsorDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>481</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Thanks for sponsor!</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>481</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,6 +1,4 @@
|
|||
#include "winghexdisasm.h"
|
||||
#include "authordialog.h"
|
||||
#include "sponsordialog.h"
|
||||
#include <QApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
@ -166,13 +164,16 @@ bool WingHexDisasm::init(QList<WingPluginInfo> loadedplugin) {
|
|||
WingHexDisasm::on_clear);
|
||||
menu->addSeparator();
|
||||
PluginMenuAddItemIconLamba(menu, tr("Author"), HOSTICONRES("author"), [=] {
|
||||
AuthorDialog d;
|
||||
d.exec();
|
||||
auto authord =
|
||||
newAboutDialog(QPixmap(), {":/WingHexDisasm", ":/WingHexDisasm/img"});
|
||||
authord->exec();
|
||||
delete authord;
|
||||
});
|
||||
PluginMenuAddItemIconLamba(menu, tr("Sponsor"), HOSTICONRES("sponsor"),
|
||||
[=] {
|
||||
SponsorDialog d;
|
||||
d.exec();
|
||||
auto sponsor = newSponsorDialog();
|
||||
sponsor->exec();
|
||||
delete sponsor;
|
||||
});
|
||||
}
|
||||
PluginMenuInitEnd();
|
||||
|
|
Loading…
Reference in New Issue