Mac OS X Deticated Server

Post here if you need help setting up your server, etc.
Invader
Average Program
Posts: 78
Joined: Sat Apr 17, 2004 3:52 am
Location: Newfoundland, Canada

Mac OS X Deticated Server

Post by Invader »

I have the linux version of armgetron installed well sort of...i did the ./install but now i want to start the deticated server so in the bin folder of my deticated server i try and excute armagetron-dedicated....serverstarter-armagetron and starter but in my Terminal it says
./starter: /Games/server/bin/armagetron-dedicated: cannot execute binary file
also where do i go to configure my deticated server settings.
Invader
Invader
Average Program
Posts: 78
Joined: Sat Apr 17, 2004 3:52 am
Location: Newfoundland, Canada

Post by Invader »

Im happy that im almost done my Mac OS X version of a Deticated Server using the Linux Deticated Server package. I have it all installed exept when i want to start the server and use i dont no um....starter you know. Im using the Mac Terminal and when i execute that file i get "Cannot Execute Binary File"

What can I do?

PLZ REPLY lol
Invader
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

great work!

hmm i've read something about OSX dedicated servers somewhere else on the forum - you should do a search for it, pool resources etc :D
Invader
Average Program
Posts: 78
Joined: Sat Apr 17, 2004 3:52 am
Location: Newfoundland, Canada

Post by Invader »

Yeah...as soon as i can find out why my Terminalw ont run the binary It will be working...and when it does I will relese a Mac OSX Deticated Server version with easy insttuctions :)

NOw iv come this far all I need is for my damn terminal to runt he files lol

so if u find anything let me no :)

ps. here http://armagetron.sourceforge.net/compa ... _unix.html

for Binary it has a "-" meaning Not supported could that be why?
Invader
User avatar
Marrow
MVP - Project Contributor
Posts: 1655
Joined: Mon Jan 19, 2004 9:05 am
Location: New York

Post by Marrow »

Im using the Mac Terminal and when i execute that file i get "Cannot Execute Binary File"
This is because you are improperly trying to run a linux ELF binary on a Mac OS X system. Mac OS X cannot run ELF binaries.

Even though Mac OS X is based on FreeBSD, it does not support linux emulation like native FreeBSD. Everytime I want to run a linux program in FreeBSD, I have to make sure I have loaded the proper kernel module to accomplish the task.

Furthermore, running the linux ELF binary of Armagetron is difficult because of many missing dependency libraries. You can install them if you like (which I have done in the past), but this is unnecessary.

Better solution: compile the source code from scratch to make binaries compatible with your system.

Also, since you are only using the dedicated server portion of Armagetron, before compiling, use the "--disable-glout" flag to prevent error messages about missing graphics dependencies.
Invader
Average Program
Posts: 78
Joined: Sat Apr 17, 2004 3:52 am
Location: Newfoundland, Canada

Post by Invader »

im no expert at binary so is there a program that can convert the ELF binary files to a compatable mac (Unix) file

EDIT: Im runnign Mac OSX....X11 for the Mac OSX

listin to this:
Easy to port X11 applications
With the complete suite of the standard X11 display server software, client libraries and developer toolkits, X11 for Mac OS X makes it even simpler to port Linux and Unix applications to the Mac. Based on XFree86 4.2.1, X11 for Mac OS X gives you a complete, rootless X11R6.6 implementation, as well as display server and client libraries — plus headers in the SDK. X11 for Mac OS X supports ssh tunnelling for secure display sharing. You can download all the common toolkits from OpenDarwin.org.
would that help? if so ill get X11
Invader
User avatar
Zapple
Shutout Match Winner
Posts: 876
Joined: Sun Mar 07, 2004 2:42 am
Location: Halo 2
Contact:

Yup

Post by Zapple »

He has been talking to me about this, and I am on Mac, I dont understand a thing exept Mac OS X, lol, and to belive that he is one year older then me, 13, amazing.
User avatar
Marrow
MVP - Project Contributor
Posts: 1655
Joined: Mon Jan 19, 2004 9:05 am
Location: New York

Post by Marrow »

I know of no such program that can magically change an ELF binary into a Mac OS X binary. However, if you find one, let me know.

The reason I believe no such program exists is because Mac OS X uses the Mach-O and PEF binary file formats. Its dyld, the dynamic linker (Mac OS X analog of ld.so) and CFM (Code Fragment Manager) use these formats, respectively. While the linux operating system kernel executes ELF binaries through execve(), Mac OS X kernel does not.

