Both sides previous revisionPrevious revisionNext revision | Previous revision |
games:bsd:2004scape_localhost [2025/05/21 10:00] – Sean Rhone | games:bsd:2004scape_localhost [2025/05/23 18:11] (current) – Sean Rhone |
---|
===== Prerequisites ===== | ===== Prerequisites ===== |
| |
* [[bsd;freebsd_14.2_xfce|FreeBSD 14.2 (Xfce)]] | * [[bsd:freebsd_14.2_xfce|FreeBSD 14.2 (Xfce)]] |
| |
===== Resources ===== | ===== Resources ===== |
| |
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/LostCity-225-EngineTS/src' && git clone --branch '225' --depth '1' --recurse-submodules 'https://github.com/LostCityRS/Engine-TS.git' ~/'Projects/LostCity-225-EngineTS/src' && sync | cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/LostCity-225-EngineTS/src' && git clone --branch '225' --depth '1' --recurse-submodules 'https://github.com/LostCityRS/Engine-TS.git' ~/'Projects/LostCity-225-EngineTS/src' && sync |
| |
| ==== Bun Fix ==== |
| |
| * :!: 2025/05/21: [[https://github.com/LostCityRS/Engine-TS/commit/5c2c6e8f0a0e563c63f0a1128964e9c35068e092|5c2c6e8]] switches to Bun that's not compatible with FreeBSD ([[https://github.com/oven-sh/bun/issues/1524|#1524]]) |
| * This pulls older commit [[https://github.com/LostCityRS/Engine-TS/commit/0fb09fb0506fd884d82b8fec556a822e69d25e14|0fb09fb]] |
| |
| cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/LostCity-225-EngineTS/src' && git clone --rev '0fb09fb0506fd884d82b8fec556a822e69d25e14' --depth '1' --recurse-submodules 'https://github.com/LostCityRS/Engine-TS.git' ~/'Projects/LostCity-225-EngineTS/src' && sync |
| |
===== Content ===== | ===== Content ===== |
#!/bin/sh | #!/bin/sh |
| |
| export JAVA_HOME='/usr/local/openjdk24' |
export _JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow' | export _JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow' |
| |
#!/bin/sh | #!/bin/sh |
| |
git -C ~/'Projects/LostCity-225-EngineTS/src' reset --hard | # 2025/05/23: Locked for Bun/npm |
git -C ~/'Projects/LostCity-225-EngineTS/src' pull origin '225' --rebase | #git -C ~/'Projects/LostCity-225-EngineTS/src' reset --hard |
| #git -C ~/'Projects/LostCity-225-EngineTS/src' pull origin '225' --rebase |
| |
git -C ~/'Projects/LostCity-225-EngineTS/content' reset --hard | git -C ~/'Projects/LostCity-225-EngineTS/content' reset --hard |
# SF End | # SF End |
| |
notify-send -i ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' '2004Scape localhost server update complete' | notify-send -i ~/'Projects/LostCity-225-EngineTS/src/public/favicon.ico' '2004Scape localhost server update complete' |
| |
# End</code> | # End</code> |
tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2004Scape-localhost-Saves.tar.gz' -C ~/'Projects/LostCity-225-EngineTS/src/data/players' 'main' | tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2004Scape-localhost-Saves.tar.gz' -C ~/'Projects/LostCity-225-EngineTS/src/data/players' 'main' |
| |
notify-send -i ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' '2004Scape Save Data Backed-up Successfully to Downloads' | notify-send -i ~/'Projects/LostCity-225-EngineTS/src/public/favicon.ico' '2004Scape Save Data Backed-up Successfully to Downloads' |
| |
# End</code> | # End</code> |
| |
====== Extras ====== | ====== Extras ====== |
| |
| ===== Icon ===== |
| |
| * https://raw.githubusercontent.com/2004Scape/Server/7b0f1ec303dc1f76c7b29a2fff83b5797dafa01b/public/favicon.ico |
| |
| rm -f '/tmp/2004Scape-favicon.ico' && wget -O '/tmp/2004Scape-favicon.ico' 'https://raw.githubusercontent.com/2004Scape/Server/7b0f1ec303dc1f76c7b29a2fff83b5797dafa01b/public/favicon.ico' && sha384sum '/tmp/2004Scape-favicon.ico' | grep 'c70ef71357951b3c1895cf205746eb93959cf8031d1f83b6f43d8a9efbb272d79ed6b4a64fb1c39f6898ed56601bfc63' > '/dev/null' && mv -f '/tmp/2004Scape-favicon.ico' ~/'Projects/LostCity-225-EngineTS/src/public/favicon.ico' && ls ~/'Projects/LostCity-225-EngineTS/src/public/favicon.ico' |
| |
===== Map ===== | ===== Map ===== |
Type=Application | Type=Application |
StartupNotify=false | StartupNotify=false |
Icon=/home/CHANGEME/Projects/LostCity-225-EngineTS/content/textures/painting2.png | Icon=/home/CHANGEME/Projects/LostCity-225-EngineTS/src/public/favicon.ico |
Actions=Map;Server;Update;Saves-Backup;Saves-Folder;Updates-Check;Notes; | Actions=Server;Map;Saves-Backup;Update;Saves-Folder;Updates-Check;Notes; |
| |
| [Desktop Action Server] |
| Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape - Server' -I ~/'Projects/LostCity-225-EngineTS/src/public/favicon.ico' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'" |
| Name=Start Server |
| |
[Desktop Action Map] | [Desktop Action Map] |
Exec='/bin/sh' -c "gio open ~/'Projects/LostCity-225-EngineTS/ext/June_2004_Map.jpg'" | Exec='/bin/sh' -c "gio open ~/'Projects/LostCity-225-EngineTS/ext/June_2004_Map.jpg'" |
Name=World Map | Name=World Map |
| |
[Desktop Action Server] | |
Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape - Server' -I ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'" | |
Name=Start Server | |
| |
[Desktop Action Update] | |
Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape - Updater' -I ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh'" | |
Name=Server Update | |
| |
[Desktop Action Saves-Backup] | [Desktop Action Saves-Backup] |
Exec='/bin/sh' -c "~/'Projects/LostCity-225-EngineTS/scripts/localhost-save-backup.sh'" | Exec='/bin/sh' -c "~/'Projects/LostCity-225-EngineTS/scripts/localhost-save-backup.sh'" |
Name=Save Data Back-up | Name=Save Data Back-up |
| |
| [Desktop Action Update] |
| Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape Updater' -I ~/'Projects/LostCity-225-EngineTS/src/public/favicon.ico' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh'" |
| Name=Server Update |
| |
[Desktop Action Saves-Folder] | [Desktop Action Saves-Folder] |
[Desktop Action Notes] | [Desktop Action Notes] |
StartupNotify=false | StartupNotify=false |
Exec='/bin/sh' -c "gio open 'https://wiki.realmofespionage.xyz/games:bsd:lostcity_225_localhost'" | Exec='/bin/sh' -c "gio open 'https://wiki.realmofespionage.xyz/games:bsd:2004scape_localhost'" |
Name=Installation Notes | Name=Install Notes |
| |
# End</code> | # End</code> |
| |
====== Tests ====== | ====== Tests ====== |
| |
===== favicon.ico ===== | |
| |
* TODO: Download from older commit, put in ''ext'', symlink | |
| |
~/Projects/LostCity-225-EngineTS/src/public/favicon.ico | |
| |
===== LAN ===== | ===== LAN ===== |
su - | su - |
| |
ipfw add '09000' 'forward' '127.0.0.1,8888' 'tcp' from '192.168.1.0/24' 'any' to '192.168.1.0/24' '8888' 'in' | ipfw add '09000' 'allow' 'tcp' from '192.168.1.0/24' 'any' to '192.168.1.0/24' '8888' 'in' |
| |
ipfw delete '09000' | ipfw delete '09000' |
| |