-
Notifications
You must be signed in to change notification settings - Fork 2
Home
There is an installer for Windows OS. You can view its source code and guide from here.
Or you can download it directly. Then if you wish you can view launchers' guide.
There is an installer script (v1) for Unix based OS.
- Create a folder to put files in it.
- Create a file named "installer.sh" in the folder.
- Copy the code below, and paste into it.
- Open the terminal in the specified folder, and type
chmod +x installer.sh(This code will give the execution permissions to the script.) - Run the script by typing
./installer.shorsudo ./installer.shto avoid any permission problem. - Enjoy :)
#!/bin/bash
cd "$(dirname "$(readlink -fn "$0")")"
NONE="0m"
RED="0;31m"
RED_BOLD="1;31m"
GREEN="0;32m"
GREEN_BOLD="1;32m"
YELLOW="0;33m"
YELLOW_BOLD="1;33m"
CYAN="0;36m"
CYAN_BOLD="1;36m"
print(){
echo $3 -e "\033[$2$1\033[$NONE"
if [ -n "$4" ]; then
echo $4
fi
}
print "Core Launcher Installer Script for Linux v1" $CYAN_BOLD
print "\nLooking for Java... " $YELLOW_BOLD -n
_GetJsonProperty(){
local wg=$(wget -q -O - "$1")
local var=$(echo $wg | grep -o "\"$2\":\s*\"[^\"]*\"" | awk -F'":' '{print $2}' | tr -d '",' | awk '{$1=$1;print}')
echo "$var"
}
_DownloadJava(){
# Looking for architecture
architecture=$(uname -m)
if [ "$architecture" == "x86_64" ]; then
architecture="x64"
fi
url="https://api.adoptium.net/v3/assets/latest/17/hotspot?os=linux&image_type=jdk&architecture=""$architecture"
print "Getting information from Adoptium: " $YELLOW_BOLD -n $url
sd=$( _GetJsonProperty "$url" link )
print "\nDownloading Java: " $GREEN_BOLD -n $sd
wget -O "java.tar.gz" "$sd"
mkdir java
tar -xzf "java.tar.gz" -C "java" --strip-components 1
rm "java.tar.gz"
print "Java successfully installed on $(dirname $0)/java" $CYAN_BOLD
}
work=$(pwd)
JAVA_VER=$(java -version 2>&1 >/dev/null | grep -E "\S+\s+version" | awk '{print $3}' | tr -d '"' | awk -F. '{print $1}')
if [ -z "$JAVA_VER" ] || [ "$JAVA_VER" -lt "17" ]; then
if [ ! -f "java/bin/java" ]; then
print "You do not have the required Java!" $RED
_DownloadJava
else
print "Found local." $GREEN_BOLD
fi
# java is the son of java
JAVA="java/bin/java"
JAVA_VER="17"
else
JAVA="java"
print "Found." $GREEN_BOLD
fi
print "Current Java Version: " $YELLOW_BOLD -n $JAVA_VER
print "Acquiring the latest version of the launcher..." $YELLOW_BOLD
lnk=$( _GetJsonProperty "https://laeben-update-default-rtdb.europe-west1.firebasedatabase.app/apps/clauncher.json" latestFile )
print "Downloading the latest version of the launcher: " $GREEN_BOLD -n $lnk
wget -O "CoreLauncher.jar" "$lnk"
script="start.sh"
echo -e '#!/bin/bash\ncd "$(dirname "$(readlink -fn "$0")")"' > $script
echo "$JAVA"" -jar CoreLauncher.jar" >> $script
chmod +x start.sh
dsk="CoreLauncher.desktop"
echo -e "[Desktop Entry]\nName=Core Launcher\nType=Application\nTerminal=false\nExec=\"$work/start.sh\"\nPath=$work" > $dsk
chmod a+x $dsk
gio set $dsk metadata::trusted true
print "\n\nA .desktop file created to allow you to start the launcher easily, you have to move it to your desktop directory before using. You can delete it if you want." $RED
print "Installation completed, press a key to start the launcher, or terminate." $CYAN_BOLD
read -n 1 -s
./start.sh
exit 0
˅˅˅˅ Looking for a manual guide? Look below.... ˅˅˅˅
Core Launcher works with Java 17. You have to download it and add it to the system path variable.
You have many options.
- You can delete it.
- You can remove it from the system path variable.
- You can use a launch script. (see Creating a Launch Script)
- Go to Java 17 Download Page
- Download (JDK or JRE) and install it based on your OS.
- Check the path variable after installation. (It should be like
.../jre|jdk 17.../bin)
You can download the latest version of the launcher from its website.
Notice: In my opinion, you should create a new folder for the launcher, because it creates a config.json and all of your settings are stored in this file. You don't want to lose it :)
You have two options to run the launcher.
- Using a launch script. (see Creating a Launch Script)
- Clicking on the JAR twice. (Yup, like a normal app.)
java -jar CoreLauncher.jar
Create a file (Unix .sh, MacOS .command, Windows .bat) and paste this code into it.
You can replace java with a custom Java 17 path. (".../...jre|jdk 17.../bin/java.exe")
On Unix, you need to add
#!/bin/sh
cd "$(dirname "$(readlink -fn "$0")")"
MacOS, you need to add
#!/bin/bash
cd "$(dirname "$0")"
to the beginning of the script.
If you didn't change the launchers' JAR path, the launch script and launcher must be in the same directory.
--profile "profile name"
Starts the launcher directly with the selected profile without opening any GUI.
--launch "profile name"
Starts the launcher directly with the selected profile, and opens a GUI based on the Don't Use GUI On Shortcuts setting.
Starts the launcher in offline mode.
See here.
Page-by-page documentation is here.
Extension API documentation is here.