forked from osmocom/wireshark
Convert Acknowledgements to markdown and update GUI
Move Acknowledgements to a separate file to enable some code simplification and improve maintenance and discoverability for acknowlegements. Convert the Acknowledgements file to Github flavored markdown and display it in rich text using QTextBrowser. Add Acknowledgements.md to NSIS installer
This commit is contained in:
parent
a0174e4f0b
commit
b8ec3199ab
27
AUTHORS
27
AUTHORS
|
@ -5144,30 +5144,3 @@ zhudewen <zhudewen[AT]iauto.com>
|
||||||
Øyvind Rønningstad <ronningstad[AT]gmail.com>
|
Øyvind Rønningstad <ronningstad[AT]gmail.com>
|
||||||
Đorđije Manojlović <djordjije.manojlovic[AT]omicronenergy.com>
|
Đorđije Manojlović <djordjije.manojlovic[AT]omicronenergy.com>
|
||||||
Дмитрий Цветцих <dmitrycvet[AT]gmail.com>
|
Дмитрий Цветцих <dmitrycvet[AT]gmail.com>
|
||||||
|
|
||||||
|
|
||||||
= Acknowledgements =
|
|
||||||
|
|
||||||
Dan Lasley <dlasley[AT]promus.com> gave permission for his dumpit() hex-dump routine to be used.
|
|
||||||
|
|
||||||
We use the exception module from Kazlib, a C library written by Kaz Kylheku <kaz[AT]kylheku.com>. Thanks go to him for his well-written library. The Kazlib home page can be found at http://www.kylheku.com/~kaz/kazlib.html
|
|
||||||
|
|
||||||
We use Lua <https://www.lua.org/about.html> to extend Wireshark APIs with scripting capabilities. Lua is a powerful, efficient, lightweight, embeddable scripting language developed and maintained by a team at PUC-Rio.
|
|
||||||
|
|
||||||
We use Lua BitOp, written by Mike Pall, for bitwise operations on numbers in Lua. The Lua BitOp home page can be found at https://bitop.luajit.org
|
|
||||||
|
|
||||||
Snax <snax[AT]shmoo.com> gave permission to use the weak key detection code from Airsnort.
|
|
||||||
|
|
||||||
IANA gave permission for their port-numbers file to be used.
|
|
||||||
|
|
||||||
We use the natural order string comparison algorithm, written by Martin Pool <mbp[AT]sourcefrog.net>.
|
|
||||||
|
|
||||||
Emanuel Eichhammer <support[AT]qcustomplot.com> granted permission to use QCustomPlot.
|
|
||||||
|
|
||||||
Some icons made by Freepik, http://www.freepik.com from https://www.flaticon.com
|
|
||||||
|
|
||||||
Insecure.Com LLC ("The Nmap Project") has granted the Wireshark Foundation permission to distribute Npcap with our Windows installers.
|
|
||||||
|
|
||||||
We use the overflow-safe math functions from the portable snippets repository (https://github.com/nemequ/portable-snippets).
|
|
||||||
|
|
||||||
We use the Lrexlib Lua library, specifically the PCRE2 flavour, to provide a regular expression API for Lua. The Lrexlib repository is hosted at https://github.com/rrthomas/lrexlib.
|
|
||||||
|
|
26
AUTHORS.src
26
AUTHORS.src
|
@ -4005,29 +4005,3 @@ Håkon Øye Amundsen <haakon.amundsen[AT]nordicsemi.no>
|
||||||
Jeffrey Wildman <jeffrey.wildman[AT]ll.mit.edu>
|
Jeffrey Wildman <jeffrey.wildman[AT]ll.mit.edu>
|
||||||
Jan Schiefer <jan.schiefer[AT]keysight.com>
|
Jan Schiefer <jan.schiefer[AT]keysight.com>
|
||||||
Triton Circonflexe <triton+enuiqr[AT]kumal.info>
|
Triton Circonflexe <triton+enuiqr[AT]kumal.info>
|
||||||
|
|
||||||
= Acknowledgements =
|
|
||||||
|
|
||||||
Dan Lasley <dlasley[AT]promus.com> gave permission for his dumpit() hex-dump routine to be used.
|
|
||||||
|
|
||||||
We use the exception module from Kazlib, a C library written by Kaz Kylheku <kaz[AT]kylheku.com>. Thanks go to him for his well-written library. The Kazlib home page can be found at http://www.kylheku.com/~kaz/kazlib.html
|
|
||||||
|
|
||||||
We use Lua <https://www.lua.org/about.html> to extend Wireshark APIs with scripting capabilities. Lua is a powerful, efficient, lightweight, embeddable scripting language developed and maintained by a team at PUC-Rio.
|
|
||||||
|
|
||||||
We use Lua BitOp, written by Mike Pall, for bitwise operations on numbers in Lua. The Lua BitOp home page can be found at https://bitop.luajit.org
|
|
||||||
|
|
||||||
Snax <snax[AT]shmoo.com> gave permission to use the weak key detection code from Airsnort.
|
|
||||||
|
|
||||||
IANA gave permission for their port-numbers file to be used.
|
|
||||||
|
|
||||||
We use the natural order string comparison algorithm, written by Martin Pool <mbp[AT]sourcefrog.net>.
|
|
||||||
|
|
||||||
Emanuel Eichhammer <support[AT]qcustomplot.com> granted permission to use QCustomPlot.
|
|
||||||
|
|
||||||
Some icons made by Freepik, http://www.freepik.com from https://www.flaticon.com
|
|
||||||
|
|
||||||
Insecure.Com LLC ("The Nmap Project") has granted the Wireshark Foundation permission to distribute Npcap with our Windows installers.
|
|
||||||
|
|
||||||
We use the overflow-safe math functions from the portable snippets repository (https://github.com/nemequ/portable-snippets).
|
|
||||||
|
|
||||||
We use the Lrexlib Lua library, specifically the PCRE2 flavour, to provide a regular expression API for Lua. The Lrexlib repository is hosted at https://github.com/rrthomas/lrexlib.
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
Dan Lasley <dlasley[AT]promus.com> gave permission for his `dumpit()` hex-dump routine to be used.
|
||||||
|
|
||||||
|
We use the exception module from [Kazlib](http://www.kylheku.com/~kaz/kazlib.html), a C library written by Kaz Kylheku <kaz[AT]kylheku.com>. Thanks go to him for his well-written library.
|
||||||
|
|
||||||
|
We use [Lua](https://www.lua.org/about.html) to extend Wireshark APIs with scripting capabilities. Lua is a powerful, efficient, lightweight, embeddable scripting language developed and maintained by a team at PUC-Rio.
|
||||||
|
|
||||||
|
We use [Lua BitOp](https://bitop.luajit.org), written by Mike Pall, for bitwise operations on numbers in Lua.
|
||||||
|
|
||||||
|
Snax <snax[AT]shmoo.com> gave permission to use the weak key detection code from [Airsnort](http://airsnort.shmoo.com).
|
||||||
|
|
||||||
|
IANA gave permission for their port-numbers file to be used.
|
||||||
|
|
||||||
|
We use the natural order string comparison algorithm, written by Martin Pool <mbp[AT]sourcefrog.net>.
|
||||||
|
|
||||||
|
Emanuel Eichhammer <support[AT]qcustomplot.com> granted permission to use [QCustomPlot](https://www.qcustomplot.com).
|
||||||
|
|
||||||
|
Some icons made by [Freepik](http://www.freepik.com) from <https://www.flaticon.com>.
|
||||||
|
|
||||||
|
Insecure.Com LLC ("The Nmap Project") has granted the Wireshark Foundation permission to distribute [Npcap](https://npcap.com) with our Windows installers.
|
||||||
|
|
||||||
|
We use the overflow-safe math functions from the [portable snippets](https://github.com/nemequ/portable-snippets) repository.
|
||||||
|
|
||||||
|
We use the [Lrexlib](https://github.com/rrthomas/lrexlib) Lua library, specifically the PCRE2 flavour, to provide a regular expression API for Lua.
|
|
@ -1965,6 +1965,7 @@ set(INSTALL_DIRS
|
||||||
|
|
||||||
# Installed into ${DATAFILE_DIR}
|
# Installed into ${DATAFILE_DIR}
|
||||||
set(INSTALL_FILES
|
set(INSTALL_FILES
|
||||||
|
Acknowledgements.md
|
||||||
docbook/ws.css
|
docbook/ws.css
|
||||||
enterprises.tsv
|
enterprises.tsv
|
||||||
gpl-2.0-standalone.html
|
gpl-2.0-standalone.html
|
||||||
|
|
|
@ -468,6 +468,7 @@ File "${STAGING_DIR}\dumpcap.html"
|
||||||
File "${STAGING_DIR}\extcap.html"
|
File "${STAGING_DIR}\extcap.html"
|
||||||
File "${STAGING_DIR}\ipmap.html"
|
File "${STAGING_DIR}\ipmap.html"
|
||||||
File "${STAGING_DIR}\gpl-2.0-standalone.html"
|
File "${STAGING_DIR}\gpl-2.0-standalone.html"
|
||||||
|
File "${STAGING_DIR}\Acknowledgements.md"
|
||||||
|
|
||||||
; C-runtime redistributable
|
; C-runtime redistributable
|
||||||
; vc_redist.x64.exe or vc_redist.x86.exe - copy and execute the redistributable installer
|
; vc_redist.x64.exe or vc_redist.x86.exe - copy and execute the redistributable installer
|
||||||
|
|
|
@ -150,6 +150,7 @@ Delete "$INSTDIR\audio\*.*"
|
||||||
Delete "$INSTDIR\bearer\*.*"
|
Delete "$INSTDIR\bearer\*.*"
|
||||||
Delete "$INSTDIR\diameter\*.*"
|
Delete "$INSTDIR\diameter\*.*"
|
||||||
Delete "$INSTDIR\gpl-2.0-standalone.html"
|
Delete "$INSTDIR\gpl-2.0-standalone.html"
|
||||||
|
Delete "$INSTDIR\Acknowledgements.md"
|
||||||
Delete "$INSTDIR\help\*.*"
|
Delete "$INSTDIR\help\*.*"
|
||||||
Delete "$INSTDIR\iconengines\*.*"
|
Delete "$INSTDIR\iconengines\*.*"
|
||||||
Delete "$INSTDIR\imageformats\*.*"
|
Delete "$INSTDIR\imageformats\*.*"
|
||||||
|
|
|
@ -192,6 +192,7 @@ Delete "$INSTDIR\extcap\ciscodump.*"
|
||||||
Delete "$INSTDIR\extcap\udpdump.*"
|
Delete "$INSTDIR\extcap\udpdump.*"
|
||||||
Delete "$INSTDIR\extcap\wifidump.*"
|
Delete "$INSTDIR\extcap\wifidump.*"
|
||||||
Delete "$INSTDIR\gpl-2.0-standalone.html"
|
Delete "$INSTDIR\gpl-2.0-standalone.html"
|
||||||
|
Delete "$INSTDIR\Acknowledgements.md"
|
||||||
Delete "$INSTDIR\help\*.*"
|
Delete "$INSTDIR\help\*.*"
|
||||||
Delete "$INSTDIR\iconengines\*.*"
|
Delete "$INSTDIR\iconengines\*.*"
|
||||||
Delete "$INSTDIR\imageformats\*.*"
|
Delete "$INSTDIR\imageformats\*.*"
|
||||||
|
|
|
@ -513,6 +513,7 @@ File "${STAGING_DIR}\dumpcap.html"
|
||||||
File "${STAGING_DIR}\extcap.html"
|
File "${STAGING_DIR}\extcap.html"
|
||||||
File "${STAGING_DIR}\ipmap.html"
|
File "${STAGING_DIR}\ipmap.html"
|
||||||
File "${STAGING_DIR}\gpl-2.0-standalone.html"
|
File "${STAGING_DIR}\gpl-2.0-standalone.html"
|
||||||
|
File "${STAGING_DIR}\Acknowledgements.md"
|
||||||
|
|
||||||
; C-runtime redistributable
|
; C-runtime redistributable
|
||||||
; vc_redist.x64.exe or vc_redist.x86.exe - copy and execute the redistributable installer
|
; vc_redist.x64.exe or vc_redist.x86.exe - copy and execute the redistributable installer
|
||||||
|
|
|
@ -48,7 +48,6 @@ def get_git_authors():
|
||||||
def extract_contributors(authors_content):
|
def extract_contributors(authors_content):
|
||||||
# Extract names and email addresses from the AUTHORS file Contributors
|
# Extract names and email addresses from the AUTHORS file Contributors
|
||||||
contributors_content = authors_content.split("= Contributors =", 1)[1]
|
contributors_content = authors_content.split("= Contributors =", 1)[1]
|
||||||
contributors_content = contributors_content.split("= Acknowledgements =", 1)[0]
|
|
||||||
CONTRIBUTOR_LINE_REGEX = r"^([\w\.\-\'\x80-\xff]+(\s*[\w+\.\-\'\x80-\xff])*)\s+<([^>]*)>"
|
CONTRIBUTOR_LINE_REGEX = r"^([\w\.\-\'\x80-\xff]+(\s*[\w+\.\-\'\x80-\xff])*)\s+<([^>]*)>"
|
||||||
contributors = []
|
contributors = []
|
||||||
state = ""
|
state = ""
|
||||||
|
@ -126,11 +125,8 @@ def main():
|
||||||
git_contributors_text = generate_git_contributors_text(contributors_emails, git_authors_emails)
|
git_contributors_text = generate_git_contributors_text(contributors_emails, git_authors_emails)
|
||||||
|
|
||||||
# Now we can write our output:
|
# Now we can write our output:
|
||||||
acknowledgements_start = author_content.find("\n\n= Acknowledgements =")
|
git_contributor_header = '\n\n= From git log =\n\n'
|
||||||
before_acknowledgements = author_content[:acknowledgements_start]
|
output = author_content + git_contributor_header + git_contributors_text + '\n'
|
||||||
acknowledgements = author_content[acknowledgements_start:]
|
|
||||||
git_contributor_header = '\n\n\n= From git log =\n\n'
|
|
||||||
output = before_acknowledgements + git_contributor_header + git_contributors_text + '\n' + acknowledgements
|
|
||||||
stdoutu8.write(output)
|
stdoutu8.write(output)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,11 +63,11 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QPlainTextEdit>
|
||||||
|
|
||||||
AuthorListModel::AuthorListModel(QObject * parent) :
|
AuthorListModel::AuthorListModel(QObject * parent) :
|
||||||
AStringListListModel(parent)
|
AStringListListModel(parent)
|
||||||
{
|
{
|
||||||
bool readAck = false;
|
|
||||||
QFile f_authors;
|
QFile f_authors;
|
||||||
|
|
||||||
f_authors.setFileName(get_datafile_path("AUTHORS-SHORT"));
|
f_authors.setFileName(get_datafile_path("AUTHORS-SHORT"));
|
||||||
|
@ -80,27 +80,18 @@ AStringListListModel(parent)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QRegularExpression rx("(.*)[<(]([\\s'a-zA-Z0-9._%+-]+(\\[[Aa][Tt]\\])?[a-zA-Z0-9._%+-]+)[>)]");
|
QRegularExpression rx("(.*)[<(]([\\s'a-zA-Z0-9._%+-]+(\\[[Aa][Tt]\\])?[a-zA-Z0-9._%+-]+)[>)]");
|
||||||
acknowledgement_.clear();
|
|
||||||
while (!ReadFile_authors.atEnd()) {
|
while (!ReadFile_authors.atEnd()) {
|
||||||
QString line = ReadFile_authors.readLine();
|
QString line = ReadFile_authors.readLine();
|
||||||
|
|
||||||
if (! readAck && line.trimmed().length() == 0)
|
if (line.trimmed().length() == 0)
|
||||||
continue;
|
continue;
|
||||||
if (line.startsWith("------"))
|
if (line.startsWith("------"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (line.contains("Acknowledgements")) {
|
QRegularExpressionMatch match = rx.match(line);
|
||||||
readAck = true;
|
if (match.hasMatch()) {
|
||||||
continue;
|
appendRow(QStringList() << match.captured(1).trimmed() << match.captured(2).trimmed());
|
||||||
}
|
}
|
||||||
else if (!readAck) {
|
|
||||||
QRegularExpressionMatch match = rx.match(line);
|
|
||||||
if (match.hasMatch())
|
|
||||||
appendRow(QStringList() << match.captured(1).trimmed() << match.captured(2).trimmed());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (readAck && (!line.isEmpty() || !acknowledgement_.isEmpty()))
|
|
||||||
acknowledgement_.append(QString("%1\n").arg(line));
|
|
||||||
}
|
}
|
||||||
f_authors.close();
|
f_authors.close();
|
||||||
|
|
||||||
|
@ -108,11 +99,6 @@ AStringListListModel(parent)
|
||||||
|
|
||||||
AuthorListModel::~AuthorListModel() { }
|
AuthorListModel::~AuthorListModel() { }
|
||||||
|
|
||||||
QString AuthorListModel::acknowledgment() const
|
|
||||||
{
|
|
||||||
return acknowledgement_;
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList AuthorListModel::headerColumns() const
|
QStringList AuthorListModel::headerColumns() const
|
||||||
{
|
{
|
||||||
return QStringList() << tr("Name") << tr("Email");
|
return QStringList() << tr("Name") << tr("Email");
|
||||||
|
@ -278,6 +264,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
QFile f_acknowledgements;
|
||||||
QFile f_license;
|
QFile f_license;
|
||||||
|
|
||||||
AuthorListModel * authorModel = new AuthorListModel(this);
|
AuthorListModel * authorModel = new AuthorListModel(this);
|
||||||
|
@ -288,10 +275,6 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||||
proxyAuthorModel->setColumnToFilter(1);
|
proxyAuthorModel->setColumnToFilter(1);
|
||||||
ui->tblAuthors->setModel(proxyAuthorModel);
|
ui->tblAuthors->setModel(proxyAuthorModel);
|
||||||
ui->tblAuthors->setRootIsDecorated(false);
|
ui->tblAuthors->setRootIsDecorated(false);
|
||||||
ui->pte_Authors->clear();
|
|
||||||
ui->pte_Authors->appendPlainText(authorModel->acknowledgment());
|
|
||||||
ui->pte_Authors->moveCursor(QTextCursor::Start);
|
|
||||||
|
|
||||||
ui->tblAuthors->setContextMenuPolicy(Qt::CustomContextMenu);
|
ui->tblAuthors->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(ui->tblAuthors, &QTreeView::customContextMenuRequested, this, &AboutDialog::handleCopyMenu);
|
connect(ui->tblAuthors, &QTreeView::customContextMenuRequested, this, &AboutDialog::handleCopyMenu);
|
||||||
connect(ui->searchAuthors, &QLineEdit::textChanged, proxyAuthorModel, &AStringListListSortFilterProxyModel::setFilter);
|
connect(ui->searchAuthors, &QLineEdit::textChanged, proxyAuthorModel, &AStringListListSortFilterProxyModel::setFilter);
|
||||||
|
@ -375,6 +358,28 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||||
connect(ui->tblShortcuts, &QTreeView::customContextMenuRequested, this, &AboutDialog::handleCopyMenu);
|
connect(ui->tblShortcuts, &QTreeView::customContextMenuRequested, this, &AboutDialog::handleCopyMenu);
|
||||||
connect(ui->searchShortcuts, &QLineEdit::textChanged, shortcutProxyModel, &AStringListListSortFilterProxyModel::setFilter);
|
connect(ui->searchShortcuts, &QLineEdit::textChanged, shortcutProxyModel, &AStringListListSortFilterProxyModel::setFilter);
|
||||||
|
|
||||||
|
/* Acknowledgements */
|
||||||
|
f_acknowledgements.setFileName(get_datafile_path("Acknowledgements.md"));
|
||||||
|
|
||||||
|
f_acknowledgements.open(QFile::ReadOnly | QFile::Text);
|
||||||
|
QTextStream ReadFile_acks(&f_acknowledgements);
|
||||||
|
|
||||||
|
/* QTextBrowser markdown support added in 5.14. */
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
QTextBrowser *textBrowserAcks = new QTextBrowser();
|
||||||
|
textBrowserAcks->setMarkdown(ReadFile_acks.readAll());
|
||||||
|
textBrowserAcks->setReadOnly(true);
|
||||||
|
textBrowserAcks->setOpenExternalLinks(true);
|
||||||
|
textBrowserAcks->moveCursor(QTextCursor::Start);
|
||||||
|
ui->ackVerticalLayout->addWidget(textBrowserAcks);
|
||||||
|
#else
|
||||||
|
QPlainTextEdit *pte = new QPlainTextEdit();
|
||||||
|
pte->setPlainText(ReadFile_acks.readAll());
|
||||||
|
pte->setReadOnly(true);
|
||||||
|
pte->moveCursor(QTextCursor::Start);
|
||||||
|
ui->ackVerticalLayout->addWidget(pte);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* License */
|
/* License */
|
||||||
f_license.setFileName(get_datafile_path("gpl-2.0-standalone.html"));
|
f_license.setFileName(get_datafile_path("gpl-2.0-standalone.html"));
|
||||||
|
|
||||||
|
|
|
@ -33,14 +33,9 @@ public:
|
||||||
explicit AuthorListModel(QObject * parent = Q_NULLPTR);
|
explicit AuthorListModel(QObject * parent = Q_NULLPTR);
|
||||||
virtual ~AuthorListModel();
|
virtual ~AuthorListModel();
|
||||||
|
|
||||||
QString acknowledgment() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QStringList headerColumns() const;
|
virtual QStringList headerColumns() const;
|
||||||
|
|
||||||
private:
|
|
||||||
QString acknowledgement_;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PluginListModel : public AStringListListModel
|
class PluginListModel : public AStringListListModel
|
||||||
|
|
|
@ -261,15 +261,7 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Acknowledgments</string>
|
<string>Acknowledgments</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="ackVerticalLayout"/>
|
||||||
<item>
|
|
||||||
<widget class="QPlainTextEdit" name="pte_Authors">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_license">
|
<widget class="QWidget" name="tab_license">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Loading…
Reference in New Issue