Compiling a mod to run on Linux server.


(NewName) #1

Hi peoples,

I’ve been editing my mod and finally managed to get a server sponsor from NBS. They run on Linux and the binaries I compile with Visual Studio are *.dll, looking at Linux, I see they’re *.so.

I’ve packed up my files inside a .pk3, included my cgame_mp_x86 etc…

Upon launching server using my /mymod folder, the server just crashes and wont respond.

What’s wrong?

What files need to go in this .pk3 and what should be on the server in the folder /mymod?

Currently : mod.pk3 & 2 &.dll’s.

I can launch this mod using .pk3 locally just fine (Windows)

Can anyone explain to me what files go where to launch on an internet server?

Thank you

handle 1: etconsole.log
----------------------
7774 files in pk3 files
Sys_LoadDll(/home/xxx/Danje/49//.etwolf/zombies/qagame.mp.i386.so)... 
Sys_LoadDll(/home/xxx/Danje/49//.etwolf/zombies/qagame.mp.i386.so) failed:
"/home/xxx/Danje/49//.etwolf/zombies/qagame.mp.i386.so: cannot open shared object file: No such file or directory"
Sys_LoadDll(/home/xxx/Danje/49/zombies/qagame.mp.i386.so)... 
Sys_LoadDll(/home/xxx/Danje/49/zombies/qagame.mp.i386.so) failed:
"/home/xxx/Danje/49/zombies/qagame.mp.i386.so: cannot open shared object 


(schnoog) #2

You need to compile your mod either on linux or use a linux toolchain (if available) under VS.


(NewName) #3

I’ve never compiled any code like this in Linux, what do I need to compile the mod in Ubuntu 11?

Cheers.


(Slut) #4

On what code is your mod basing? etpub perhaps?
(or is the mod you made from scratch…)


(NewName) #5

[QUOTE=Slut;392913]On what code is your mod basing? etpub perhaps?
(or is the mod you made from scratch…)[/QUOTE]

From scratch 2.60 SDK. I’ve edited quite a lot of the code. Changed the hud, removed fireteams, leaning changes, scoreboard redesign, fixed common and known bugs before ETpro, physics changes etc…

I’m a Linux noob, and I’ve only ever coded on it once, but that was mainly GUI.

I don’t want to have to start agin and rewrite all of this using the Linux ETSDK. The file sizes are different (in the binary compiled, comparing *.dll to *.so), so I’m assuming a lot of code has changed / not needed?

Or can I simply just use the same code from my current work on the Windows ETSDK and compile exactly the same way, this time producing *.so files?

Cheers:)


(Slut) #6

I could send you my compile scripts if you want. Just PM me with (MSN Contact?) or e-mail address where to send it to.
You probably have to edit some settings but we’l figure that out:)

Oh and you got to have gcc installed.
(just enter gcc in the linux console and you will see if it’s installed or not)


(NewName) #7

[QUOTE=Slut;392915]I could send you my compile scripts if you want. Just PM me with (MSN Contact?) or e-mail address where to send it to.
You probably have to edit some settings but we’l figure that out:)

Oh and you got to have gcc installed.
(just enter gcc in the linux console and you will see if it’s installed or not)[/QUOTE]

Hi Slut, thanks for the information. I’ve inboxed you.


(Radegast) #8

Hi iDan, just to make it clear for you: Linux and windows are not binary compatible, so you cannot compile it exactly the same way. However, you can use the same code (provided that you did not make use of any windows specific functions).

Basically there are two options for you:

[ol]
[li]crosscompile for linux on windows
[/li][li]install a linux distribution within Virtualbox and compile it there
[/li][/ol]


(NewName) #9

[QUOTE=Radegast;392922]Hi iDan, just to make it clear for you: Linux and windows are not binary compatible, so you cannot compile it exactly the same way. However, you can use the same code (provided that you did not make use of any windows specific functions).

Basically there are two options for you:

[ol]
[li]crosscompile for linux on windows[/li][li]install a linux distribution within Virtualbox and compile it there[/li][/ol][/QUOTE]

Hi Radegast, thanks for the reply. I have Ubuntu as dual boot alongside WIndows 7, what shall I do from here?

I’m quite confused and can’t seem to work it out 100%.

Right, so I’ve edited the ETSDK for Windows downloaded from here (http://wiki.splashdamage.com/index.php/Wolfenstein:_Enemy_Territory_SDK)
Wolfenstein: Enemy Territory SDK (Windows) this one

Compiling this produces the 3 *.dll’s needed, and as you know I want these to be *.so, which are for Linux (right?:D).

This is where I’m confused…

If I am to load up Ubuntu, and extract my current Windows SDK edit;
how do I compile it?
Do I not need to use the Linux SDK (in the supplied link above?)
I thought the Windows SDK was for Windows client and server only?

So I can continue writing inside the Windows ETSDK and then boot into Ubuntu and compile it so I get the *.so files and put them onto my Linux server? Or do I have to start again using the Linux SDK?

I’ve added no Windows dependencies to the code, just minor alterations and bug fixes which are all engine based, which I’m guessing aren’t platform dependant?

I think I’m having a blonde moment to be honest, if you could explain this to me, I’d be so thankful :slight_smile:

Thanks man!


(Indloon) #10

Just get Linux to your PC

And get GCC,if you don’t have one :stuck_out_tongue:

I suggest to use ET SDK linux compile scripts,unless you haven’t added new files/directorys/libs/if types.


(Radegast) #11

Wow, they made a different version of the SDK for each platform? I’ve never actually used the ET-SDK, but I bet the only difference is in the installer. Do what Indloon told you to do. First install gcc (compiler) and scons (build system) because, well, you can’t run Visual Studio under linux. Then just open terminal inside the source directory and run “scons”

Edit: to answer your questions: *.so? - yes, need Linux sdk? - no


(rorgoroth) #12

If you decide to use the Linux ET SDK I suggest doing:
./et-linux-2.60-sdk.x86.run --noexec --target wolf-sdk

Rather then mess about with files in stupid places on your system.