Author Topic: Standalone OSX Server  (Read 3990 times)

andrew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 44
    • View Profile
Standalone OSX Server
« on: February 27, 2013, 05:31:23 PM »
Is there a prebuilt standalone OSX server?

If not, what're the steps to build one.  Thanks.

tehshawn

  • Guest
Re: Standalone OSX Server
« Reply #1 on: February 27, 2013, 05:49:45 PM »
There is not a prebuilt one, here is what I did:
  • Find the TNetServer.zip file that came with the asset store package and extract it somewhere.
  • In the place where you extracted it, Create an "Assets" folder, and within that create a "TNet" folder.
  • Copy the folders "Common" and "Server" from the asset store package into the TNet folder you just created.
  • Open up TNServer.sln with MonoDevelop, ensure you are in "Release" mode and hit build.

As with any mono application if you want to run it when not using the MonoDevelop IDE, cd to the file in the Terminal and type "mono yourApp.exe".
Also note that MonoDevelop doesn't block when it hit's a "ReadLine" or "ReadKey", so if you try testing it in the IDE it will hit an infinite loop where the server is waiting for you to press q to quit.

andrew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Standalone OSX Server
« Reply #2 on: February 27, 2013, 05:56:35 PM »
Thanks.. I'll give it a try.

tehshawn

  • Guest
Re: Standalone OSX Server
« Reply #3 on: February 27, 2013, 05:59:20 PM »
One more thing... I happened to grab a regular copy of MonoDevelop from MonoDevelop.com today on one of my machines... I noticed they are rebranding MonoDevelop as Xamarin Studio... so that is what actually got installed. I had to (strangely) open Project > TNServer Options window and hit OK before the project would compile properly.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Standalone OSX Server
« Reply #4 on: February 27, 2013, 08:37:16 PM »
The compiled .EXE is a mono executable, so you can run it on OSX or Linux using "mono TNServer.exe"

andrew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Standalone OSX Server
« Reply #5 on: February 27, 2013, 08:41:41 PM »
Even easier.. Thanks :)

andysaunders

  • Guest
Re: Standalone OSX Server
« Reply #6 on: May 23, 2013, 04:33:34 PM »
how do i get the server to run on osx, i can build and run in mono, but to run outside of this I've tried as above and cd to the file in Terminal and type

mono TNetServer.exe and i get this

-bash: mono: command not found

What am i doing wrong?

Jackazilion

  • Guest
Re: Standalone OSX Server
« Reply #7 on: May 23, 2013, 06:38:37 PM »
You simply need the mono framework,
http://www.go-mono.com/mono-downloads/download.html