From 6a8366b99a0ad14bdefd4509ce33a2510cb0082c Mon Sep 17 00:00:00 2001 From: Stan Date: Wed, 6 Aug 2025 23:20:49 +0200 Subject: [PATCH] Add more libraries to the report --- build/premake/extern_libs5.lua | 4 +++- build/premake/premake5.lua | 7 +++++++ source/ps/GameSetup/HWDetect.cpp | 31 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/build/premake/extern_libs5.lua b/build/premake/extern_libs5.lua index 8e3c0bb238..cba9d79f9a 100644 --- a/build/premake/extern_libs5.lua +++ b/build/premake/extern_libs5.lua @@ -698,16 +698,18 @@ extern_lib_defs = { else pkgconfig.add_includes("ogg") pkgconfig.add_includes("vorbisfile") + pkgconfig.add_includes("vorbis") end end, link_settings = function() if os.istarget("windows") then add_default_lib_paths("vorbis") add_default_links({ - win_names = { "vorbisfile" }, + win_names = { "vorbisfile", "vorbis" }, }) else pkgconfig.add_links("vorbisfile") + pkgconfig.add_links("vorbis") end end, }, diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index b1750eaa62..bb2ce0e596 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -852,15 +852,22 @@ function setup_all_libs () "zlib", "boost", "enet", + "gloox", "libcurl", "tinygettext", "icu", "iconv", "libsodium", + "libpng", "fmt", "freetype", } + + if not _OPTIONS["without-miniupnpc"] then + table.insert(extern_libs, "miniupnpc") + end + if not _OPTIONS["without-nvtt"] then table.insert(extern_libs, "nvtt") end diff --git a/source/ps/GameSetup/HWDetect.cpp b/source/ps/GameSetup/HWDetect.cpp index 7fae8a0d48..99c1d4bf44 100644 --- a/source/ps/GameSetup/HWDetect.cpp +++ b/source/ps/GameSetup/HWDetect.cpp @@ -21,6 +21,10 @@ #include "lib/code_annotation.h" #include "lib/config2.h" #include "lib/debug.h" +#include "lib/external_libraries/curl.h" +#include "lib/external_libraries/enet.h" +#include "lib/external_libraries/gloox.h" +#include "lib/external_libraries/png.h" #include "lib/external_libraries/libsdl.h" #include "lib/path.h" #include "lib/posix/posix_utsname.h" @@ -68,11 +72,15 @@ #include #include #include +#include #include +#include #include #include #include +#include #include +#include // FreeType headers might have an include order. #include @@ -90,6 +98,14 @@ #include "nvtt/nvtt.h" #endif +#if CONFIG2_MINIUPNPC +#include +#endif + +#if CONFIG2_AUDIO +#include +#endif + namespace { @@ -191,7 +207,22 @@ void ReportLibraries(const ScriptRequest& rq, JS::HandleValue settings) appendLibrary(MakeFreeTypeReport(rq)); appendLibrary(LibraryReporter{rq, "boost"}.Add("version", BOOST_VERSION).MakeReport()); + appendLibrary(LibraryReporter{rq, "enet"}.Add("version", std::to_string(ENET_VERSION)).MakeReport()); appendLibrary(LibraryReporter{rq, "fmt"}.Add("version", FMT_VERSION).MakeReport()); + appendLibrary(LibraryReporter{rq, "gloox"}.Add("version", gloox_version()).MakeReport()); + appendLibrary(LibraryReporter{rq, "libicu"}.Add("version", U_ICU_VERSION).MakeReport()); + appendLibrary(LibraryReporter{rq, "libcurl"}.Add("version", std::string(curl_version())).MakeReport()); +#if CONFIG2_AUDIO + appendLibrary(LibraryReporter{rq, "libvorbis"}.Add("version", std::string(vorbis_version_string())).MakeReport()); +#endif + appendLibrary(LibraryReporter{rq, "libpng"}.Add("version", std::string(png_get_libpng_ver(nullptr))).MakeReport()); + appendLibrary(LibraryReporter{rq, "libsodium"}.Add("version", std::string(sodium_version_string())).MakeReport()); + appendLibrary(LibraryReporter{rq, "libxml2"}.Add("version", LIBXML_DOTTED_VERSION).MakeReport()); +#if CONFIG2_MINIUPNPC + appendLibrary(LibraryReporter{rq, "miniunpnpc"}.Add("version", MINIUPNPC_VERSION).MakeReport()); +#endif + appendLibrary(LibraryReporter{rq, "zlib"}.Add("version", ZLIB_VERSION).MakeReport()); + #if CONFIG2_NVTT appendLibrary(LibraryReporter{rq, "nvtt"} .Add("build_version", NVTT_VERSION)