Merge remote-tracking branch 'upstream/develop' into shallow-lazy-otherlogs

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2025-04-28 10:31:48 +01:00
commit 1e3c197222
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
63 changed files with 651 additions and 633 deletions

View file

@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(LocalPeer)
if(QT_VERSION_MAJOR EQUAL 5)
find_package(Qt5 COMPONENTS Core Network REQUIRED)
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Network Core5Compat REQUIRED)
list(APPEND LocalPeer_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
endif()

View file

@ -75,7 +75,7 @@ ApplicationId ApplicationId::fromTraditionalApp()
prefix.remove(QRegularExpression("[^a-zA-Z]"));
prefix.truncate(6);
QByteArray idc = protoId.toUtf8();
quint16 idNum = qChecksum(idc.constData(), idc.size());
quint16 idNum = qChecksum(idc);
auto socketName = QLatin1String("pl") + prefix + QLatin1Char('-') + QString::number(idNum, 16).left(12);
#if defined(Q_OS_WIN)
if (!pProcessIdToSessionId) {

View file

@ -97,6 +97,19 @@ public final class StandardLauncher extends AbstractLauncher {
gameArgs.add(worldName);
}
StringBuilder joinedGameArgs = new StringBuilder();
for (String gameArg : gameArgs) {
if (joinedGameArgs.length() > 0) {
joinedGameArgs.append('\u001F'); // unit separator, designed for this purpose
}
joinedGameArgs.append(gameArg);
}
// pass the real main class and game arguments in so mods can access them
System.setProperty("org.prismlauncher.launch.mainclass", mainClassName);
// unit separator ('\u001F') delimited list of game args
System.setProperty("org.prismlauncher.launch.gameargs", joinedGameArgs.toString());
// find and invoke the main method
MethodHandle method = ReflectionUtils.findMainMethod(mainClassName);
method.invokeExact(gameArgs.toArray(new String[0]));

View file

@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(qdcss)
if(QT_VERSION_MAJOR EQUAL 5)
find_package(Qt5 COMPONENTS Core REQUIRED)
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
list(APPEND qdcss_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
endif()

View file

@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(rainbow)
if(QT_VERSION_MAJOR EQUAL 5)
find_package(Qt5 COMPONENTS Core Gui REQUIRED)
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Gui REQUIRED)
endif()

View file

@ -1,8 +1,6 @@
project(systeminfo)
if(QT_VERSION_MAJOR EQUAL 5)
find_package(Qt5 COMPONENTS Core REQUIRED)
elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
find_package(Qt6 COMPONENTS Core Core5Compat REQUIRED)
list(APPEND systeminfo_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
endif()

View file

@ -145,11 +145,7 @@ void Sys::lsb_postprocess(Sys::LsbInfo& lsb, Sys::DistributionInfo& out)
vers = lsb.codename;
} else {
// ubuntu, debian, gentoo, scientific, slackware, ... ?
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
auto parts = dist.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
#else
auto parts = dist.split(QRegularExpression("\\s+"), QString::SkipEmptyParts);
#endif
if (parts.size()) {
dist = parts[0];
}
@ -182,11 +178,7 @@ QString Sys::_extract_distribution(const QString& x)
if (release.startsWith("suse linux enterprise")) {
return "sles";
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QStringList list = release.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
#else
QStringList list = release.split(QRegularExpression("\\s+"), QString::SkipEmptyParts);
#endif
if (list.size()) {
return list[0];
}
@ -196,11 +188,7 @@ QString Sys::_extract_distribution(const QString& x)
QString Sys::_extract_version(const QString& x)
{
QRegularExpression versionish_string(QRegularExpression::anchoredPattern("\\d+(?:\\.\\d+)*$"));
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QStringList list = x.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts);
#else
QStringList list = x.split(QRegularExpression("\\s+"), QString::SkipEmptyParts);
#endif
for (int i = list.size() - 1; i >= 0; --i) {
QString chunk = list[i];
if (versionish_string.match(chunk).hasMatch()) {