Raised This Month: $186 Target: $400
 46% 

Source Dedicated Server for Mac OS X


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 06-02-2011 , 02:48   Source Dedicated Server for Mac OS X
Reply With Quote #1

Since Valve has decided not to release SrcDS for OS X, I took things into my own hands.

I noticed that a "dedicated.dylib" binary was included for most available Source engine games. This binary is what handles the logic for dedicated servers. I hoped that I could do something with it and I have -- but not without a lot of hacks.

My primary motivation for this was to make testing easier (for Metamod:Source and SourceMod). I find it nice to be able to develop and test without needing to run the full games on listen servers. This also has the advantage of being able to run inside a virtual machine that lacks the necessary hardware acceleration.

Hopefully someone else out there will find this useful. If you have any problems or questions, feel free to post them.

Download
Requirements
  • macOS 10.9 or later
  • One of the supported games listed below

Supported Games
  • Counter-Strike: Global Offensive
  • Counter-Strike: Source
  • Day of Defeat: Source
  • Day of Infamy
  • Garry's Mod
  • Half-Life Deathmatch: Source
  • Half-Life 2: Deathmatch
  • Insurgency
  • Left 4 Dead
  • Left 4 Dead 2
  • Nuclear Dawn
  • Source SDK Base 2013 Multiplayer Mods
  • Team Fortress 2

Source Code
Special Thanks
  • pRED: Created CDetour
  • psychonic: Checked dyld symbols on version 10.5 and tested under virtual machine
  • Fyren: Pasted some vital output from srcds and gdb on Linux
  • Open Steamworks
  • Udis86 by Vivek Thampi

General Guidelines

There are essentially two options for running a server. You could run it directly from the game's install directory in SteamApps (usually ~/Library/Application Support/Steam/SteamApps/common/<game>). Or you may opt to have a separate copy of the game by copying it either from the SteamApps/common directory or from a SteamCMD install.

Once you have downloaded the package, place the srcds-cli.bundle and srcds.sh files from it into the server's root directory.

Counter-Strike: Source Example
  • Note: The Library folder may be hidden in Finder by default. To get there you can either use Finder's Go menu while holding the Option/Alt key or you can unhide it semi-permanently it by running the following Terminal command:
    Quote:
    chflags nohidden ~/Library
    You may have to reapply this nohidden flag after a macOS update.

Once the files from the package have been extracted/copied, you can run the server by navigating to the server root directory in Terminal:
Quote:
cd ~/Library/Application\ Support/Steam/SteamApps/common/Counter-Strike\ Source/
Then you can start the server by running srcds.sh with the game name, map, and any other options you'd like:
Quote:
./srcds.sh -game cstrike +map de_dust -maxplayers 16 +log on
Example Server Output

Extra Command Line Options of Note
  • -32 : Force the 32-bit version of the dedicated server to run instead of the 64-bit one. This option currently only applies to Day of Infamy.
  • -nosteamupdate : Disable automatic download and updating of Steam libraries. It is highly recommended NOT to use this unless you are having problems or Steam download servers are down.
  • -noupdate : Disable automatic update of srcds binaries. It is highly recommended NOT to use this unless you are having problems or are stuck on "Checking for srcds updates..."
  • -steambeta : Switch to beta branch for Steam libraries. Much like you can switch your Steam client to opt into the beta version, you can also use the beta version of Steam libraries with your server. Unless you having problems or there is something specific you need from the beta version, you probably don't want this either.
Note on Counter-Strike: Global Offensive

The game is now 64-bit on macOS. The latest development builds of Metamod:Source and SourceMod will run on this.

Note on Insurgency

You may use the client install of the game to run a server, but Mac binaries are also included in the dedicated server install. You can download this by using steamcmd with appid 237410. Alternatively, you can get it in the Tools section of the Steam client where it's currently labeled Insurgency Dedicated Server.

Notes on Day of Infamy

Like Insurgency, you may use the client install of the game to run a server, but Mac binaries are also included in the dedicated server install. You can download this using steamcmd and appid 462310.

Also note that a 64-bit version of this now exists and is the one that runs by default. Metamod:Source and SourceMod currently do not run on this, but they should in the near future. So if you need to continue running the 32-bit version, make sure you add -32 to your command line.

Last edited by DS; 12-22-2017 at 11:03. Reason: Revamped for srcds-nx
DS is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:12.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode