PDA

View Full Version : HOWTO: Use PsiNet and the Wizard FE in Linux (Long)



Philosopher
06-23-2008, 05:53 PM
[UPDATED 9/04/2008 (see my post in this thread at that date): These instructions have now been followed with success in OpenSUSE 11.0 as well as Ubuntu.]

I've seen others request guides like this without receiving much help, so I figured that I'd offer what worked for me. Performing the following (simple) steps, I was able to get PsiNet + the Wizard Front End running flawlessly (so far as I can tell) on Linux.

[NOTE: I performed these steps on a completely up-to-date (as of 06/23/08) 32-bit Ubuntu Linux system, running Ubuntu 8.04 (Hardy Heron). The steps are fairly generic, though, so it should (hopefully) work on all Linux systems capable of running the necessary programs and capable of connecting to the internet. Also, please note that you will get a few error/warning messages along the way, but they can (usually) safely be ignored. Finally, for those of you who don't know, the '$' symbols in the code blocks are symbols for the prompt, so you should not actually type the '$' when entering commands.]

Step 1: Install and configure Wine on your system.

Hopefully you've done this already, but if not, read on. (If you have done this, you can skip this step.)

How you should perform this step will depend upon the brand of Linux you are using, so I will have to leave it mostly up to you; if you don't know how to install/configure Wine, you should be able to find instructions via Google. If you are using Ubuntu 8.04, Wine should (I think) be pre-installed on your system, but if it's not, you can get it from the repositories by typing:

$ sudo aptitude update
$ sudo aptitude install wine
You should configure Wine using
$ winecfg Typically, you won't actually need to make any changes here. All that you need to do in winecfg is make sure that you have a directory set for the Windows drive C: (under the "Drives" tab, it will likely say "../drive_c" under "Drive Mapping"; that's perfect). If you've got that, you're pretty much good to go. (If it ends up making a difference, I have Wine set to run applications under "Windows XP" mode.)

Step 2: Download and install the Simutronics Game Launcher.

The Launcher is available at: https://www.play.net/software/lnchInst.exe. Download the file, and then, in a terminal, type (assuming that you are in the same directory as the file):
$ wine lnchInst.exe The Launcher installation should begin; just install it as usual.

Step 3: Download and install the Wizard Front End.

Some people run into problems installing the Wizard Front End via Wine on Linux. I am one of those people. What happens for me, and apparently for others, is that the Wizard installation hangs indefinitely as it searches for previous versions. So, in order to avoid this problem, the Wizard FE has to be installed in a somewhat roundabout (though still very easy) way. If you can install the Wizard FE on your system the usual way (i.e., via Simu's website), go ahead and do that and ignore the rest of this step; if not, read on.

Here's what you should do to install the Wizard FE. I've got a version of an installer from the Role-Players Gaming Network, Inc. (the makers of Haelrahv and Eaxia) that works under Wine without the above problems. You can find it somewhere on their websites, so look there first if you'd like; currently, however, their sites are down, so I've uploaded it here: http://www.filedropper.com/goplaysetup121. [EDIT: This file appears to have disappeared. You can also find it here, however: http://downloads.eaxia.com/GoPlaySetup121.exe.] Just go there, download that file, and then go to wherever it is located on your hard drive via a terminal. At the terminal, type:
$ wine GoPlaySetup121.exe Just accept the defaults and proceed through the installation; it'll install a bit more crap than you need, but at least it will get the Wizard quickly installed on your system without the above problems.

Step 4: Download and install Mono for Windows.

This is a crucial step. Mono for Windows is a program that will, among other things, allow you to run .NET applications under Wine. PsiNet makes use of parts of the .NET framework, so Mono is what will allow you to get it running.

The Mono download page is here: http://www.go-mono.com/mono-downloads/download.html. You should select "Windows" and then download the file listed under "Mono for Windows, Gtk#, and XSP." A direct link to the currently available file is here: http://ftp.novell.com/pub/mono/archive/1.9.1/windows-installer/2/mono-1.9.1-gtksharp-2.10.4-win32-2.exe.

Once you've downloaded that file, run it from the terminal under Wine by typing:
$ wine mono-1.9.1-gtksharp-2.10.4-win32-2.exe Proceed through the installation as usual. All you really need are the Mono files, so feel free to uncheck the other boxes if you'd like to save space.

Step 5: Download PsiNet.

The current version is available at: http://psinet.dynalias.net/download.html. Do not attempt to run this program with Wine; PsiNet will not install correctly. Instead, proceed to the next step.

Step 6: Decompress the PsiNet installation file.

Open a terminal and go to the directory where you have downloaded the aforementioned PsiNet installation file. If you've downloaded the current version of PsiNet (as of this writing), the file name will be PsiNet2-Setup-2.1.2.1873.exe. Go ahead and copy (or move) that file to your Wine "drive_c" directory (on a default installation of Wine, this will be /home/username/.wine/drive_c/, where "username" should be your actual username), and then navigate (via the Terminal) to that directory (i.e., if you're using the default Wine installation, type "cd /home/username/.wine/drive_c/"). Now type:
$ unzip PsiNet2-Setup-2.1.2.1873.exe The installation file should decompress into five separate files, the most important one being PsiNet2.exe.

