Merge pull request #137147 from leo60228/mmc-microsoft

This commit is contained in:
Artturi 2021-09-16 02:58:38 +03:00 committed by GitHub
commit 78230d1c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 15 deletions

View file

@ -4,14 +4,14 @@ Date: Tue, 22 Jun 2021 21:50:11 +0300
Subject: [PATCH] pick latest java first
---
api/logic/java/JavaInstallList.cpp | 4 ++--
api/logic/java/JavaUtils.cpp | 2 +-
launcher/java/JavaInstallList.cpp | 4 ++--
launcher/java/JavaUtils.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/api/logic/java/JavaInstallList.cpp b/api/logic/java/JavaInstallList.cpp
diff --git a/launcher/java/JavaInstallList.cpp b/launcher/java/JavaInstallList.cpp
index 0bded03c..40898e20 100644
--- a/api/logic/java/JavaInstallList.cpp
+++ b/api/logic/java/JavaInstallList.cpp
--- a/launcher/java/JavaInstallList.cpp
+++ b/launcher/java/JavaInstallList.cpp
@@ -120,8 +120,8 @@ void JavaInstallList::updateListData(QList<BaseVersionPtr> versions)
bool sortJavas(BaseVersionPtr left, BaseVersionPtr right)
@ -23,10 +23,10 @@ index 0bded03c..40898e20 100644
return (*rleft) > (*rright);
}
diff --git a/api/logic/java/JavaUtils.cpp b/api/logic/java/JavaUtils.cpp
diff --git a/launcher/java/JavaUtils.cpp b/launcher/java/JavaUtils.cpp
index 5f004a10..6d633631 100644
--- a/api/logic/java/JavaUtils.cpp
+++ b/api/logic/java/JavaUtils.cpp
--- a/launcher/java/JavaUtils.cpp
+++ b/launcher/java/JavaUtils.cpp
@@ -350,7 +350,6 @@ QList<QString> JavaUtils::FindJavaPaths()
qDebug() << "Linux Java detection incomplete - defaulting to \"java\"";

View file

@ -1,15 +1,15 @@
{ lib, mkDerivation, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL }:
{ lib, mkDerivation, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL, msaClientID ? "" }:
let
libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ];
in mkDerivation rec {
pname = "multimc";
version = "unstable-2021-06-21";
version = "unstable-2021-09-08";
src = fetchFromGitHub {
owner = "MultiMC";
repo = "MultiMC5";
rev = "8179a89103833805d5374399d80a4305be1b8355";
sha256 = "lPz6ZM7TjaixfwWMPaXijKZJQKFPrCegBhvbJ8Xg4P8=";
rev = "e2355eb276bf355ca4acf526a0f3cc390aa88f8b";
sha256 = "3G9QPoAbC+uVfUYR0Kq6hnxl9c2mvCzIEYGjwfarQJ8=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake file makeWrapper ];
@ -19,16 +19,20 @@ in mkDerivation rec {
postPatch = ''
# hardcode jdk paths
substituteInPlace api/logic/java/JavaUtils.cpp \
substituteInPlace launcher/java/JavaUtils.cpp \
--replace 'scanJavaDir("/usr/lib/jvm")' 'javas.append("${jdk}/lib/openjdk/bin/java")' \
--replace 'scanJavaDir("/usr/lib32/jvm")' 'javas.append("${jdk8}/lib/openjdk/bin/java")'
# add client ID
substituteInPlace notsecrets/Secrets.cpp \
--replace 'QString MSAClientID = "";' 'QString MSAClientID = "${msaClientID}";'
'';
cmakeFlags = [ "-DMultiMC_LAYOUT=lin-system" ];
postInstall = ''
install -Dm644 ../application/resources/multimc/scalable/multimc.svg $out/share/pixmaps/multimc.svg
install -Dm755 ../application/package/linux/multimc.desktop $out/share/applications/multimc.desktop
install -Dm644 ../launcher/resources/multimc/scalable/multimc.svg $out/share/pixmaps/multimc.svg
install -Dm755 ../launcher/package/linux/multimc.desktop $out/share/applications/multimc.desktop
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
wrapProgram $out/bin/multimc \