Table of Contents

Information

Prerequisites

Dependencies

Java

25

17

Download Source

"%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://gitlab.com/2009scape/rt4-client.git" "%UserProfile%\Projects\RT4-Client\src"

Build

Settings

MKDIR "%UserProfile%\Projects\RT4-Client\scripts" & "%SystemRoot%\System32\notepad.exe" "%UserProfile%\Projects\RT4-Client\scripts\client-settings-sed.sh"
#!/bin/sh

cd '/tmp'

'/usr/bin/sed' -i -e 's/USE_TWEENING = true/USE_TWEENING = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
'/usr/bin/sed' -i -e 's/BILINEAR_MINIMAP = true/BILINEAR_MINIMAP = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
'/usr/bin/sed' -i -e 's/USE_SHIFT_CLICK = true/USE_SHIFT_CLICK = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
'/usr/bin/sed' -i -e 's/MOUSEWHEEL_ZOOM = true/MOUSEWHEEL_ZOOM = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'

# End
"%ProgramFiles%\Git\bin\sh.exe" -- "%UserProfile%\Projects\RT4-Client\scripts\client-settings-sed.sh"
TYPE "%UserProfile%\Projects\RT4-Client\src\client\src\main\java\rt4\GlobalConfig.java" | "%SystemRoot%\System32\find.exe" "public static boolean"

Build

CD "%UserProfile%\Projects\RT4-Client\src" && SET "JAVA_HOME=%ProgramFiles%\Microsoft\jdk-17.0.18.8-hotspot" && "%UserProfile%\Projects\RT4-Client\src\gradlew.bat" "clean" --no-daemon && SET "JAVA_HOME="
CD "%UserProfile%\Projects\RT4-Client\src" && SET "JAVA_HOME=%ProgramFiles%\Microsoft\jdk-17.0.18.8-hotspot" && "%UserProfile%\Projects\RT4-Client\src\gradlew.bat" "jar" --no-daemon && SET "JAVA_HOME="

Settings

MKDIR "%UserProfile%\Projects\RT4-Client\conf" & "%SystemRoot%\System32\notepad.exe" "%UserProfile%\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

MKDIR "%UserProfile%\Projects\RT4-Client\scripts" "%UserProfile%\Projects\RT4-Client\cache"
"%SystemRoot%\explorer.exe" "%UserProfile%\Projects\RT4-Client\scripts"

Client Start

"%SystemRoot%\System32\notepad.exe" "%UserProfile%\Projects\RT4-Client\scripts\client-start.bat"
@echo off

CD "%UserProfile%\Projects\RT4-Client\src\client"

SET "_JAVA_OPTIONS=-Dsun.java2d.uiScale=1 -Djava.net.preferIPv6Addresses=false --add-exports=java.desktop/sun.awt=ALL-UNNAMED --enable-native-access=ALL-UNNAMED -Djava.io.tmpdir=..\..\cache"

START "" "javaw.exe" -DclientHomeOverride="..\..\cache" -jar "%UserProfile%\Projects\RT4-Client\src\client\build\libs\client-1.0.0.jar" --config "%UserProfile%\Projects\RT4-Client\conf\localhost.json"

SET "_JAVA_OPTIONS="

:: End
"%UserProfile%\Projects\RT4-Client\scripts\client-start.bat"

High DPI

"%SystemRoot%\System32\notepad.exe" "%UserProfile%\Projects\RT4-Client\scripts\client-hidpi-start.bat"
@echo off

CD "%UserProfile%\Projects\RT4-Client\src\client"

SET "_JAVA_OPTIONS=-Dsun.java2d.uiScale=2 -Djava.net.preferIPv6Addresses=false --add-exports=java.desktop/sun.awt=ALL-UNNAMED --enable-native-access=ALL-UNNAMED -Djava.io.tmpdir=..\..\cache"

START "" "javaw.exe" -DclientHomeOverride="..\..\cache" -jar "%UserProfile%\Projects\RT4-Client\src\client\build\libs\client-1.0.0.jar" --config "%UserProfile%\Projects\RT4-Client\conf\localhost.json"

SET "_JAVA_OPTIONS="

:: End
"%UserProfile%\Projects\RT4-Client\scripts\client-hidpi-start.bat"

Client Update

"%SystemRoot%\System32\notepad.exe" "%UserProfile%\Projects\RT4-Client\scripts\client-update.bat"
@echo off

TITLE RT4 Client Updater
CD "%Temp%"

"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\RT4-Client\src" reset --hard "origin/master"
"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\RT4-Client\src" pull origin "master" --rebase

"%ProgramFiles%\Git\bin\sh.exe" -- "%UserProfile%\Projects\RT4-Client\scripts\client-settings-sed.sh"

CD "%UserProfile%\Projects\RT4-Client\src"

SET "JAVA_HOME=%ProgramFiles%\Microsoft\jdk-17.0.18.8-hotspot"
SET "_JAVA_OPTIONS=--add-exports=java.base/sun.nio.ch=ALL-UNNAMED"

CALL "%UserProfile%\Projects\RT4-Client\src\gradlew.bat" "client:clean" --no-daemon -q 1> NUL
CALL "%UserProfile%\Projects\RT4-Client\src\gradlew.bat" "client:jar" --no-daemon -q > NUL 2>&1

SET "JAVA_HOME="
SET "_JAVA_OPTIONS="

"%SystemRoot%\System32\msg.exe" %USERNAME% /TIME:"2" "2009Scape RT4 Client update complete"

:: End
"%UserProfile%\Projects\RT4-Client\scripts\client-update.bat"

Extras

Icon

GIMP

MKDIR "%UserProfile%\Projects\RT4-Client\ext"
"%LocalAppData%\Programs\GIMP 3\bin\gimp-3.exe" "%UserProfile%\Projects\RT4-Client\src\client\src\main\resources\saradomin.png"
..\..\..\..\..\ext\saradomin.ico

Launcher Shortcuts

Desktop

Client

"%UserProfile%\Projects\RT4-Client\scripts\client-start.bat"
2009Scape

Icon

"%UserProfile%\Projects\RT4-Client\ext\saradomin.ico"

High DPI

"%UserProfile%\Projects\RT4-Client\scripts\client-hidpi-start.bat"
2009Scape (HiDPI)

Start Menu

MKDIR "%AppData%\Microsoft\Windows\Start Menu\Programs\2009Scape" & "%SystemRoot%\explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\2009Scape"

Client

"%UserProfile%\Projects\RT4-Client\scripts\client-start.bat"
2009Scape (localhost)

Icon

"%UserProfile%\Projects\RT4-Client\ext\saradomin.ico"

High DPI

"%UserProfile%\Projects\RT4-Client\scripts\client-hidpi-start.bat"
2009Scape (HiDPI)

Update

"%UserProfile%\Projects\RT4-Client\scripts\client-update.bat"
Client Updater

Install Notes

"https://wiki.realmofespionage.xyz/games;windows;rt4_client_runescape_530"
Install Notes (Client)