1
0
forked from ports/contrib

multimc: 0.6.13 -> 0.6.16

This commit is contained in:
Danny Rawlins 2022-08-28 21:49:53 +10:00
parent dba6d798f2
commit 0a7ce3aa01
7 changed files with 199 additions and 37 deletions

View File

@ -1,11 +1,14 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/ld.so.conf.d/
-rw-r--r-- root/root etc/ld.so.conf.d/multimc5.conf
drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/ drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/multimc -rwxr-xr-x root/root usr/bin/multimc
drwxr-xr-x root/root usr/lib/ drwxr-xr-x root/root usr/lib/
-rwxr-xr-x root/root usr/lib/libMultiMC_iconfix.so -rwxr-xr-x root/root usr/lib/libLauncher_iconfix.so
-rwxr-xr-x root/root usr/lib/libMultiMC_nbt++.so -rwxr-xr-x root/root usr/lib/libLauncher_nbt++.so
-rwxr-xr-x root/root usr/lib/libMultiMC_quazip.so -rwxr-xr-x root/root usr/lib/libLauncher_quazip.so
-rwxr-xr-x root/root usr/lib/libMultiMC_rainbow.so -rwxr-xr-x root/root usr/lib/libLauncher_rainbow.so
drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/applications/ drwxr-xr-x root/root usr/share/applications/
-rwxr-xr-x root/root usr/share/applications/multimc.desktop -rwxr-xr-x root/root usr/share/applications/multimc.desktop

View File

@ -1,9 +1,12 @@
untrusted comment: verify with /etc/ports/contrib.pub untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF38S3RLmFugJ4Zdvtbb40TW8pg1JwITzS1SLqk8QnKKOERBbp8qIFBPGV+8G5oINdaxVowhyuY6Z32qsdiqDzhA0= RWSagIOpLGJF36pIuPcw6ERf7CGv2Gk2qXB5YFQxT3RS7h0KF7sJEeUG4xlrk833MMQ304YSl+AP4ANt/AmFB2vsUcxxnYR2uA4=
SHA256 (Pkgfile) = fdf8bbfeac4a5cf82233ee4d6737b12a83a02111ed273d45e84dcec30fc89d90 SHA256 (Pkgfile) = 1bc158ba34dc383e6b857b35c076f706a55fa65f4f44bd10b39395c0990f5b77
SHA256 (.footprint) = e9a4a28059c35431dcd80a096e8622462fdb3f7691b894c71689653e98fba78c SHA256 (.footprint) = 05132b93040aac25bc12b92e5ec5f7e6016511781a199a70243273ffce5bd50e
SHA256 (MultiMC5-0.6.13.tar.gz) = af083b41bda801c6d2b6639a2b7a8cfa3a472b1b5942a5af485900449343b967 SHA256 (Launcher-0.6.16.tar.gz) = 2ff5a4368a01bf467790667a7a1e7728b4a2639bea2a15b285aa309ff1d8a557
SHA256 (multimc-3.tar.gz) = ffa60368b1c196859691b637c740f4c60597b2ac47217995082ae8b2a3a9ac18 SHA256 (b1a72ac0bb5a732bf887a535ab75c6f9bedb6b6b.tar.gz) = 4eb37f558f20f728357c955f14788608679745a0711522d0eeca2578fd4c9c13
SHA256 (multimc-0.6.1.tar.gz) = 36c816e6b1ef8ece52c57dfa9bfda3a23808d0c6c3288b25d8bcf49c7cdb5b07 SHA256 (dc72a20b7efd304d12af2025223fad07b4b78464.tar.gz) = 2ed9dc824007b4f7b12f807f56c98e1248b8a7aba7eca4838085092958dc1595
SHA256 (quazip-fix-build-with-qt-511.patch) = 83906ae48e7861d149a93cd6ce7c083f52c67dd36589e84668881c8e8de1f868 SHA256 (mmc-stable-lin64.tar.gz) = 63a43c5095b099ca780506365b0190fe795d20638e9e74f0363401bbef45ff11
SHA256 (modern-java.patch) = 72dd9554a73d78c27ed26004d740be6955fd82e025580890438eac247049e9ae SHA256 (0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch) = 8d882296b58dece4f09f629ba88a1a54c23911abb26055f4a1fdadd1d0cb61b3
SHA256 (fix-jars.patch) = 981cffbafc1827e427b3b86f7dcbbb836d179ef7cd0c6d4a4da92fef562d2c01
SHA256 (mmc-brand.patch) = eb5a56bf2b9f7e9e1892bc30cb7d7820137cba4296a177a6cfe74fb6eae8e854
SHA256 (multimc.desktop) = 6d12903a5630c9ff7aa35769566f29a8b4b591024cc61be826f4a3b1e8bea3bc

