HOWTO: Play using the Windows lobby with native executable
Moderator: Moderators
-
- Posts: 272
- Joined: 30 May 2006, 17:06
That's right, here is some code that works (added only the if (argc > 1... line):
Paste it in spring.c and compile with i586-mingw32msvc-gcc spring.c -o spring.exe. I can't upload a drop in spring.exe atm, maybe someone else could do that.
EDIT: The new spring.exe spring launcher (replaces the one in det's post, compiled from above sourcecode):
http://www.osrts.info/~tvo/spring/spring.exe
Code: Select all
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
int main (int argc, char *argv[])
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
LPTSTR szModuleName=_tcsdup(TEXT("/usr/games/spring"));
LPTSTR szCmdline=GetCommandLine();
if (argc > 1 && strcmp(argv[1], "/V") == 0) {
printf( "Spring 0.74b3\n" );
return 0;
}
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if (!CreateProcess(szModuleName, // No module name (use command line)
szCmdline, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi)) // Pointer to PROCESS_INFORMATION structure
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return;
}
// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE );
// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
return 0;
}
EDIT: The new spring.exe spring launcher (replaces the one in det's post, compiled from above sourcecode):
http://www.osrts.info/~tvo/spring/spring.exe
Thanks a lot for that code, Tobi. Darn you Betalord for making symlinking not work! 
I edited my previous guide to use Tobi's file (changed so it works with spring in ./ ), instead of a symbolic link.
http://crom.hio.no/spring/spring-linux-winelobby.txt

I edited my previous guide to use Tobi's file (changed so it works with spring in ./ ), instead of a symbolic link.
http://crom.hio.no/spring/spring-linux-winelobby.txt
-
- Posts: 665
- Joined: 06 Jun 2006, 19:49
So, I FINALLY got spring working, even got the tasclient loaded AND connected in wine (!!!!!!!!!) but of course, when I host/join a game whenever the game is launched I'm immediately kicked back into the battle room with nothing but "Back from game".... it doesn't even try to load the native executable as far as I can tell, so what did I do wrong?
I have a weird problem. Everything works as it should. The only issue is that TASClient thinks I am back from the game instantly, and spring takes like 5 minutes to actually load. Any ideas what is going on?
I installed spring from .deb, and did a bunch of symlinks to make everything be where things wanted them to be.
I installed spring from .deb, and did a bunch of symlinks to make everything be where things wanted them to be.
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
Re: HOWTO: Play using the Windows lobby with native executab
all those passages can be easily replaced by addingdet wrote:Install OTA ContentSet symlinks to share maps, mods and demos from native installCode: 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/
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/
SpringData=~/.wine/drive_c/Program\ Files/Spring/
to your ~/.springrc file
WARNING: REPLACE THE ~ WITH YOUR PATH TO YOUR HOME FOLDER! (spring doesn't accept relative paths AFAIK)
example code:
Code: Select all
echo "SpringData=$HOME/.wine/drive_c/Program\ Files/Spring/" >> ~/.springrc