games:bsd:wine:2004scape_localhost
This is an old revision of the document!
Table of Contents
cd ~ && mkdir -p ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server' && rm -Rf ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && git clone --branch 'main' --depth '1' --recurse-submodules 'https://github.com/2004Scape/Server.git' ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && sync cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm start --verbose
Information
- 2004Scape Server 1)
2024/10/03: This works but notes are messy
Prerequisites
Resources
Web
- Info post (Jul 3, 2024)
Dependencies
- 2024/10/03: Git (native), Java (win64), NodeJS (win64)
Git
su -l
pkg install git-lite
Java
- Last tested: 2024/10/03:
OpenJDK23U-jdk_x64_windows_hotspot_23_37.msi - All users, all-defaults
~/Downloads/OpenJDK23U-jdk_x64_windows_hotspot_23_37.msi
Install
WINEPREFIX=~/'.wine/2004Scape-Server' WINEARCH='win64' wine ~/'Downloads/OpenJDK23U-jdk_x64_windows_hotspot_23_37.msi'
Node.js
- Last tested: 2024/10/03:
node-v22.9.0-x64.msi
~/Downloads/node-v22.9.0-x64.msi
Install
- 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
gio open ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src'
Extra Deps
2024/10/03: Requires manually moving files
npm Deps
- This is expected to fail at first
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm start --verbose
bcrypt
- Extract from
tar.gz;napi-v3folder goes intobindingfolder
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
- Move
RuneScriptCompiler.jartosrcroot
gio open ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src'
ls ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src/RuneScriptCompiler.jar'
npm
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm run clean --verbose
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm run build --verbose
Quick Commands
Execute
Server
cd ~/'.wine/2004Scape-Server/drive_c/2004Scape-Server/src' && WINEPREFIX=~/'.wine/2004Scape-Server' WEB_PORT='8888' wine npm start --verbose
Client
Everything below TODO
Update
Running
npm run cleanrequires starting the server once afterwards with an internet connection to download packages to start the server for playing offline
git -C "%UserProfile%\Projects\2004scape-server\src" reset --hard && git -C "%UserProfile%\Projects\2004scape-server\src" pull origin "main" --rebase && CD "%UserProfile%\Projects\2004scape-server\src\" && npm run "clean"
"%UserProfile%\Projects\2004scape-server\scripts\localhost-server-update.bat"
Save Data
Back-up
The
tarcommand replacesDownloads\2004Scape-Server-localhost-Saves.tar.gzeach time without back-up or date codes
explorer "%UserProfile%\Projects\2004scape-server\src\data\players\"
tar -cvzf "%UserProfile%\Downloads\2004Scape-Server-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\2004scape-server\src\data" "players"
"%UserProfile%\Projects\2004scape-server\scripts\localhost-save-backup.bat"
Restore
- Expects
Downloads\2004Scape-Server-localhost-Saves.tar.gz5) Backups made from the above batch file need renamed to remove the
%RANDOM%-characters to work as-is for the followingtarcommandThe
DELcommand deletes existing files in thedata\playersfolder
DEL /Q "%UserProfile%\Projects\2004scape-server\src\data\players\*"
tar -xvzf "%UserProfile%\Downloads\2004Scape-Server-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\2004scape-server\src\data" "players"
npm
- Lists available
npmcommands
CD "%UserProfile%\Projects\2004scape-server\src\" && npm run
File Manager
Root
explorer "%UserProfile%\Projects\2004scape-server\src\"
Save Data
explorer "%UserProfile%\Projects\2004scape-server\src\data\players\"
/usr/local/www/wiki/data/attic/games/bsd/wine/2004scape_localhost.1727990099.txt.gz · Last modified: by Sean Rhone