However, you might be able to port Armagetron to Mac OS X using the tools you described above.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Why not try and contact the guy that did the mac osx port? I bet he'd know...
Image
User avatar
TiS
On Lightcycle Grid
Posts: 33
Joined: Sat Jun 18, 2005 8:24 pm
Location: Somewhere

Post by TiS »

I downloaded the Mac OSX deticated server version of sorcefourge and there is no terminal, theres an armagetron file but it does not open, I'd like to set up a sever that has already been created and was transfered by a friend but i cannot set it up with the download from sorcefouge. Should i get a different download, or why wont it create the Armagetron Advaced terminal deal? Maybe a short walkthough is in order. :?:
Don't sweat the petty thangs, pet the sweatty thangs.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

Code: Select all

cd /path/to/the/armagetron-dedicated-folder
./Armagetron
or, you can add that folder to your path, and just type Armagetron. Hmm, maybe I should have changed the binary to armagetron-dedicated. Next release, ;)

And response to the original topic, the linux dedicated binary obviously won't work because its compiled for i386, not ppc.
User avatar
TiS
On Lightcycle Grid
Posts: 33
Joined: Sat Jun 18, 2005 8:24 pm
Location: Somewhere

Post by TiS »

how do a get a terminal in the game for OS x?
Don't sweat the petty thangs, pet the sweatty thangs.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

Open up the Terminal application. Now type "cd " <-- notice the space, and drag the armagetron-dedicated folder onto the terminal window. It now should show "cd /path/to/the/arma-dedicated-folder. Hit enter. Now type "./Armagetron" and it will run.
c|ever
Posts: 3
Joined: Tue Nov 01, 2005 12:58 am

Post by c|ever »

When trying that, I get the following error:
Error in int main(int, char**) in ../src/tron/gArmagetron.cpp:376 :
var directory not writable or does not exist. Don't start Armagetron directly, use the wrapper script in /usr/local/bin.
User avatar
joda.bot
Match Winner
Posts: 421
Joined: Sun Jun 20, 2004 11:00 am
Location: Germany
Contact:

Post by joda.bot »

@clever: Your problem is that you don't run Armagtron from the directory it's contained in.

This is my PM form microbus city... hope it helps.
joda's mini tutorial wrote: The "2.7.1 dedicated server" is a compressed archive, which has to be extracted and started from a terminal (see /Applications/Utility/Terminal)

Once you open a terminal you have to change into the directory where you extracted the archive to (using StuffIt or something similiar).

This can be done by typing "cd " and draggin the folder on the terminal.
afterwars you'll have to call armagetronad, and then the server will start.
Note: In a terminal each command has to be terminated with a return to run it.

Code: Select all

Last login: Tue Nov  1 11:54:10 on console
Welcome to Darwin!
macjoda:~ joda$ cd Documents/Armagetron\ 0.2.7.1\ dedicated\ server/
macjoda:~/Documents/Armagetron 0.2.7.1 dedicated server joda$ ./Armagetron
[0] Connecting to master server...
[0] Login information sent. Waiting for reply..
[0] Login Succeeded. User Nr. 1
[0] syncing with server...
[0] Relabeling NetObjects...
[0] syncing again...
[0] Done!
[0] Sending my server info...
[0] Logging out...
[0] Done!
[0] Killing user 0, ping 10.
[0] Ping charity changed from 100 to 100100.
[0] Nobody there. Taking a nap...
[0] Timestamp: 2005/11/01 16:52:34
^C
macjoda:~/Documents/Armagetron 0.2.7.1 dedicated server joda$
The "^C" is printed because I terminated the server by pressing CTRL+C... You should always type "quit" as the server will do complete shutdown then.

You'll usually want to modify the settings of the server before you start it.
Your changes(!) of the default configuration should go in to a file called "autoexec.cfg" which has to be put into the "config" subfolder.
You should not copy all the settings from "settings.cfg" (also in the "config" folder") to the new file, but you can if you prefer that.

This is a simple example to remove the server from the master server list:
Code:

Code: Select all

macjoda:~/Documents/Armagetron 0.2.7.1 dedicated server joda$ echo "TALK_TO_MASTER 0" > config/autoexec.cfg
macjoda:~/Documents/Armagetron 0.2.7.1 dedicated server joda$ cat config/autoexec.cfg
TALK_TO_MASTER 0
Note: You can/should use a TextEditor to create and edit the "autoexec.cfg".

The file behaves like a list of console commands. So you can use all the usual commands and also those in "config/settings*.cfg".

I hope you can follow the mini tutorial.
Jochen (joda)
Post Reply