Page 2 of 3

Posted: 01 Dec 2006, 04:39
by CautionToTheWind
Ok, i've redone all the steps from scratch after cleaning up the previous attempt and now it works flawlessly. Thanks for the help, Det.

Posted: 01 Dec 2006, 13:54
by nicko117
Hum ...

Launching of native spring seems to work, but it doesn"t use the command line parameter:

In fact I get the game launched as if I launched it with "spring" (linux) only.

> ./spring

I have the screen where I must choose the script to run, then the map and the mod ...

Where is my fault ....

Posted: 01 Dec 2006, 13:58
by CautionToTheWind
It seems spring is missing a file called script.txt. You have to link it from the windows lobby client directory to the linux native spring directory. Look for that step in det's instructions and make sure you did it right.

Posted: 01 Dec 2006, 14:19
by Kloot
Yes, simply create a symlink script.txt inside the directory from which Spring reads its files (SpringData in .springrc) to the actual script.txt that gets generated by TASClient.

Posted: 01 Dec 2006, 18:10
by nicko117
Yes !

Nice it works now :)

Thank you a lot.

PS: but there is a little problem when using bot. The AI files are named ".dll" in script.txt, so the file isn't found when running the native linux. I'll try to symlink my .so to fake .dll to see what it do ...

Posted: 01 Dec 2006, 19:50
by det
Let me know if sym-linking the .dll to the .so works. If it does, I will add it to the guide.

Posted: 01 Dec 2006, 20:03
by imbaczek
Adding some logic to the dummy spring.exe (modifying script.txt) should work, right?

Posted: 01 Dec 2006, 22:56
by Kloot
Well, in order to properly replace each "AiDLL=\a\b\c\myAI.dll" reference with one like "AiDLL=/d/e/f/myAI.so", you would first need to know Spring's data directory. However, opening ~/.springrc or $HOME/.springrc to read the SpringData line is problematic because fopen() does not expand the tilde or variable (that's the shell's job), and since stuff like chdir("~") or getenv("HOME") doesn't work as normal under Wine (getenv("PATH") returns "c:\windows\system32;c:\windows" for example), there's a minor roadblock. :)

Edit: scratch all that, getenv("user") does the trick. :)

Edit2: here is a modified version of the Spring dummy binary plus source, please let me know if it crashes or otherwise misbehaves. :)

Posted: 02 Dec 2006, 21:18
by imbaczek
That works well, thanks :)

Posted: 03 Dec 2006, 16:53
by trepan
For those of you running TASClient in wine...

If you find that TASClient is misbehaving, and ignoring that which
your window manager would have it do; stick it in a box. I found that
TASClient (in wine), ignores its virtual screen assignment, and is
generally annoying, so I started up an Xserver within my Xserver:

Code: Select all

Xnest :1
And then put TASClient in that server.

Code: Select all

DISPLAY=:1 wine TASClient
P.S. I also have a custom server/client set written that allows you
to escape from a 32-bit chroot to a 64-bit native executable space.
The mingw32 compiled Spring.exe sends the entire starting script
to the server (daemon). With very little work, you could have the
TASClient run on a real (separate) windows box, and clients on a
linux box (although I can't really see any reason for that :-)

Posted: 03 Dec 2006, 17:36
by Kloot
well, I can: total independence from Wine ;)

Posted: 03 Dec 2006, 17:38
by imbaczek
Yeah, hollowsoul could use some help with the lobby :)

Posted: 04 Dec 2006, 19:53
by kujeger
EDIT: With the newest version of the windows lobby, this doesen't work anymore.
edit again: http://spring.clan-sy.com/phpbb/viewtop ... 940#160940

Unless I'm missing something there's no need for a faked spring.exe.

First, install spring with wine. Substitute ~/.wine/drive_c/games/TASpring/ for wherever you install it to.
Substitute ~/games/spring for wherever you put the ./game/ dir after you compiled spring-linux.

Then, let's copy over TASClient.

Code: Select all

cd ~/games/spring
cp ~/.wine/drive_c/games/TASpring/TASClient.exe ./
cp ~/.wine/drive_c/games/TASpring/DevIL.dll ./
cp ~/.wine/drive_c/games/TASpring/MSVCP71.DLL ./
cp ~/.wine/drive_c/games/TASpring/MSVCR71.dll ./
cp ~/.wine/drive_c/games/TASpring/unitsync.dll ./
cp ~/.wine/drive_c/games/TASpring/zlibwapi.dll ./
Then, the (non-free) datafiles.

Code: Select all

cp ~/.wine/drive_c/games/TASpring/base -r ./
cp ~/.wine/drive_c/games/TASpring/maps -r ./
cp ~/.wine/drive_c/games/TASpring/mods -r ./
and lastly we make a symbolic link.

Code: Select all

ln -s ./spring ./spring.exe
wine TASClient.exe
and you're good to go. Or should be anyway, I tried a small match against myself between spring-linux and spring-wine and it worked fine as far as I could see.

edit: Assuming 32-bit here.

Posted: 04 Dec 2006, 22:17
by Kloot
^^ Confirmed to work on amd64.

Posted: 05 Dec 2006, 09:53
by nicko117
Oh btw, I confirme also, that symlink the AI*so to fake AI*dll work. At least for AAI.so which is the only one which is avaiblable/compiled with SVN.

> ln -s AII.so AII.dll

Posted: 18 Jan 2007, 22:52
by Nonor
All this is working, yes, but I have a problem... Is it me, or is the linux version slower than the windows one ?
I don't know if this has anything to do with the windows lobby emulation via wine, but my game is quite slower under linux as soon as there's a lot of units and/or animation on the map. I've already reniced the "TASClient.exe" process to 19.
This annoys me a lot. Is that a known problem ?

Posted: 18 Jan 2007, 23:37
by own3d
did you not compile it with optimisations?

or worse did you do a debug ;) ?

Posted: 18 Jan 2007, 23:43
by Nonor
hemmm.... I tried with a svn version that i had compiled myself. And YES I didn't compile it with optimisations.... :-/
How can i do that pleeeease ? :-)

Posted: 19 Jan 2007, 00:16
by hollowsoul

Code: Select all

scons optimize=2

Posted: 19 Jan 2007, 01:26
by Nonor

Code: Select all

profiling NOT enabled, debugging NOT enabled, level 2 optimizing enabled
Looks like it was alright... :-/
For all of you, linux version is working as fast as windows version ?