Both sides previous revisionPrevious revision | |
games:bsd:wine:2004scape_localhost [2024/10/20 21:13] – Sean Rhone | games:bsd:wine:2004scape_localhost [2024/11/21 17:44] (current) – Works fine without Wine now Sean Rhone |
---|
====== Information ====== | |
| |
* 2004Scape Server ((https://github.com/2004Scape/Server)) | |
* :!: ''no-dev-watcher'' Branch ((https://github.com/2004Scape/Server/tree/no-dev-watcher)) | |
* TODO: Test ''main'' branch after [[https://github.com/2004Scape/Server/commit/d30ddb38820aec522cd391d2d57f69f354ce955f|d30ddb3]] | |
| |
* These notes provide a local singleplayer server for 2004Scape ((RSPS/RuneScape Private Server based on cache ''225'' from May 18th, 2004)) on FreeBSD 14.1 ((Server runs in Wine)) | |
| |
===== Prerequisites ===== | |
| |
* [[bsd:freebsd_14.1_xfce|FreeBSD 14.1 (Xfce)]] | |
| |
===== Resources ===== | |
| |
* [[https://www.2004scape.org/img/rs2/worldmap/worldmap2.jpg|World Map]] | |
| |
==== Web ==== | |
| |
* [[https://github.com/2004scape/Server/wiki/Feature-Complete-Progress|Feature Complete Progress]] | |
* [[https://github.com/orgs/2004Scape/projects/3|Progress - Quests]] | |
* [[https://github.com/orgs/2004Scape/projects?query=is%3Aopen|Projects List]] | |
| |
* [[https://rune-server.org/threads/lost-city-225-emulation.701698/|Rune-Server Forums]] | |
* [[https://rune-server.org/threads/lost-city-225-emulation.701698/page-4#post-5805881|Info post]] (Jul 3, 2024) | |
| |
====== Dependencies ====== | |
| |
* https://github.com/2004Scape/Server?tab=readme-ov-file#getting-started | |
* https://github.com/2004Scape/Server?tab=readme-ov-file#environment-dependencies | |
| |
* 2024/10/03: Git (native), Java (win64), NodeJS (win64) | |
| |
===== Git ===== | |
| |
su -l | |
| |
pkg install git-lite | |
| |
===== Java ===== | |
| |
* https://adoptium.net/temurin/releases/?os=windows&arch=x64&version=23 | |
| |
* Last tested: 2024/10/03: ''OpenJDK23U-jdk_x64_windows_hotspot_23_37.msi'' | |
* All users, all-defaults | |
| |
WINEPREFIX=~/'.wine/2004Scape-Server' WINEARCH='win64' wine ~/'Downloads/OpenJDK23U-jdk_x64_windows_hotspot_23_37.msi' | |
| |
===== Node.js ===== | |
| |
* https://nodejs.org/en/download/prebuilt-installer | |
| |
* Last tested: 2024/10/03: ''node-v22.9.0-x64.msi'' | |
* Node.js runtime, npm package manager, Add to PATH (corepack manager and Online documentation not required) | |
* Tools for Native Modules not required (leave "Automatically install the tools" unchecked) | |
| |
WINEPREFIX=~/'.wine/2004Scape-Server' WINEARCH='win64' wine ~/'Downloads/node-v22.9.0-x64.msi' | |
| |
====== Download Source ====== | |
| |
**** | |
| |
cd ~ && mkdir -p ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server' && rm -Rf ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && git clone --branch 'no-dev-watcher' --depth '1' --recurse-submodules 'https://github.com/2004Scape/Server.git' ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && sync | |
| |
====== Extra Deps ====== | |
| |
* :!: 2024/10/03: Requires manually moving files | |
| |
===== npm Deps ===== | |
| |
* :!: This is expected to fail at first ((''bcrypt'' lib and RuneScript Compiler not found)) | |
| |
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm start | |
| |
===== bcrypt ===== | |
| |
* https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.1.1/bcrypt_lib-v5.1.1-napi-v3-win32-x64-unknown.tar.gz | |
* Extract from ''tar.gz''; ''napi-v3'' folder goes into ''binding'' folder | |
| |
mkdir -p ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src/node_modules/bcrypt/lib/binding' | |
| |
gio open ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src/node_modules/bcrypt/lib/binding' | |
| |
ls ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node' | |
| |
===== Runescript Compiler ===== | |
| |
* https://github.com/2004Scape/RuneScriptCompiler/releases/download/19/RuneScriptCompiler.jar | |
* Move ''RuneScriptCompiler.jar'' to ''src'' root | |
| |
gio open ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' | |
| |
ls ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src/RuneScriptCompiler.jar' | |
| |
===== npm Build ===== | |
| |
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' wine npm run 'clean' | |
| |
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' wine npm run 'build' | |
| |
====== Quick Commands ====== | |
| |
===== npm Flags ===== | |
| |
* ''--verbose'' can be put at the end of ''npm'' commands | |
| |
<code>--verbose</code> | |
| |
===== Execute ===== | |
| |
==== Server ==== | |
| |
**** | |
| |
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm start | |
| |
==== Client ==== | |
| |
* http://localhost:8888 | |
| |
===== Update ===== | |
| |
* https://github.com/2004Scape/Server/commits/no-dev-watcher | |
* :!: Running ''npm run clean'' requires starting the server once afterwards with an internet connection to download packages to start the server for playing offline | |
| |
git -C ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' reset --hard && git -C ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' pull origin 'no-dev-watcher' --rebase && cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' wine npm run 'clean' | |
| |
===== npm ===== | |
| |
* Lists available ''npm'' commands | |
| |
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' wine npm run | |
| |
===== File Manager ===== | |
| |
==== Root ==== | |
| |
**** | |
| |
gio open ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' | |
| |
==== Save Data ==== | |
| |
**** | |
| |
gio open ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src/data/players' | |
| |
====== Other Notes ====== | |
| |
* Oracle's Java didn't add ''java'' to PATH on ''wine''; Adoptium's is fine | |
* :?: Node module ''bcrypt'' reportedly has a pre-built ''win64'' module that //should// auto-download? | |
* Port ''8888'' is what Node on *nix does, and when this was tested on Fedora 41 the default ''80'' Windows port (''wine'') couldn't be opened due to lower Linux ports being system-reserved | |
* ''RuneScriptCompiler.jar'' had to be tag ''19'' (''17'' failed) | |
* :!: TODO: Desktop launchers, saves back-up | |
| |