Step 7: Download winetricks.

winetricks is a script to download and install runtime libraries sometimes needed to run programs in Wine. For whatever reason, I found that my installation of PsiNet required the runtime library "gdiplus.dll". I used winetricks to get it quickly and easily.

To download winetricks, type (at a terminal):
$ wget http://kegel.com/wine/winetricks The script will begin downloading; wait until it finishes, and then type:
$ sh winetricks gdiplus This just runs winetricks and tells it to get gdiplus.dll. You should receive a Windows-style popup that asks if you want to install MicroSoft's PowerPoint Viewer or something like that; say yes, and proceed through that installation. This will get gdiplus.dll on your system for use in Wine.

We're almost there now. Apparently this post is too long for one entry, though, so proceed to the next post in this thread.

Philosopher
06-23-2008, 06:08 PM
I had to include the rest of this as an attachment, because apparently the forum software does not trust (or cannot process) the code in my post. There are some forum tags in the attached text, so you'll have to ignore those. Good luck!

BigWorm
06-23-2008, 06:16 PM
Will be sure to try this when I get home. I was pretty much there but ran into some problems with Gentoo's version on Mono. I'll have to try the Windows version.

Philosopher
06-23-2008, 06:26 PM
Will be sure to try this when I get home. I was pretty much there but ran into some problems with Gentoo's version on Mono. I'll have to try the Windows version.

Yeah, I messed around with Linux's Mono for a while before realizing that I could just run Mono (for Windows) under Wine to get the .NET support. That was a big part of the solution for me. In fact, that and the gdiplus.dll thing were the two "breakthroughs" for me. I'm wondering if the gdiplus.dll thing was unique to my system though.

Sean of the Thread
06-23-2008, 06:30 PM
STEP 8 MAKE HER OPEN THE BOX

Back
06-23-2008, 06:40 PM
STEP 8 MAKE HER OPEN THE BOX

This is quite possibly the funniest thing you, or anyone, have posted in quite a while.

Jaimaltz
06-23-2008, 07:10 PM
That's awesome you made that work, I made a half hearted attempt myself, and wasn't successful. Of course, the holy grail is linux, wine, mono, wizard, psinet, and lich. I'll be able to kill off my windows VM if I can get that to work, which would make me very happy. The only issue I can think of is that I'm not using the install to registry option that I'd typically use on windows, I'm just running lich and then starting the SGE. That may be a tough one to figure out.

Jaimaltz
06-23-2008, 08:19 PM
So close..

I managed to install psinet (while getting errors) and while it runs (I can manage to get it to login to the game, albeit very briefly) I get

fixme:win:EnumDisplayDevicesW (numbers), stub!
fixme:win:SetLayeredWindowAttributes (numbers): stub!
fixme:exec:SHELL_execute flags ignored: (numbers)
and some other stuff the forum wouldn't post

In the terminal, and a "Fatal error in gc" popup that says "GetThreadContext failed"

So close...

Philosopher
06-23-2008, 10:35 PM
So close..

I managed to install psinet (while getting errors) and while it runs (I can manage to get it to login to the game, albeit very briefly) I get

fixme:win:EnumDisplayDevicesW (numbers), stub!
fixme:win:SetLayeredWindowAttributes (numbers): stub!
fixme:exec:SHELL_execute flags ignored: (numbers)
and some other stuff the forum wouldn't post

In the terminal, and a "Fatal error in gc" popup that says "GetThreadContext failed"

So close...

