summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLenny McLennington2021-12-13 17:08:14 +0000
committerLenny McLennington2021-12-13 17:19:19 +0000
commit366a0fd6363aeb6ccf24c99f56b18749e7195789 (patch)
treedd393e8489d53801e0b6cebb012485c0af823c27
parente082e61039c28710c8e9047979c27f6ab0adec60 (diff)
downloadaur-366a0fd6363aeb6ccf24c99f56b18749e7195789.tar.gz
make it compile and run properly
-rw-r--r--.SRCINFO21
-rw-r--r--0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch75
-rw-r--r--PKGBUILD68
-rw-r--r--application.desktop11
-rw-r--r--fix-jars.patch14
-rw-r--r--mmc-brand.patch45
6 files changed, 211 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3ea6dd2630de..18519bf3d278 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = multimc-git
pkgdesc = Minecraft launcher with ability to manage multiple instances.
- pkgver = 0.6.13.r0.ge2355eb2
- pkgrel = 2
- url = https://multimc.org/
+ pkgver = 0.6.14.r4.g7d047f92
+ pkgrel = 1
+ url = https://github.com/MultiMC/Launcher
arch = i686
arch = x86_64
license = Apache
@@ -20,14 +20,25 @@ pkgbase = multimc-git
provides = multimc
conflicts = multimc
conflicts = multimc5
- conflicts = multimc5-bin
- source = git+https://github.com/MultiMC/MultiMC5
+ conflicts = multimc-bin
+ conflicts = multimc-native
+ source = git+https://github.com/MultiMC/Launcher
source = git+https://github.com/MultiMC/libnbtplusplus
source = git+https://github.com/MultiMC/quazip
+ source = https://files.multimc.org/downloads/mmc-stable-lin64.tar.gz
+ source = 0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch
+ source = application.desktop
source = modern-java.patch
+ source = fix-jars.patch
+ source = mmc-brand.patch
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = cb003424404d83e3ee6e8c0c4d6be1562325185efac3f249f63542c05eda71144fd865e065c5bd00b981288df0ced12bb4ac6311ddd0cf9cc6dd7d611f94b107
+ sha512sums = a7c4654dd5ee260c25e0eab2dba0d929f09bc38b9af1505408a55058e73eaf35986b4a0e6de7e1893ebf860c472df984011340b3989f996a9d170cbc37dfd691
sha512sums = 0005a23628afbecb40591e9ef0fd2fc63367ca1be71a874de6791fb19ae112b5907e19975b40b770122e9e34cc3297b14d2a9d72c42f3fbfac221e41cbc67890
+ sha512sums = 1dc559a4b463bb9b0648d221df48a8ab562db186ea44fe0a3dba1af9c51306983faa27839abe7aea0478fb4d165fcf4af0db411fe063a18dcb9ca03c06196397
+ sha512sums = 82f66f6aac1f7c09d2e242768b77af692216cfa99925585a7871fa71bec8197a246b66a3af7d9eab8856655ce80e4ced26a0fc331579a18badd8f86005b5bf53
pkgname = multimc-git
diff --git a/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch b/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch
new file mode 100644
index 000000000000..cfbb8acffb11
--- /dev/null
+++ b/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch
@@ -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 + "/devlauncher";
++ 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
+
diff --git a/PKGBUILD b/PKGBUILD
index a73b5e28cebd..4dd37167567c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,71 @@
-# Maintainer: Miko <mikoxyzzz@gmail.com>
+# Maintainer: Lenny McLennington <lennymclennington@protonmail.com>
+# Contributor: Miko <mikoxyzzz@gmail.com>
# Contributor: Cheru Berhanu <aur attt cheru doot dev>
-pkgname=multimc-git
-pkgver=0.6.13.r0.ge2355eb2
-pkgrel=2
+_pkgname=multimc
+pkgname=${_pkgname}-git
+pkgver=0.6.14.r4.g7d047f92
+pkgrel=1
pkgdesc="Minecraft launcher with ability to manage multiple instances."
arch=('i686' 'x86_64')
-url="https://multimc.org/"
+url="https://github.com/MultiMC/Launcher"
license=('Apache')
depends=('java-runtime' 'libgl' 'qt5-base' 'zlib')
provides=('multimc')
-conflicts=('multimc' 'multimc5' 'multimc5-bin')
+conflicts=('multimc' 'multimc5' 'multimc-bin' 'multimc-native')
makedepends=('cmake' 'git' 'java-environment')
optdepends=('glfw: to use system GLFW libraries'
'openal: to use system OpenAL libraries'
'visualvm: Profiling support'
'xorg-xrandr: for older minecraft versions'
)
-source=("git+https://github.com/MultiMC/MultiMC5"
+source=("git+https://github.com/MultiMC/Launcher"
"git+https://github.com/MultiMC/libnbtplusplus"
"git+https://github.com/MultiMC/quazip"
+ "https://files.multimc.org/downloads/mmc-stable-lin64.tar.gz"
+ 0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch
+ application.desktop
modern-java.patch
+ fix-jars.patch
+ mmc-brand.patch
)
sha512sums=('SKIP'
'SKIP'
'SKIP'
- '0005a23628afbecb40591e9ef0fd2fc63367ca1be71a874de6791fb19ae112b5907e19975b40b770122e9e34cc3297b14d2a9d72c42f3fbfac221e41cbc67890')
+ 'SKIP'
+ 'cb003424404d83e3ee6e8c0c4d6be1562325185efac3f249f63542c05eda71144fd865e065c5bd00b981288df0ced12bb4ac6311ddd0cf9cc6dd7d611f94b107'
+ 'a7c4654dd5ee260c25e0eab2dba0d929f09bc38b9af1505408a55058e73eaf35986b4a0e6de7e1893ebf860c472df984011340b3989f996a9d170cbc37dfd691'
+ '0005a23628afbecb40591e9ef0fd2fc63367ca1be71a874de6791fb19ae112b5907e19975b40b770122e9e34cc3297b14d2a9d72c42f3fbfac221e41cbc67890'
+ '1dc559a4b463bb9b0648d221df48a8ab562db186ea44fe0a3dba1af9c51306983faa27839abe7aea0478fb4d165fcf4af0db411fe063a18dcb9ca03c06196397'
+ '82f66f6aac1f7c09d2e242768b77af692216cfa99925585a7871fa71bec8197a246b66a3af7d9eab8856655ce80e4ced26a0fc331579a18badd8f86005b5bf53')
pkgver() {
- cd MultiMC5
+ cd Launcher
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- cd "${srcdir}/MultiMC5"
+ cd "${srcdir}/Launcher"
+ patch -p1 < "${srcdir}/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch"
patch -p1 < "${srcdir}/modern-java.patch"
+ patch -p1 < "${srcdir}/fix-jars.patch"
+ patch -p1 < "${srcdir}/mmc-brand.patch"
+
+ pushd ${srcdir}/MultiMC/bin
+ local token_asm=$(objdump -j '.text' --no-show-raw-insn -C --disassemble='Secrets::getMSAClientID(unsigned char)' MultiMC)
+ local token="$(grep -oP '[a-z0-9]{2}(?=,%r[89]d)' <<< ${token_asm} | tac | tr -d '\n')$(grep -oP '(push.+0x)\K[a-z0-9]{2}' <<< ${token_asm} | tac | tr -d '\n')"
+ token="${token:0:8}-${token:8:4}-${token:12:4}-${token:16:4}-${token:20}"
+ popd
+
+ sed -i 's/""/"'"${token}"'"/g' notsecrets/Secrets.cpp
+
+ git checkout 6a4130c9149deb029b496c81e3b874ad834c54b7 -- launcher/resources/{{OSX,flat,iOS,multimc,pe_{blue,colored,dark,light}}/scalable/multimc.svg,multimc/{32x32,128x128}/instances/infinity.png}
+
+ for f in launcher/resources/{OSX,flat,iOS,multimc,pe_{blue,colored,dark,light}}/scalable
+ do
+ mv "$f/multimc.svg" "$f/launcher.svg"
+ done
git submodule init
git config submodule.libnbtplusplus.url "${srcdir}/libnbtplusplus"
@@ -44,28 +74,30 @@ prepare() {
}
build() {
- cd "${srcdir}/MultiMC5"
+ cd "${srcdir}/Launcher"
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX="/usr" \
- -DMultiMC_LAYOUT=lin-system \
+ -DLauncher_LAYOUT=lin-system \
+ -DLauncher_APP_BINARY_NAME="${_pkgname}" \
+ -DLauncher_SHARE_DEST_DIR="share/${_pkgname}" \
..
make
}
check() {
- cd "${srcdir}/MultiMC5/build"
+ cd "${srcdir}/Launcher/build"
make test
}
package() {
- cd "${srcdir}/MultiMC5/build"
+ cd "${srcdir}/Launcher/build"
make install DESTDIR="${pkgdir}"
- install -D "${srcdir}/MultiMC5/launcher/resources/multimc/scalable/multimc.svg" "${pkgdir}/usr/share/pixmaps/multimc.svg"
- install -D "${srcdir}/MultiMC5/launcher/package/linux/multimc.desktop" "${pkgdir}/usr/share/applications/multimc.desktop"
- install -D "${srcdir}/MultiMC5/build/libMultiMC_quazip.so" "${pkgdir}/usr/lib/libMultiMC_quazip.so"
- install -D "${srcdir}/MultiMC5/build/libMultiMC_nbt++.so" "${pkgdir}/usr/lib/libMultiMC_nbt++.so"
+ install -D "${srcdir}/Launcher/launcher/package/ubuntu/multimc/opt/multimc/icon.svg" "${pkgdir}/usr/share/pixmaps/${_pkgname}.svg"
+ install -D "${srcdir}/application.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+ install -D "${srcdir}/Launcher/build/libLauncher_quazip.so" "${pkgdir}/usr/lib/libLauncher_quazip.so"
+ install -D "${srcdir}/Launcher/build/libLauncher_nbt++.so" "${pkgdir}/usr/lib/libLauncher_nbt++.so"
}
diff --git a/application.desktop b/application.desktop
new file mode 100644
index 000000000000..c25be047f9f1
--- /dev/null
+++ b/application.desktop
@@ -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;
diff --git a/fix-jars.patch b/fix-jars.patch
new file mode 100644
index 000000000000..4d276841bc88
--- /dev/null
+++ b/fix-jars.patch
@@ -0,0 +1,14 @@
+diff '--color=auto' --unified --recursive --text --new-file Launcher0/launcher/Application.cpp Launcher1/launcher/Application.cpp
+--- Launcher0/launcher/Application.cpp 2021-12-13 06:20:23.475484553 +0000
++++ Launcher1/launcher/Application.cpp 2021-12-13 06:24:20.661422670 +0000
+@@ -524,6 +524,10 @@
+ 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;
diff --git a/mmc-brand.patch b/mmc-brand.patch
new file mode 100644
index 000000000000..4296441969bd
--- /dev/null
+++ b/mmc-brand.patch
@@ -0,0 +1,45 @@
+diff '--color=auto' -x '.*' --unified --recursive --text --new-file Launcher0/launcher/Application.cpp Launcher1/launcher/Application.cpp
+--- Launcher0/launcher/Application.cpp 2021-12-13 07:43:23.274019056 +0000
++++ Launcher1/launcher/Application.cpp 2021-12-13 07:50:33.016549365 +0000
+@@ -312,7 +312,7 @@
+ QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME"));
+ if (xdgDataHome.isEmpty())
+ xdgDataHome = QDir::homePath() + QLatin1String("/.local/share");
+- dataPath = xdgDataHome + "/devlauncher";
++ dataPath = xdgDataHome + "/multimc";
+ adjustedBy += "XDG standard " + dataPath;
+ #elif defined(Q_OS_MAC)
+ QDir foo(FS::PathCombine(applicationDirPath(), "../../Data"));
+diff '--color=auto' -x '.*' --unified --recursive --text --new-file Launcher0/launcher/resources/multimc/multimc.qrc Launcher1/launcher/resources/multimc/multimc.qrc
+--- Launcher0/launcher/resources/multimc/multimc.qrc 2021-12-13 06:20:23.494484805 +0000
++++ Launcher1/launcher/resources/multimc/multimc.qrc 2021-12-13 08:03:35.943090237 +0000
+@@ -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 '--color=auto' -x '.*' --unified --recursive --text --new-file Launcher0/notsecrets/CMakeLists.txt Launcher1/notsecrets/CMakeLists.txt
+--- Launcher0/notsecrets/CMakeLists.txt 2021-12-13 06:20:23.524485203 +0000
++++ Launcher1/notsecrets/CMakeLists.txt 2021-12-13 06:37:14.725320153 +0000
+@@ -3,14 +3,14 @@
+ 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)