HOWTO: Play using the Windows lobby with native executable

HOWTO: Play using the Windows lobby with native executable

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderators: Moderators, Moderators

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

HOWTO: Play using the Windows lobby with native executable

Post 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
Last edited by det on 28 Jan 2007, 11:49, edited 6 times in total.
0 x

Chojin
Posts: 141
Joined: 04 Oct 2006, 11:22

Post by Chojin »

Very nice, det :)

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

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

There's one catch for users with 64-bit kernels,
they're probably running wine chroot'ed.
0 x

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post 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.
Last edited by det on 30 Nov 2006, 03:08, edited 1 time in total.
0 x

Kloot
Spring Developer
Posts: 1865
Joined: 08 Oct 2006, 16:58

Post by Kloot »

clever :]
Last edited by Kloot on 18 Jul 2007, 23:54, edited 3 times in total.
0 x

onlinepancakes
Posts: 4
Joined: 27 Nov 2006, 05:49

Post 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
0 x

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post 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 :)
0 x

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

I found the problem, I had "echo echo SpringData=~/spring-data >> ~/.springrc", rather than 'echo SpringData=~/spring-data >> ~/.springrc" in the HOWTO.
0 x

onlinepancakes
Posts: 4
Joined: 27 Nov 2006, 05:49

Post by onlinepancakes »

Thanks :) This fully works for me now :) Great guide! Easy and quick to get things done, and fully working :)
0 x

CautionToTheWind
Posts: 272
Joined: 30 May 2006, 17:06

Post by CautionToTheWind »

YES!
0 x

imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post 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.
0 x

malric
Posts: 515
Joined: 30 Dec 2005, 22:22

Post 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' ?
0 x

CautionToTheWind
Posts: 272
Joined: 30 May 2006, 17:06

Post 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.
0 x

CautionToTheWind
Posts: 272
Joined: 30 May 2006, 17:06

Post by CautionToTheWind »

Yep, just adding that i joined another game and again i got desynced after a little while.
0 x

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

What version in your gcc?

Code: Select all

gcc --version
0 x

CautionToTheWind
Posts: 272
Joined: 30 May 2006, 17:06

Post 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)
0 x

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

Wierd, I have played a ton of games without any desyncing. Are you sure you checked out the 0.74b1 branch?
0 x

User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

BTW, feel free to join us on IRC: #taspring@irc.freenode.net or #sy@irc.quakenet.org
0 x

CautionToTheWind
Posts: 272
Joined: 30 May 2006, 17:06

Post 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/
0 x

CautionToTheWind
Posts: 272
Joined: 30 May 2006, 17:06

Post by CautionToTheWind »

It seems i have somehow checked out the wrong version, so don't light the developers on fire just yet.
0 x

Post Reply

Return to “Linux”