Interesting. You manage to get PsiNet installed, and you connect both to the game and to PsiNet, and then you get this error?

I've managed to encounter something like this error during an attempt to follow my instructions on an earlier version of Ubuntu. I'm trying to see if I can figure out what's up as I type this, but no guarantees. [EDIT: See my next comment in this thread. I managed to get around the problem that I was having by making sure that I had the right version of Wine.]

Shaelun
06-23-2008, 10:36 PM
That's awesome you made that work, I made a half hearted attempt myself, and wasn't successful. Of course, the holy grail is linux, wine, mono, wizard, psinet, and lich. I'll be able to kill off my windows VM if I can get that to work, which would make me very happy. The only issue I can think of is that I'm not using the install to registry option that I'd typically use on windows, I'm just running lich and then starting the SGE. That may be a tough one to figure out.

It may be a little more than tough, but here's what you need to know to actually do it...

Since PsiNet2 was designed in such a way as to require it be the program directly connected to the game server (Game <-> PsiNet2 <-> other stuff), it has to be started first.

In Windows with Lich/PsiNet2, it's basically...
1) User runs SGE
2) SGE runs PsiNet2, passing it the name of a temp file with the login info
3) PsiNet2 makes a modified copy of that temp file, then runs Lich and passes it the altered file (then sits & waits for the local prog to connect to it)
4) Lich makes its own altered temp file, then runs the Simu Launcher.exe and gives it the new altered file (then Lich also sits & waits for the local prog to connect to it)
5) Simu's Launcher.exe starts Wizard, giving it the Lich-altered data
6) Wizard.exe uses the Lich-altered data, which makes it connect locally to Lich
7) Lich uses the PsiNet2-altered data, which makes it connect locally to PsiNet2
8) PsiNet2 uses the real address and connects to the remote game
9) User starts playing

The first problem is that in Linux, Wine is running Mono, which is running PsiNet2. When PsiNet2 tries to use a syscall to execute Lich, Mono tries to perform the syscall, which Wine promptly intercepts (like it's supposed to). Wine then promptly spits out an error about "Bad EXE format", so that won't work. Note however that I'm going off assumptions here, since I haven't bothered downloading or installing the Windows version of Mono.

The second problem is that if you first run Lich independently so that it isn't part of that chain, it's not going to be privy to the connection info. Naturally it's useless to run it after the chain, since the connections are already made and Lich can't get in the middle... so to use the ELF binary, you'll have to jump through a lot of hoops to properly get Lich in the middle without screwing up PsiNet2's requirement.

Why not run the Windows version of Lich with Wine too? Well, I installed Wine v1.0 (latest), and unfortunately, it can't run the Windows version of Lich -- it graciously informs me that err:ntdll:RtlpWaitForCriticalSection section 0x7ed547dc "?" wait timed out in thread 0009, blocked by 0000, retrying (60 sec).

So there's the situation; unless you manage to get PsiNet2 working without being the first link in the chain, or you manage to get Lich started in the middle of that chain with all the relevant information, you won't be playing with PsiNet2 and Lich both I'm afraid.

Philosopher
06-23-2008, 10:54 PM
Interesting. You manage to get PsiNet installed, and you connect both to the game and to PsiNet, and then you get this error?

I've managed to encounter something like this error during an attempt to follow my instructions on an earlier version of Ubuntu. I'm trying to see if I can figure out what's up as I type this, but no guarantees.

OK, as I said, my error was not identical to yours, but I was able to overcome it. What version of Wine are you using? That was the source of my problem.

I have now followed these instructions on different machines and had success each time, so I'm becoming reasonably confident in them. The most recent success was on an Ubuntu 7.10 (Gutsy Gibbon) 32-bit laptop. All it took in that case was the right version of Wine.

Jaimaltz
06-23-2008, 11:21 PM
OK, as I said, my error was not identical to yours, but I was able to overcome it. What version of Wine are you using? That was the source of my problem.

I have now followed these instructions on different machines and had success each time, so I'm becoming reasonably confident of them. The most recent success was on an Ubuntu 7.10 (Gutsy Gibbon) 32-bit laptop. All it took in that case was the right version of Wine.

0.9.46

I'll update it, worth a shot.

Philosopher
06-23-2008, 11:28 PM
0.9.46

I'll update it, worth a shot.

Yep, Wine 0.9.46 is precisely the version I was using when I encountered the similar problem. I upgraded and it worked.

I've got it to work in both Wine 1.0 and 0.9.59. It fails in Wine 0.9.46.

Let me know if that works. If it doesn't the first time, consider removing Wine and (if possible, and assuming you don't have anything important in there) wiping the .wine directory in your home directory clean. Then reinstall Wine and start from the beginning of the directions. Good luck!

