mirror of
https://git.freebsd.org/ports.git
synced 2025-05-28 00:46:27 -04:00
games/prismlauncher: New port: Minecraft launcher with ability to manage multiple instances
A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once. (Fork of MultiMC) https://prismlauncher.org Differential Revision: https://reviews.freebsd.org/D44661
This commit is contained in:
parent
5b3354a080
commit
cfd09d6e9d
11 changed files with 154 additions and 0 deletions
|
@ -790,6 +790,7 @@
|
||||||
SUBDIR += prboom
|
SUBDIR += prboom
|
||||||
SUBDIR += prboom-plus
|
SUBDIR += prboom-plus
|
||||||
SUBDIR += primateplunge
|
SUBDIR += primateplunge
|
||||||
|
SUBDIR += prismlauncher
|
||||||
SUBDIR += puckman
|
SUBDIR += puckman
|
||||||
SUBDIR += punchy
|
SUBDIR += punchy
|
||||||
SUBDIR += pvpgn
|
SUBDIR += pvpgn
|
||||||
|
|
35
games/prismlauncher/Makefile
Normal file
35
games/prismlauncher/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
PORTNAME= prismlauncher
|
||||||
|
DISTVERSION= 8.4
|
||||||
|
CATEGORIES= games java
|
||||||
|
|
||||||
|
MAINTAINER= Alexander88207@protonmail.com
|
||||||
|
COMMENT= Minecraft launcher with ability to manage multiple instances
|
||||||
|
WWW= https://prismlauncher.org/
|
||||||
|
|
||||||
|
LICENSE= GPLv3
|
||||||
|
LICENSE_FILE= ${WRKSRC}/COPYING.md
|
||||||
|
|
||||||
|
LIB_DEPENDS= libcmark.so:textproc/cmark \
|
||||||
|
libquazip1-qt6.so:archivers/quazip@qt6 \
|
||||||
|
libtomlplusplus.so:devel/tomlplusplus
|
||||||
|
RUN_DEPENDS= lwjgl>0:games/lwjgl \
|
||||||
|
lwjgl3>0:games/lwjgl3 \
|
||||||
|
openjdk21>0:java/openjdk21 \
|
||||||
|
xrandr:x11/xrandr
|
||||||
|
|
||||||
|
USES= cmake compiler:c++17-lang desktop-file-utils gl kde:6 qt:6 \
|
||||||
|
shared-mime-info
|
||||||
|
USE_GITHUB= yes
|
||||||
|
GH_ACCOUNT= PrismLauncher
|
||||||
|
GH_PROJECT= ${GH_ACCOUNT}
|
||||||
|
GH_TUPLE= gulrak:filesystem:2fc4b463:filesystem/libraries/filesystem \
|
||||||
|
PrismLauncher:libnbtplusplus:23b95512:libnbtplusplus/libraries/libnbtplusplus
|
||||||
|
USE_GL= opengl
|
||||||
|
USE_JAVA= yes
|
||||||
|
USE_KDE= ecm:build
|
||||||
|
USE_QT= 5compat base
|
||||||
|
|
||||||
|
CMAKE_ARGS= -DJAVA_HOME=${JAVA_HOME} -DJava_JAVAC_EXECUTABLE=${JAVAC} \
|
||||||
|
-DLauncher_BUILD_PLATFORM=FreeBSD
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
7
games/prismlauncher/distinfo
Normal file
7
games/prismlauncher/distinfo
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
TIMESTAMP = 1725714249
|
||||||
|
SHA256 (PrismLauncher-PrismLauncher-8.4_GH0.tar.gz) = e3268a787d326c7c71f63093a2b411d6735c07b3751b426db6d50a0386311c76
|
||||||
|
SIZE (PrismLauncher-PrismLauncher-8.4_GH0.tar.gz) = 4397390
|
||||||
|
SHA256 (gulrak-filesystem-2fc4b463_GH0.tar.gz) = 270eead1276da3af72e6f1c5b819d0b2a7b24ddc3e4e7a1a0b69ffba8d07228f
|
||||||
|
SIZE (gulrak-filesystem-2fc4b463_GH0.tar.gz) = 211853
|
||||||
|
SHA256 (PrismLauncher-libnbtplusplus-23b95512_GH0.tar.gz) = 4393bc210d2025029fc364d761d339c88223a3cdd03b401ebee58d5e3cddb4dc
|
||||||
|
SIZE (PrismLauncher-libnbtplusplus-23b95512_GH0.tar.gz) = 48603
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Patch taken from er2off: https://github.com/er2off/freebsd-ports
|
||||||
|
--- launcher/minecraft/LaunchProfile.cpp.orig 2023-11-27 12:45:04 UTC
|
||||||
|
+++ launcher/minecraft/LaunchProfile.cpp
|
||||||
|
@@ -344,6 +344,14 @@ void LaunchProfile::getLibraryFiles(const RuntimeConte
|
||||||
|
jars.clear();
|
||||||
|
nativeJars.clear();
|
||||||
|
for (auto lib : getLibraries()) {
|
||||||
|
+#ifdef Q_OS_FREEBSD
|
||||||
|
+ // HACKHACK: use system lwjgl3 until mojang will fix it
|
||||||
|
+ QString artifact = lib->artifactId();
|
||||||
|
+ if (artifact.startsWith("lwjgl") && lib->version().startsWith("3.")) {
|
||||||
|
+ jars += "/usr/local/share/java/classes/lwjgl3/" + artifact + ".jar";
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
lib->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath);
|
||||||
|
}
|
||||||
|
// NOTE: order is important here, add main jar last to the lists
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Patch taken from er2off: https://github.com/er2off/freebsd-ports
|
||||||
|
--- launcher/minecraft/MinecraftInstance.cpp.orig 2023-11-27 12:44:40 UTC
|
||||||
|
+++ launcher/minecraft/MinecraftInstance.cpp
|
||||||
|
@@ -305,7 +305,16 @@ QString MinecraftInstance::getNativePath() const
|
||||||
|
|
||||||
|
QString MinecraftInstance::getNativePath() const
|
||||||
|
{
|
||||||
|
+#ifdef Q_OS_FREEBSD
|
||||||
|
+ Version instance_ver{ getPackProfile()->getComponentVersion("net.minecraft") };
|
||||||
|
+ QDir natives_dir;
|
||||||
|
+ if (instance_ver < Version("1.13.0"))
|
||||||
|
+ natives_dir = QDir("/usr/local/lib/lwjgl/");
|
||||||
|
+ else
|
||||||
|
+ natives_dir = QDir("/usr/local/lib/lwjgl3/");
|
||||||
|
+#else
|
||||||
|
QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/"));
|
||||||
|
+#endif
|
||||||
|
return natives_dir.absolutePath();
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Patch taken from er2off: https://github.com/er2off/freebsd-ports
|
||||||
|
--- launcher/ui/pages/global/AccountListPage.cpp.orig 2024-03-03 19:37:21 UTC
|
||||||
|
+++ launcher/ui/pages/global/AccountListPage.cpp
|
||||||
|
@@ -147,6 +147,7 @@ void AccountListPage::on_actionAddOffline_triggered()
|
||||||
|
|
||||||
|
void AccountListPage::on_actionAddOffline_triggered()
|
||||||
|
{
|
||||||
|
+#ifdef NO_OFFLINE
|
||||||
|
if (!m_accounts->anyAccountIsValid()) {
|
||||||
|
QMessageBox::warning(this, tr("Error"),
|
||||||
|
tr("You must add a Microsoft account that owns Minecraft before you can add an offline account."
|
||||||
|
@@ -154,6 +155,7 @@ void AccountListPage::on_actionAddOffline_triggered()
|
||||||
|
"If you have lost your account you can contact Microsoft for support."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
MinecraftAccountPtr account =
|
||||||
|
OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account."));
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- libraries/javacheck/CMakeLists.txt.orig 2024-06-18 18:07:06 UTC
|
||||||
|
+++ libraries/javacheck/CMakeLists.txt
|
||||||
|
@@ -4,7 +4,7 @@ set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck)
|
||||||
|
|
||||||
|
include(UseJava)
|
||||||
|
set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck)
|
||||||
|
-set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7 -Xlint:deprecation -Xlint:unchecked)
|
||||||
|
+set(CMAKE_JAVA_COMPILE_FLAGS -target 8 -source 8 -Xlint:deprecation -Xlint:unchecked)
|
||||||
|
|
||||||
|
set(SRC
|
||||||
|
JavaCheck.java
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- libraries/launcher/CMakeLists.txt.orig 2024-06-18 18:07:06 UTC
|
||||||
|
+++ libraries/launcher/CMakeLists.txt
|
||||||
|
@@ -4,7 +4,7 @@ set(CMAKE_JAVA_JAR_ENTRY_POINT org.prismlauncher.Entry
|
||||||
|
|
||||||
|
include(UseJava)
|
||||||
|
set(CMAKE_JAVA_JAR_ENTRY_POINT org.prismlauncher.EntryPoint)
|
||||||
|
-set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7)
|
||||||
|
+set(CMAKE_JAVA_COMPILE_FLAGS -target 8 -source 8)
|
||||||
|
|
||||||
|
set(SRC
|
||||||
|
org/prismlauncher/EntryPoint.java
|
2
games/prismlauncher/pkg-descr
Normal file
2
games/prismlauncher/pkg-descr
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
A custom launcher for Minecraft that allows you to easily manage
|
||||||
|
multiple installations of Minecraft at once. (Fork of MultiMC)
|
20
games/prismlauncher/pkg-message
Normal file
20
games/prismlauncher/pkg-message
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
message: <<EOM
|
||||||
|
|
||||||
|
NVIDIA users have probably to add the following to the
|
||||||
|
environment variables section:
|
||||||
|
|
||||||
|
LD_LIBMAP libGLX.so libGL-NVIDIA.so
|
||||||
|
libGLX.so.0 libGL-NVIDIA.so.1
|
||||||
|
|
||||||
|
For older cards that dont support OpenGL 4
|
||||||
|
you have to add the following to the environment variables section:
|
||||||
|
|
||||||
|
MESA_GL_VERSION_OVERRIDE 3.2
|
||||||
|
MESA_GLSL_VERSION_OVERRIDE 330
|
||||||
|
|
||||||
|
Have Fun!
|
||||||
|
EOM
|
||||||
|
}
|
||||||
|
]
|
10
games/prismlauncher/pkg-plist
Normal file
10
games/prismlauncher/pkg-plist
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
bin/prismlauncher
|
||||||
|
share/PrismLauncher/JavaCheck.jar
|
||||||
|
share/PrismLauncher/NewLaunch.jar
|
||||||
|
share/PrismLauncher/NewLaunchLegacy.jar
|
||||||
|
share/PrismLauncher/qtlogging.ini
|
||||||
|
share/applications/org.prismlauncher.PrismLauncher.desktop
|
||||||
|
share/icons/hicolor/scalable/apps/org.prismlauncher.PrismLauncher.svg
|
||||||
|
share/metainfo/org.prismlauncher.PrismLauncher.metainfo.xml
|
||||||
|
share/mime/packages/modrinth-mrpack-mime.xml
|
||||||
|
share/qlogging-categories6/prismlauncher.categories
|
Loading…
Add table
Reference in a new issue