diff --git a/.gitignore b/.gitignore index 7eaaa35914..5729d5e4ec 100644 --- a/.gitignore +++ b/.gitignore @@ -81,7 +81,6 @@ epan/dissectors/dcerpc/*-stamp ######## doc/*.html doc/*.[14] -doc/AUTHORS-SHORT doc/ws.css docbook/developer-guide*.xml docbook/user-guide*.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 53e73670a8..0fc9129857 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1952,9 +1952,6 @@ if (BUILD_logray) endif() if (ASCIIDOCTOR_FOUND) - list(APPEND INSTALL_FILES - ${CMAKE_BINARY_DIR}/doc/AUTHORS-SHORT - ) list(APPEND DOC_FILES ${CMAKE_BINARY_DIR}/doc/androiddump.html ${CMAKE_BINARY_DIR}/doc/udpdump.html diff --git a/doc/.gitignore b/doc/.gitignore index 768867f6a0..e9da6f07c8 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -4,7 +4,3 @@ *.html *.tmp wireshark.pod - -# Misc # -######## -AUTHORS-SHORT-FORMAT diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f18bc727c7..04671f84e5 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -9,17 +9,6 @@ find_package( Asciidoctor 1.5 ) -add_custom_command( - OUTPUT AUTHORS-SHORT - COMMAND ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/make-authors-short.py - < ${CMAKE_SOURCE_DIR}/AUTHORS - > ${CMAKE_CURRENT_BINARY_DIR}/AUTHORS-SHORT - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/make-authors-short.py - ${CMAKE_SOURCE_DIR}/AUTHORS -) - set(MAN1_SOURCE_FILES) set(MAN4_SOURCE_FILES) set(MAN1_INSTALL_FILES) @@ -110,7 +99,6 @@ endif() add_custom_target( docs ALL DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/AUTHORS-SHORT ${MAN1_INSTALL_FILES} ${MAN4_INSTALL_FILES} ${HTML_INSTALL_FILES} diff --git a/packaging/nsis/logray.nsi b/packaging/nsis/logray.nsi index e923fa0269..85d6d953ab 100644 --- a/packaging/nsis/logray.nsi +++ b/packaging/nsis/logray.nsi @@ -455,7 +455,6 @@ File "${STAGING_DIR}\COPYING.txt" File "${STAGING_DIR}\NEWS.txt" File "${STAGING_DIR}\README.txt" File "${STAGING_DIR}\README.windows.txt" -File "${STAGING_DIR}\AUTHORS-SHORT" File "${STAGING_DIR}\manuf" File "${STAGING_DIR}\wka" File "${STAGING_DIR}\services" diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi index 7c06c51168..872e4c9aad 100644 --- a/packaging/nsis/wireshark.nsi +++ b/packaging/nsis/wireshark.nsi @@ -509,7 +509,6 @@ File "${STAGING_DIR}\COPYING.txt" File "${STAGING_DIR}\NEWS.txt" File "${STAGING_DIR}\README.txt" File "${STAGING_DIR}\README.windows.txt" -File "${STAGING_DIR}\AUTHORS-SHORT" File "${STAGING_DIR}\manuf" File "${STAGING_DIR}\wka" File "${STAGING_DIR}\services" diff --git a/packaging/wix/ComponentGroups.wxi b/packaging/wix/ComponentGroups.wxi index bca026e8f3..f52a9756c1 100644 --- a/packaging/wix/ComponentGroups.wxi +++ b/packaging/wix/ComponentGroups.wxi @@ -39,9 +39,6 @@ - - - @@ -86,7 +83,6 @@ - diff --git a/doc/make-authors-short.py b/tools/make-authors-csv.py similarity index 57% rename from doc/make-authors-short.py rename to tools/make-authors-csv.py index 08b56e98d3..b3c82b5e4a 100755 --- a/doc/make-authors-short.py +++ b/tools/make-authors-csv.py @@ -1,9 +1,6 @@ #!/usr/bin/env python3 # -# Generate the AUTHORS-SHORT file. -# Ported from make-authors-short.pl, copyright 2004 Ulf Lamping -# -# By Gerald Combs )]") + + for line in lines: + match = patt.match(line) + if match: + name = match.group(1).strip() + mail = match.group(2).strip().replace("[AT]", "@") + stdoutu8.write("{},{}\n".format(name, mail)) + if __name__ == '__main__': main() diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index 0915cea22c..2326f56d9f 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -655,6 +655,24 @@ foreach(_file ${WIRESHARK_QT_TS}) endforeach() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/i18n.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/authors.qrc" +"\n" +" \n" +" authors.csv\n" +" \n" +"\n" +) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/authors.csv + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-authors-csv.py + < ${CMAKE_SOURCE_DIR}/AUTHORS + > ${CMAKE_CURRENT_BINARY_DIR}/authors.csv + DEPENDS + ${CMAKE_SOURCE_DIR}/tools/make-authors-csv.py + ${CMAKE_SOURCE_DIR}/AUTHORS +) + set(WIRESHARK_QT_QRC ../../resources/about.qrc ../../resources/languages/languages.qrc @@ -662,6 +680,8 @@ set(WIRESHARK_QT_QRC ../../resources/stock_icons.qrc ../../resources/wsicon.qrc ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc + ${CMAKE_CURRENT_BINARY_DIR}/authors.qrc + ${CMAKE_CURRENT_BINARY_DIR}/authors.csv ) if(NOT Qt${qtver}Widgets_VERSION VERSION_LESS "5.9") diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp index 6d2b2b7ef9..e1b32f9cfb 100644 --- a/ui/qt/about_dialog.cpp +++ b/ui/qt/about_dialog.cpp @@ -69,7 +69,7 @@ AStringListListModel(parent) { QFile f_authors; - f_authors.setFileName(get_datafile_path("AUTHORS-SHORT")); + f_authors.setFileName(":/about/authors.csv"); f_authors.open(QFile::ReadOnly | QFile::Text); QTextStream ReadFile_authors(&f_authors); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) @@ -78,18 +78,11 @@ AStringListListModel(parent) ReadFile_authors.setCodec("UTF-8"); #endif - QRegularExpression rx("(.*)[<(]([\\s'a-zA-Z0-9._%+-]+(\\[[Aa][Tt]\\])?[a-zA-Z0-9._%+-]+)[>)]"); while (!ReadFile_authors.atEnd()) { - QString line = ReadFile_authors.readLine(); + QStringList entry = ReadFile_authors.readLine().split(",", Qt::SkipEmptyParts); - if (line.trimmed().length() == 0) - continue; - if (line.startsWith("------")) - continue; - - QRegularExpressionMatch match = rx.match(line); - if (match.hasMatch()) { - appendRow(QStringList() << match.captured(1).trimmed() << match.captured(2).trimmed()); + if (entry.size() == 2) { + appendRow(entry); } } f_authors.close(); diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c index f1fb58805f..2785ca6baf 100644 --- a/wsutil/filesystem.c +++ b/wsutil/filesystem.c @@ -2115,9 +2115,7 @@ get_persconffile_path(const char *filename, gboolean from_profile) char * get_datafile_path(const char *filename) { - if (running_in_build_directory_flag && - (!strcmp(filename, "AUTHORS-SHORT") || - !strcmp(filename, "hosts"))) { + if (running_in_build_directory_flag && !strcmp(filename, "hosts")) { /* We're running in the build directory and the requested file is a * generated (or a test) file. Return the file name in the build * directory (not in the source/data directory).