Jaimaltz
06-24-2008, 03:27 AM
Yep, Wine 0.9.46 is precisely the version I was using when I encountered the similar problem. I upgraded and it worked.

I've got it to work in both Wine 1.0 and 0.9.59. It fails in Wine 0.9.46.

Let me know if that works. If it doesn't the first time, consider removing Wine and (if possible, and assuming you don't have anything important in there) wiping the .wine directory in your home directory clean. Then reinstall Wine and start from the beginning of the directions. Good luck!

After trying this, I was able to get psinet to work..sort of. The wizard's internal windows wouldn't work in the sense that I couldn't resize, or move any of the graphic controls or windows. I fired up my windows vm and copied a window layout and that was easier to live with, but psinet wouldn't update correctly, and crashed, and in general it was pretty unstable.

I tried removing my .wine folder again and tried to get the wizard to work stand-alone, but still had the internal window problems. I fixed that by going back to the older version of wine (I had installed from source for the newer version because my ubuntu distro - 7.10 didn't have 1.0 as a package), but that meant psinet wouldn't work. Oh well, I'm happy to have lich working at least.

Philosopher
06-24-2008, 01:26 PM
psinet wouldn't update correctly, and crashed, and in general it was pretty unstable.
Yes, I should have mentioned this (sorry): I haven't yet been able to figure out how to get PsiNet to update via Linux. I just close the window when I sign in, and everything works fine from there. If you attempt to update it when you log in, it will crash. If you close the update window, however, it should work just fine; at least, it does for me. I wonder if that would have eliminated the remaining instability you encounter, as it does on my end.


I tried removing my .wine folder again and tried to get the wizard to work stand-alone, but still had the internal window problems.
This suggests that this problem -- one that I haven't encountered yet -- is the result of something having to do with Wine rather than the other instructions here. I see that you installed Wine from source. There is a .deb file for Wine 1.0 available for Ubuntu 7.10, and you can even set things up so that Ubuntu updates it automatically to the latest version from the Wine repositories, so you might try that if you're still interested in giving this a few more shots (but if not, this is good info. anyway).

You have at least two options for getting the latest Wine for Ubuntu 7.10 without compiling from source. The first is to download the relevant .deb file from this location (scroll down to "Ubuntu Gutsy (7.10)"): http://wine.budgetdedicated.com/archive/index.html. You can then install by moving to the directory where the .deb file downloaded and typing:

$ sudo dpkg -i filename.deb You probably already know how to do that, but I'm mentioning it just in case.

The other way to do this, and to have Wine automatically update to the latest version via aptitude, is to go to a terminal and type:

$ wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
$ sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/winehq.list

From that point on, "sudo aptitude update" will check there for updates to Wine, and it will install said updates when you upgrade.

Philosopher
06-24-2008, 01:26 PM
Will be sure to try this when I get home. I was pretty much there but ran into some problems with Gentoo's version on Mono. I'll have to try the Windows version.
Any luck for you?

Jaimaltz
06-24-2008, 05:46 PM
I gave it another go, followed the directions, and no dice. I can get the wizard to pop up stand alone without any issue, but once I introduce PsiNet2, I get the thread error popup thingy again. I'd probably be able to make it work if I did a fresh OS install and did everything from scratch. It's okay though, honestly since getting both psinet and lich to work would be next to impossible, I'd rather use lich anyway as I'm addicted to the scripts.

Philosopher
09-04-2008, 01:30 PM
This is just an update to say that I've now confirmed that my original instructions also work (at least on the system that I used) in OpenSUSE 11.0 Linux.

I'm still not sure why others have encountered errors while following the instructions; I haven't had a failure so far* on any variation of Linux on any system (I've tried different systems, different Linux distributions, different kernels, and different versions of WINE). It may be that those who've encountered errors have unique system configurations which somehow throw things off, as far as the instructions go. They should work, as far as I can tell, on any fairly standard and fairly up-to-date installation.

Good luck!

* Except for the fact that PsiNet will not update in Linux. You just have to manually install the updates.