Page 1 of 3

HOWTO: Play using the Windows lobby with native executable

Posted: 30 Nov 2006, 01:52
by det
Today made a replacement spring.exe that would launch /usr/games/spring with the same arguments it received. I can now play using the windows lobby under wine and the native Linux executable for the game! Here are some instructions for setting this up from scratch. You must do this from scratch. if you have it installed in wine already, move or delete the directory. I also assume you have all the dependancies for compiling spring.

Check out Spring 0.74b1 from subversion

Code: Select all

cd
svn co https://taspring.clan-sy.com/svn/spring/tags/taspring_0.74b3 spring_0.74b3
Configure and Compile native executble

Code: Select all

cd spring_0.74b3
scons configure
scons
Install native executable and content

Code: Select all

cp -fR game ~/spring-data
echo SpringData=~/spring-data >> ~/.springrc
sudo mv -f ~/spring-data/spring /usr/games/spring
Install Windows executable and content

Code: Select all

wget http://taspring.clan-sy.com/dl/spring_0.74b3.exe
wine spring_0.74b3.exe
Don't know why this is neccesary

Code: Select all

ln -s ~/.wine/drive_c/Program\ Files/Spring/ ~/.wine/drive_c/Program\ Files/TASpring
Install OTA Content

Code: Select all

cp ~/.wine/drive_c/Program\ Files/Spring/base/otacontent.sdz ~/spring-data/base/
cp ~/.wine/drive_c/Program\ Files/Spring/base/tacontent_v2.sdz ~/spring-data/base/
cp ~/.wine/drive_c/Program\ Files/Spring/base/tatextures_v062.sdz ~/spring-data/base/
Set symlinks to share maps, mods and demos from native install

Code: Select all

mv -f ~/.wine/drive_c/Program\ Files/Spring/maps/* ~/spring-data/maps/
mv -f ~/.wine/drive_c/Program\ Files/Spring/mods/* ~/spring-data/mods/
rm -rf ~/.wine/drive_c/Program\ Files/Spring/mods/
rm -rf ~/.wine/drive_c/Program\ Files/Spring/maps/
ln -s ~/spring-data/mods/ ~/.wine/drive_c/Program\ Files/Spring/mods
ln -s ~/spring-data/maps/ ~/.wine/drive_c/Program\ Files/Spring/maps
ln -s ~/spring-data/demos/ ~/.wine/drive_c/Program\ Files/Spring/demos
ln -s ~/.wine/drive_c/Program\ Files/Spring/script.txt ~/spring-data/
Install replacement spring.exe

Code: Select all

wget http://www.detriment.org/spring.exe
mv -f ~/.wine/drive_c/Program\ Files/Spring/spring.exe ~/.wine/drive_c/Program\ Files/Spring/spring.exe.old
mv -f spring.exe ~/.wine/drive_c/Program\ Files/Spring/spring.exe

Posted: 30 Nov 2006, 02:16
by Chojin
Very nice, det :)

Would you please share the source code of your spring.exe ?

Posted: 30 Nov 2006, 02:18
by trepan
There's one catch for users with 64-bit kernels,
they're probably running wine chroot'ed.

Posted: 30 Nov 2006, 02:25
by det
Chojin wrote:Very nice, det :)

Would you please share the source code of your spring.exe ?
Sure: http://www.detriment.org/spring.c
Compiled with: i586-mingw32msvc-gcc spring.c -o spring.exe
The code is mostly copied from an MSDN example.

Posted: 30 Nov 2006, 02:29
by Kloot
clever :]

Posted: 30 Nov 2006, 02:34
by onlinepancakes
I followed the guide and it seems to work :) Can join the lobby and start a game, just when spring starts, I get this error:

Code: Select all

Luxi.ttf: FT_New_Face failed: no error
Also, you may want to fix this in the guide from this:

Code: Select all

ln -s /home/chris/.wine/drive_c/Program\ Files/Spring/script.txt /home/chris/spring-data/
To this:

Code: Select all

ln -s ~/.wine/drive_c/Program\ Files/Spring/script.txt ~/spring-data/
:P

Posted: 30 Nov 2006, 03:02
by det
onlinepancakes wrote:I followed the guide and it seems to work :) Can join the lobby and start a game, just when spring starts, I get this error:

Code: Select all

Luxi.ttf: FT_New_Face failed: no error
Do you have SpringData=YOURHOMEDIR/spring-data in ~/.springrc?
onlinepancakes wrote: Also, you may want to fix this in the guide from this:

Code: Select all

ln -s /home/chris/.wine/drive_c/Program\ Files/Spring/script.txt /home/chris/spring-data/
To this:

Code: Select all

ln -s ~/.wine/drive_c/Program\ Files/Spring/script.txt ~/spring-data/
:P
Oh, thanks, done :)

Posted: 30 Nov 2006, 03:31
by det
I found the problem, I had "echo echo SpringData=~/spring-data >> ~/.springrc", rather than 'echo SpringData=~/spring-data >> ~/.springrc" in the HOWTO.

Posted: 30 Nov 2006, 03:47
by onlinepancakes
Thanks :) This fully works for me now :) Great guide! Easy and quick to get things done, and fully working :)

Posted: 30 Nov 2006, 14:52
by CautionToTheWind
YES!

Posted: 30 Nov 2006, 14:52
by imbaczek
Thanks for the howto. I've done this a little bit differently, as I dual boot and didn't want to have any files duplicated and also have my proper win32 spring.exe working.

Here's what I did:

Code: Select all

cd win32/spring/dir/
cp spring.exe spring.exe.win32
wget http://www.detriment.org/spring.exe 
mv spring.exe.1 spring.exe.linux
cp -R path/to/taspring_0.74b1/game/AI .

cat >winetasclient.sh
#!/bin/sh
cp -f spring.exe.linux spring.exe
wine TASClient.exe
cp -f spring.exe.win32 spring.exe
^D
chmod 755 winetasclient.sh
chmod isn't needed if your spring is installed on a FAT or NTFS partition (as in my case.) Run the client with ./winetasclient.sh, obviously.

Posted: 01 Dec 2006, 01:12
by malric
Yeah, great job! (I don't have time to test it, but I assume it works).

Maybe this deserves to be a 'sticky' ?

Posted: 01 Dec 2006, 02:45
by CautionToTheWind
Hi, i got it working following this guide but i get desync. Essentially, i built 1 radar tower and saw enemy comm radar dot, then walked to it. As soon as enemy comm was in visual range i got sync error.

Posted: 01 Dec 2006, 02:51
by CautionToTheWind
Yep, just adding that i joined another game and again i got desynced after a little while.

Posted: 01 Dec 2006, 02:56
by det
What version in your gcc?

Code: Select all

gcc --version

Posted: 01 Dec 2006, 03:02
by CautionToTheWind
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


(this would be Kubuntu Edgy)

Posted: 01 Dec 2006, 03:10
by det
Wierd, I have played a ton of games without any desyncing. Are you sure you checked out the 0.74b1 branch?

Posted: 01 Dec 2006, 03:20
by det
BTW, feel free to join us on IRC: #taspring@irc.freenode.net or #sy@irc.quakenet.org

Posted: 01 Dec 2006, 03:28
by CautionToTheWind
Yes i have the 0.74b1 branch. I got it with the following command:

svn checkout https://taspring.clan-sy.com/svn/spring ... ng_0.74b1/

Posted: 01 Dec 2006, 04:03
by CautionToTheWind
It seems i have somehow checked out the wrong version, so don't light the developers on fire just yet.