View File

@ -0,0 +1,75 @@
From 27e3d0174139b99da9e6afad1ba6fffff95ff3a9 Mon Sep 17 00:00:00 2001
From: Miko <mikoxyzzz@gmail.com>
Date: Sat, 20 Nov 2021 20:10:36 +0100
Subject: [PATCH] Readd "lin-system" and LAUNCHER_LINUX_DATADIR
During the debranding of MultiMC, peterix removed the "lin-system"
layout and LAUNCHER_LINUX_DATADIR (previously known as
MULTIMC_LINUX_DATADIR.) This patch reverts those two changes.
Signed-off-by: Miko <mikoxyzzz@gmail.com>
---
CMakeLists.txt | 20 ++++++++++++++++++--
launcher/Application.cpp | 8 +++++++-
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cf93758..2fc38b59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,8 +140,8 @@ endif()
####################################### Install layout #######################################
# How to install the build results
-set(Launcher_LAYOUT "auto" CACHE STRING "The layout for the launcher installation (auto, win-bundle, lin-nodeps, mac-bundle)")
-set_property(CACHE Launcher_LAYOUT PROPERTY STRINGS auto win-bundle lin-nodeps mac-bundle)
+set(Launcher_LAYOUT "auto" CACHE STRING "The layout for the launcher installation (auto, win-bundle, lin-nodeps, lin-system, mac-bundle)")
+set_property(CACHE Launcher_LAYOUT PROPERTY STRINGS auto win-bundle lin-nodeps lin-system mac-bundle)
if(Launcher_LAYOUT STREQUAL "auto")
if(UNIX AND APPLE)
@@ -206,6 +206,22 @@ elseif(Launcher_LAYOUT_REAL STREQUAL "lin-nodeps")
configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" DESTINATION ${BUNDLE_DEST_DIR} RENAME ${Launcher_Name})
+elseif(Launcher_LAYOUT_REAL STREQUAL "lin-system")
+ set(Launcher_APP_BINARY_NAME "devlauncher" CACHE STRING "Name of the Launcher binary")
+ set(Launcher_BINARY_DEST_DIR "bin" CACHE STRING "Path to the binary directory")
+ set(Launcher_LIBRARY_DEST_DIR "lib${LIB_SUFFIX}" CACHE STRING "Path to the library directory")
+ set(Launcher_SHARE_DEST_DIR "share/devlauncher" CACHE STRING "Path to the shard data directory")
+ set(JARS_DEST_DIR "${Launcher_SHARE_DEST_DIR}/jars")
+
+ set(BINARY_DEST_DIR ${Launcher_BINARY_DEST_DIR})
+ set(LIBRARY_DEST_DIR ${Launcher_LIBRARY_DEST_DIR})
+
+ MESSAGE(STATUS "Compiling for linux system with ${Launcher_SHARE_DEST_DIR} and LAUNCHER_LINUX_DATADIR")
+ SET(Launcher_APP_BINARY_DEFS "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}" "-DLAUNCHER_LINUX_DATADIR")
+
+ # install as bundle with no dependencies included
+ set(INSTALL_BUNDLE "nodeps")
+
elseif(Launcher_LAYOUT_REAL STREQUAL "win-bundle")
set(BINARY_DEST_DIR ".")
set(LIBRARY_DEST_DIR ".")
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 8789d096..6ef64762 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -304,7 +304,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
}
else
{
-#if defined(Q_OS_MAC)
+#ifdef LAUNCHER_LINUX_DATADIR
+ QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME"));
+ if (xdgDataHome.isEmpty())
+ xdgDataHome = QDir::homePath() + QLatin1String("/.local/share");
+ dataPath = xdgDataHome + "/multimc";
+ adjustedBy += "XDG standard " + dataPath;
+#elif defined(Q_OS_MAC)
QDir foo(FS::PathCombine(applicationDirPath(), "../../Data"));
dataPath = foo.absolutePath();
adjustedBy += "Fallback to special Mac location " + dataPath;
--
2.34.0

View File

@ -1,54 +1,74 @@
# Description: Minecraft launcher with ability to manage multiple instances. # Description: Minecraft launcher with ability to manage multiple instances.
# URL: https://multimc.org/ # URL: https://multimc.org/
# Maintainer: Danny Rawlins, crux at romster dot me # Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: openjdk11-jdk qt5 # Depends on: openjdk17-jdk qt5
name=multimc name=multimc
version=0.6.13 _pkgname=multimc
version=0.6.16
release=1 release=1
source=(https://github.com/MultiMC/MultiMC5/archive/$version/MultiMC5-$version.tar.gz source=(#https://github.com/MultiMC/Launcher/archive/refs/tags/0.6.16.tar.gz
https://github.com/MultiMC/quazip/archive/multimc-3.tar.gz https://github.com/MultiMC/Launcher/archive/$version/Launcher-$version.tar.gz
https://github.com/MultiMC/libnbtplusplus/archive/multimc-0.6.1.tar.gz https://github.com/MultiMC/quazip/archive/b1a72ac0bb5a732bf887a535ab75c6f9bedb6b6b.tar.gz
quazip-fix-build-with-qt-511.patch #https://github.com/MultiMC/quazip/archive/multimc-3.tar.gz
modern-java.patch) #https://github.com/MultiMC/libnbtplusplus/archive/multimc-0.6.1.tar.gz
https://github.com/MultiMC/libnbtplusplus/archive/dc72a20b7efd304d12af2025223fad07b4b78464.tar.gz
"https://files.multimc.org/downloads/mmc-stable-lin64.tar.gz"
"0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch"
"fix-jars.patch"
"mmc-brand.patch"
"multimc.desktop"
)
build() { build() {
cd MultiMC5-$version cd Launcher-$version
patch -p1 < "${SRC}/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch"
patch -p1 < "${SRC}/fix-jars.patch"
patch -p1 < "${SRC}/mmc-brand.patch"
# generate microsoft client id (https://aur.archlinux.org/packages/multimc-git)
pushd ${SRC}/MultiMC/bin
local client_id_asm=$(objdump -j '.text' --no-show-raw-insn -C --disassemble='Secrets::getMSAClientID(unsigned char)' MultiMC)
local client_id="$(grep -oP '[a-z0-9]{2}(?=,%r[89]d)' <<< ${client_id_asm} | tac | tr -d '\n')$(grep -oP '(push.+0x)\K[a-z0-9]{2}' <<< ${client_id_asm} | tac | tr -d '\n')"
client_id="${client_id:0:8}-${client_id:8:4}-${client_id:12:4}-${client_id:16:4}-${client_id:20}"
popd
sed -i 's/""/"'"${client_id}"'"/g' notsecrets/Secrets.cpp
rmdir libraries/libnbtplusplus rmdir libraries/libnbtplusplus
rmdir libraries/quazip rmdir libraries/quazip
ln -sfT $SRC/libnbtplusplus-multimc-0.6.1/ libraries/libnbtplusplus ln -sfT $SRC/libnbtplusplus-dc72a20b7efd304d12af2025223fad07b4b78464/ libraries/libnbtplusplus
ln -sfT $SRC/quazip-multimc-3/ libraries/quazip ln -sfT $SRC/quazip-b1a72ac0bb5a732bf887a535ab75c6f9bedb6b6b/ libraries/quazip
# https://github.com/MultiMC/quazip/pull/1 export JAVA_HOME="/usr/lib/java/openjdk17-jdk/"
patch -d libraries/quazip -p1 -i $SRC/quazip-fix-build-with-qt-511.patch
patch -p1 -i $SRC/modern-java.patch
export JAVA_HOME="/usr/lib/java/openjdk11-jdk/"
mkdir -p build mkdir -p build
cd build cd build
cmake .. \ cmake .. \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DMultiMC_UPDATER=OFF \
-DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_PREFIX="/usr" \
-DMultiMC_LAYOUT=lin-system \ -DLauncher_LAYOUT=lin-system \
-DMultiMC_NOTIFICATION_URL:STRING=http://files.multimc.org/notifications.json -DLauncher_APP_BINARY_NAME="${_pkgname}" \
-DLauncher_SHARE_DEST_DIR="share/${_pkgname}" \
-DLauncher_LIBRARAY_DEST_DIR="lib/${_pkgname}"
make make
make DESTDIR=$PKG install make DESTDIR=$PKG install
install -D $SRC/MultiMC5-$version/launcher/resources/multimc/scalable/multimc.svg \ mkdir -p "${PKG}/etc/ld.so.conf.d"
echo -e "/usr/lib/${_pkgname}" > "${PKG}/etc/ld.so.conf.d/multimc5.conf"
install -D $SRC/Launcher-$version/launcher/package/ubuntu/multimc/opt/multimc/icon.svg \
$PKG/usr/share/pixmaps/multimc.svg $PKG/usr/share/pixmaps/multimc.svg
install -D $SRC/MultiMC5-$version/launcher/package/linux/multimc.desktop \ install -D $SRC/multimc.desktop \
$PKG/usr/share/applications/multimc.desktop $PKG/usr/share/applications/multimc.desktop
install -D $SRC/MultiMC5-$version/build/libMultiMC_quazip.so \ # install -D $SRC/Launcher-$version/build/libMultiMC_quazip.so \
$PKG/usr/lib/libMultiMC_quazip.so # $PKG/usr/lib/libMultiMC_quazip.so
install -D $SRC/MultiMC5-$version/build/libMultiMC_nbt++.so \ # install -D $SRC/Launcher-$version/build/libMultiMC_nbt++.so \
$PKG/usr/lib/libMultiMC_nbt++.so # $PKG/usr/lib/libMultiMC_nbt++.so
} }

