====== Information ======
* RT4 Client ((https://gitlab.com/2009scape/rt4-client))
* ''master'' Branch ((https://gitlab.com/2009scape/rt4-client/-/tree/master?ref_type=heads))
===== Prerequisites =====
* [[bsd;freebsd_14.1_xfce|FreeBSD 14.1 (Xfce)]]
===== Notes =====
* :!: This is for private server use
* See [[servers:bsd:games:2009scape_localhost|2009Scape localhost Server]] to set-up a local server
====== Dependencies ======
* https://gitlab.com/2009scape/rt4-client#instructions
su -l
pkg install git openjdk17
====== Download Source ======
****
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/RT4-Client/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://gitlab.com/2009scape/rt4-client.git' ~/'Projects/RT4-Client/src' && sync
====== Build ======
****
cd ~/'Projects/RT4-Client/src' && ~/'Projects/RT4-Client/src/gradlew' 'clean' && ~/'Projects/RT4-Client/src/gradlew' 'jar' && ~/'Projects/RT4-Client/src/gradlew' --stop
====== Settings ======
===== localhost =====
* [[servers:bsd:games:2009scape_localhost|2009Scape localhost Server]]
mkdir -p ~/'Projects/RT4-Client/conf' && ee ~/'Projects/RT4-Client/conf/localhost.json'
{
"ip_management": "localhost",
"ip_address": "localhost",
"world": 1,
"server_port": 43594,
"wl_port": 43595,
"js5_port": 43595,
"mouseWheelZoom": false,
"pluginsFolder": "null"
}
====== Scripts ======
===== Client Update =====
* [[https://gitlab.com/2009scape/rt4-client/-/commits/master|Commits History]]
* [[#scape_localhost|Desktop Action Client-Update]]
mkdir -p ~/'Projects/RT4-Client/scripts' && ee ~/'Projects/RT4-Client/scripts/client-update.sh' && chmod +x ~/'Projects/RT4-Client/scripts/client-update.sh'
#!/bin/sh
git -C ~/'Projects/RT4-Client/src' reset --hard
git -C ~/'Projects/RT4-Client/src' pull origin 'master' --rebase
cd ~/'Projects/RT4-Client/src'
~/'Projects/RT4-Client/src/gradlew' 'clean'
~/'Projects/RT4-Client/src/gradlew' 'jar'
~/'Projects/RT4-Client/src/gradlew' --stop
notify-send -i ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' '2009Scape RT4 Client update complete'
# End
~/'Projects/RT4-Client/scripts/client-update.sh'
====== Desktop Launcher ======
===== 2009Scape (localhost) =====
* Mostly requires [[servers:bsd:games:2009scape_localhost#scripts|2009Scape localhost Server scripts]]
mkdir -p ~/'.local/share/applications/' && ee ~/'.local/share/applications/2009Scape-localhost.desktop' && sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/2009Scape-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications'
[Desktop Entry]
Name=2009Scape
Categories=Game;
Exec='/bin/bash' -c "cd ~/'Projects/RT4-Client/src/client' && JAVA_TOOL_OPTIONS='-XX:+UseSerialGC -Xms1G -Xmx4G --add-exports=java.desktop/sun.awt=ALL-UNNAMED' java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'"
Type=Application
StartupNotify=false
Icon=/home/CHANGEME/Projects/RT4-Client/src/client/src/main/resources/saradomin.png
Actions=HiDPI;Client-Update;Server-Update;Server;Saves;Client-Notes;Server-Notes;
[Desktop Action HiDPI]
Exec='/bin/bash' -c "cd ~/'Projects/RT4-Client/src/client' && GDK_SCALE='2' JAVA_TOOL_OPTIONS='-Xms1G -Xmx4G --add-exports=java.desktop/sun.awt=ALL-UNNAMED' java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'"
Name=Launch Client (High DPI)
[Desktop Action Client-Update]
Exec='/bin/bash' -c "ptyxis --standalone --title='RT4 Client Updater — ' -- ~/'Projects/RT4-Client/scripts/client-update.sh'"
Name=Update Client
[Desktop Action Server-Update]
Exec='/bin/bash' -c "ptyxis --standalone --title='2009Scape localhost Updater — ' -- ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'"
Name=Update Local Server
[Desktop Action Server]
Exec='/bin/bash' -c "ptyxis --standalone --title='2009Scape localhost Server — ' -- ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'"
Name=Launch Local Server
[Desktop Action Saves]
Exec='/bin/bash' -c "~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh'"
Name=Save Data Back-up
[Desktop Action Client-Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/games:linux:rt4_client_runescape_530'"
Name=Client Installation Notes
[Desktop Action Server-Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/servers:linux:games:2009scape_localhost'"
Name=localhost Server Installation Notes
# End
====== Quick Commands ======
===== Execute =====
****
cd ~/'Projects/RT4-Client/src/client' && java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'
==== Testing ====
GDK_BACKEND='x11' GDK_SCALE='2'
GALLIUM_HUD='cpu0+cpu1+cpu2+cpu3;API-thread-offloaded-slots+API-thread-direct-slots+API-thread-num-syncs;fps' mesa_glthread='true'
cd ~/'Projects/RT4-Client/src/client' && java -XX:+UseSerialGC -Xms1G -Xmx4G -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'
cd ~/'Projects/RT4-Client/src/client' && java -Dsun.java2d.uiScale=2 -XX:+UseSerialGC -Xms1G -Xmx4G -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'
wmctrl -r 'rt4-client.rt4-client' -x -b 'toggle,fullscreen'
===== Update =====
* [[https://gitlab.com/2009scape/rt4-client/-/commits/master|Commits History]]
git -C ~/'Projects/RT4-Client/src' reset --hard && git -C ~/'Projects/RT4-Client/src' pull origin 'master' --rebase && cd ~/'Projects/RT4-Client/src' && ~/'Projects/RT4-Client/src/gradlew' 'clean' && ~/'Projects/RT4-Client/src/gradlew' 'jar' && ~/'Projects/RT4-Client/src/gradlew' --stop && cd ~ && sync
~/'Projects/RT4-Client/scripts/client-update.sh'
xfce4-terminal --title='RT4 Client Updater' -e ~/'Projects/RT4-Client/scripts/client-update.sh'
===== gradlew =====
* Lists available ''gradlew'' commands
cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'tasks' && ~/'Projects/RT4-Client/src/gradlew' --stop
cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'tasks' --all && ~/'Projects/RT4-Client/src/gradlew' --stop
===== File Manager =====
==== Root ====
****
gio open ~/'Projects/RT4-Client/src'