Changes

How to setup a local QuakeJS server under Windows 10

5,858 bytes added, 17:59, 9 September 2019
no edit summary
#You can test (or run) your server with the following command, but there isn't much point until we setup the Content Server and Play Page. <pre>node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg</pre>
==Setup the UwAmp Web Server, Play Page, & Content Server==If you want to setup a permanent installation you will probably want to install UwAmp as a program on your machine. If you are planning on using it intermittently or just want to test it out, you may want to download the stand-alone ZIP version of UwAmp. Follow either [[Permanent Install]] or [[Standalone Install]] based on your preference. ===Permanent Install===#Visit https://www.uwamp.com/en/?page=download and download the ''exe'' installer#*You might need to download and install the Visual C++ Redistributable as described at the top of the UwAmp download page. If in doubt, download and install it#Run ''UwAmp.exe'' to install the program#You can test the UwAmp Web Server by running the UwAmp program in the Start Menu. When Windows asks, you'll want to allow the ''Apache HTTP Server'' (and optionally ''mysql.d'' although quakejs doesn't use it) through the firewall on Private & Public networks. Then visit ''http://COMPUTER-NAME'' (or ''http://localhost'' or ''http://127.0.0.1''). You should some something that looks like this#Now delete the contents of ''C:\UwAmp\www\''#Copy the contents of ''C:\Users\USERNAME\quakejs\html\'' to ''C:\UwAmp\www\''#If your computer name isn't ''quakejs'' you'll need to [[Changing the Hostname|change your hostname]]#Run the Git Bash program as Administrator by finding '''Git Bash''' in the Start Menu, right clicking on it, and selecting '''Run as administrator'''##run the following command to move to the web root directory<pre>cd C:/UwAmp/www/</pre>#run the following command to download all of the Content Server files<pre>./get_assets.sh</pre>#run the following command to close Git Bash<pre>exit</pre> ===Standalone Install===#Visit https://www.uwamp.com/en/?page=download and download the ''zip'' installer#*You might need to download and install the Visual C++ Redistributable as described at the top of the UwAmp download page. If in doubt, download and install it#Extract the contents of the ZIP (UwAmp folder) to ''C:\Users\USERNAME\''#You can test the UwAmp Web Server by running ''C:\Users\USERNAME\UwAmp\UwAmp.exe''. When Windows asks, you'll want to allow the ''Apache HTTP Server'' (and optionally ''mysql.d'' although quakejs doesn't use it) through the firewall on Private & Public networks. Then visit ''http://COMPUTER-NAME'' (or ''http://localhost'' or ''http://127.0.0.1''). You should some something that looks like this#Now delete the contents of ''C:\Users\USERNAME\UwAmp\www\''#Copy the contents of ''C:\Users\USERNAME\quakejs\html\'' to ''C:\Users\USERNAME\UwAmp\www\''#If your computer name isn't ''quakejs'' you'll need to [[Changing the Hostname|change your hostname]]#Run the Git Bash program as Administrator by finding '''Git Bash''' in the Start Menu, right clicking on it, and selecting '''Run as administrator'''##run the following command to move to the web root directory<pre>cd C:/Users/USERNAME/UwAmp/www/</pre>#run the following command to download all of the Content Server files<pre>./get_assets.sh</pre>#run the following command to close Git Bash<pre>exit</pre> ==Make the QuakeJS Game Server run at Boot==In a permanent install you may want to make the QuakeJS Game Server run when you boot the machine and log in. Follow these steps to create a Schedule Task to run the server any time your user logs in #Run '''Task Scheduler''' from the Start Menu#click '''Create Task...''' on the right##On the '''General''' tab fill in the following information##*'''Name:''' QuakeJS Server##*'''Description:''' Task to start QuakeJS server in DM mode##*check '''Run with highest privileges'''##*'''Configure For:''' Windows 10##On the '''Triggers''' tab click '''New...''', fill in the following information, and click '''OK'''##*'''begin the task: At log on'''##*click '''Specific user''' and select your user##On the '''Actions''' tab click '''New...''', fill in the following, and click '''OK'''##*'''Program/script:''' "C:\Program Files\nodejs\node.exe"##*'''Add arguments (optional):''' build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg##*'''Start in (optional):''' C:\Users\USERNAME\quakejs##On the '''Conditions''' tab optionally uncheck '''Start the task only if the computer is on AC power''##On the '''Settings''' tab uncheck '''Stop the task if it runs longer than:'''##click '''OK''' ==Create a Game Server Shortcut==If you are going to run your server intermittently you may want to create a shortcut to launch it. Follow these steps to put a shortcut on your desktop that will launch the game server. #Right click on the desktop (or in any folder you want the shortcut to live in) and click '''New''' and then '''Shortcut'''#In the '''Type the location of this item:''' enter<pre>%comspec% /k cd C:\Users\USERNAME\quakejs && node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg</pre>#click '''Next'''#enter a name like '''QuakeJS Game Server'''#click '''Finish''' ==Turning on and off the UwAmp Serve==Simply run C:\Users\USERNAME\UwAmp\UwAmp.exe, or UwAmp program in the Start Menu, to start the server and close it to stop it (you can also start stop with the buttons on the UwAmp GUI once it's running) ==Turning on and off the Game Server==Run the shortcut you created on the desktop or go into '''Task Scheduler''' and run the '''QuakeJS Sever''' task manually to start the server. Close the window that pops up to stop it. ==Changing the Hostname==If you want to use a hostname other than "quakejs" you'll need to update the line <pre>var args =['+set', 'fs_cdn', 'quakejs:80', '+connect', 'quakejs:27960']; //custom args list targeting a local content server and local game server both at the address 'quakejs'</pre> in <pre>/var/www/html/index.html</pre> to your new hostname (instead of quakejs).