15
multimc/fix-jars.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 2d0c81bb..74f250fb 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -524,6 +524,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
FS::updateTimestamp(m_rootPath);
#endif
+#ifdef MULTIMC_JARS_LOCATION
+ m_jarsPath = TOSTRING(MULTIMC_JARS_LOCATION);
+#endif
+
qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT;
qDebug() << "Version : " << BuildConfig.printableVersionString();
qDebug() << "Git commit : " << BuildConfig.GIT_COMMIT;

35
multimc/mmc-brand.patch Normal file
View File

@ -0,0 +1,35 @@
diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc
index 5b36cb3d..f2322279 100644
--- a/launcher/resources/multimc/multimc.qrc
+++ b/launcher/resources/multimc/multimc.qrc
@@ -282,6 +282,9 @@
<file>32x32/instances/herobrine.png</file>
<file>128x128/instances/herobrine.png</file>
+ <file>32x32/instances/infinity.png</file>
+ <file>128x128/instances/infinity.png</file>
+
<file>32x32/instances/magitech.png</file>
<file>128x128/instances/magitech.png</file>
diff --git a/notsecrets/CMakeLists.txt b/notsecrets/CMakeLists.txt
index b5dd3cf8..3abd8002 100644
--- a/notsecrets/CMakeLists.txt
+++ b/notsecrets/CMakeLists.txt
@@ -3,14 +3,14 @@ target_link_libraries(secrets Qt5::Core)
target_compile_definitions(secrets PUBLIC -DEMBED_SECRETS)
target_include_directories(secrets PUBLIC .)
-set(Launcher_CommonName "DevLauncher")
+set(Launcher_CommonName "MultiMC")
set(Launcher_Copyright "MultiMC Contributors" PARENT_SCOPE)
set(Launcher_Domain "multimc.org" PARENT_SCOPE)
set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
set(Launcher_DisplayName "${Launcher_CommonName} 5" PARENT_SCOPE)
set(Launcher_UserAgent "${Launcher_CommonName}/5.0" PARENT_SCOPE)
-set(Launcher_ConfigFile "devlauncher.cfg" PARENT_SCOPE)
+set(Launcher_ConfigFile "multimc.cfg" PARENT_SCOPE)
set(Launcher_Git "https://github.com/MultiMC/Launcher" PARENT_SCOPE)
set(Launcher_Branding_ICNS "notsecrets/Launcher.icns" PARENT_SCOPE)

11
multimc/multimc.desktop Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Version=1.0
Name=MultiMC
GenericName=Minecraft Launcher
Comment=Free, open source launcher and instance manager for Minecraft.
Type=Application
Terminal=false
Exec=multimc
Icon=multimc
Categories=Game
Keywords=game;minecraft;