summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Santini2023-02-07 10:46:30 +0100
committerGiovanni Santini2023-02-07 10:46:30 +0100
commit9606ee4397fc27e22917dd70ba1d2572acfa8bbc (patch)
tree57c0bc7cdf3a31c60ed1021902a080b4aa1a53fd
parenta427839a01b08041bddb50f5ae408c9d3627b642 (diff)
downloadaur-9606ee4397fc27e22917dd70ba1d2572acfa8bbc.tar.gz
upgpkg: crystal-launcher 20230116-1
- Version bump. - Major package analysis to make this to work.
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD48
-rwxr-xr-xcrystal-launcher.sh39
3 files changed, 51 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 79179301732a..92122d2d45e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,20 @@
pkgbase = crystal-launcher
pkgdesc = A custom Minecraft launcher with its own package system
- pkgver = 20210809
+ pkgver = 20230116
pkgrel = 1
url = https://crystal-launcher.net/
install = crystal-launcher.install
arch = any
license = unknown
- depends = java-runtime=8
- depends = java-runtime>=16
- depends = java8-openjfx
- source = crystal-launcher.jar::http://main.crystal-launcher.pl/releases/other/CrystalLauncher.jar
- source = crystal-launcher.png::http://main.crystal-launcher.pl/releases/icon.png
+ depends = java-runtime=17
+ depends = java17-openjfx
+ source = crystal-launcher.jar::https://launcher.crystal-launcher.net/bootstrapNX/data/crystal-wrapper.jar
+ source = crystal-launcher.png::https://launcher.crystal-launcher.net/linux/icon.png
source = crystal-launcher.sh
source = crystal-launcher.desktop
- sha256sums = cb495e726512a039df6f6d297ba7cfd9ce0b1fe368bad5ba20abe7852d65527a
+ sha256sums = e9eacb799ed31b66854eb9266e126719b83afcb11e586181e9ddc19ded6c10e3
sha256sums = 214f4f12eb772d2ce945723ab7b126b1fb3e78c009f4132d6b0f98ea2270ab0c
- sha256sums = 6aec5cf9f6ed8a20e138104e0cb9f33c1cbb0798ca00981158b9dbd3c4cc437a
+ sha256sums = 68a357836068f9382f96d8a858f664908d3e6dceb5246d4c34dcfb9b3495bdb6
sha256sums = ff160d4a4cfe366f0ec806d7eeeac4bfd5e83c3d01afbc22ecc5caa1adb247ef
pkgname = crystal-launcher
diff --git a/PKGBUILD b/PKGBUILD
index 258047220c66..72d1e2ba992c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,47 @@
# Maintainer: Giovanni Santini <giovannisantini93@yahoo.it>
pkgname=crystal-launcher
-pkgver=20210809
+pkgver=20230116
pkgrel=1
pkgdesc="A custom Minecraft launcher with its own package system"
arch=(any)
url="https://crystal-launcher.net/"
license=('unknown')
+
+# Current reverse engineering for figuring out the jar:
+# 1. curl the current script:
+# https://bit.ly/cl4lx
+# ->
+# https://launcher.crystal-launcher.net/linux/install.sh
+# Here we can find the launcher icon.
+# 2. Fetch the launcher.tar.xz mentioned there
+# 3. The 'launcher' binary inside is a PyInstaller package.
+# It can be unpacked via:
+# https://github.com/extremecoders-re/pyinstxtractor
+# There is the web version here:
+# https://pyinstxtractor-web.netlify.app/
+# 4. Unpack the .zip file, it has a bunch of .pyc files.
+# You can decompile it via pycdc.
+# Focus on the Crystal*.pyc.
+# The main manifest is available here:
+# https://launcher.crystal-launcher.net/bootstrapNX/data/bootstrapManifest.json
+# It also stores the Java version to use
+# 5. We have the proper JAR and command line path for the launcher.
+
+_java_version="17"
depends=(
- # For Minecraft >= 1.17
- "java-runtime=8"
- # For Minecraft < 1.17
- "java-runtime>=16"
- # For client GUI
- java8-openjfx
+ "java-runtime=${_java_version}"
+ "java${_java_version}-openjfx"
)
install="$pkgname.install"
-source=("$pkgname.jar::http://main.crystal-launcher.pl/releases/other/CrystalLauncher.jar"
- "$pkgname.png::http://main.crystal-launcher.pl/releases/icon.png"
+source=("$pkgname.jar::https://launcher.crystal-launcher.net/bootstrapNX/data/crystal-wrapper.jar"
+ "$pkgname.png::https://launcher.crystal-launcher.net/linux/icon.png"
"$pkgname.sh"
"$pkgname.desktop")
-noextract=()
-sha256sums=('cb495e726512a039df6f6d297ba7cfd9ce0b1fe368bad5ba20abe7852d65527a'
+sha256sums=('e9eacb799ed31b66854eb9266e126719b83afcb11e586181e9ddc19ded6c10e3'
'214f4f12eb772d2ce945723ab7b126b1fb3e78c009f4132d6b0f98ea2270ab0c'
- '6aec5cf9f6ed8a20e138104e0cb9f33c1cbb0798ca00981158b9dbd3c4cc437a'
+ '68a357836068f9382f96d8a858f664908d3e6dceb5246d4c34dcfb9b3495bdb6'
'ff160d4a4cfe366f0ec806d7eeeac4bfd5e83c3d01afbc22ecc5caa1adb247ef')
-# Adjust this based on the runtimes you will use.
-# The defaults are the one available in the official repositories.
-_jre_16="jre-openjdk"
-_jre_8="jre8-openjdk"
-
package() {
cd "$srcdir"
@@ -37,8 +49,6 @@ package() {
cp -v "$pkgname.jar" "$pkgdir/usr/share/java"
mkdir -p "$pkgdir/usr/bin"
- # Adjust the JVMs in the script
- sed -i "$pkgname.sh" -e "s|%JAVA_8%|$_jre_8|" -e "s|%JAVA_16%|$_jre_16|"
cp -v "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
mkdir -p "$pkgdir/usr/share/applications"
diff --git a/crystal-launcher.sh b/crystal-launcher.sh
index d58f853eb35d..e854c4a15199 100755
--- a/crystal-launcher.sh
+++ b/crystal-launcher.sh
@@ -2,28 +2,19 @@
# Based on:
# https://wiki.archlinux.org/title/Java_package_guidelines
-# Force installation in the standard path
-CL_INST_CONF="$HOME/.crystalinst"
-if [ ! -f $CL_INST_CONF ]
-then
- touch "$CL_INST_CONF"
- echo "$HOME/Crystal-Launcher" > "$CL_INST_CONF"
-fi
-
-# At the first time set up the proper JREs in the config file
-JAVA_8="%JAVA_8%"
-JAVA_16="%JAVA_16%"
-
-CL_CONFIG="`cat $CL_INST_CONF`/config.prop"
-if [ ! -f $CL_CONFIG ]
-then
- touch $CL_CONFIG
- echo "customjvmdir_v2.path=/usr/lib/jvm/$JAVA_8/jre/bin/java" > "$CL_CONFIG"
- echo "customjvmdir_v2.use=true" >> "$CL_CONFIG"
- echo "customjvmdir_v3.path=/usr/lib/jvm/$JAVA_16/bin/java" >> "$CL_CONFIG"
- echo "customjvmdir_v3.use=true" >> "$CL_CONFIG"
-fi
-
-# Run the app correctly
-exec /usr/bin/java -jar '/usr/share/java/crystal-launcher.jar' "$@"
+# Force execution in the standard path
+mkdir -p "$HOME/Crystal-Launcher"
+cd "$HOME/Crystal-Launcher"
+# Run the app correctly, using most of the parameters
+# inside the reverse engineered launcher
+exec /usr/bin/java \
+ -Dfile.encoding=UTF-8 \
+ -Djava.net.preferIPv4Stack=true \
+ -Dprism.forceGPU=true \
+ -Dprism.verbose=true \
+ -Xmx256M \
+ -Xms128M \
+ --add-opens java.desktop/sun.awt.X11=ALL-UNNAMED \
+ -cp '/usr/share/java/crystal-launcher.jar' \
+ ovh.leszczu8023.crystalwrapper.Main "$@"