PDA

View Full Version : Lich/Mac/Avalon



Xanith
04-17-2010, 04:44 PM
Probably not possible, but I'll post anyway just in case.

I use Mac OSX (10.5.8). I was running a 30 day trial Windows emulator and tried Lich and loved it, but it's just not a cost-effective option for me to get a whole new machine for GS or expensive software packages.

Given that Lich is Linux, can you install Ruby on Mac OSX and then run Lich through Avalon? Or is that a gigantic pipe dream?

Please don't tell me to throw out the Mac and get a PC either. I know. I do. Thank you.

Hearts,

Xanith

Alorn15
04-17-2010, 04:55 PM
Tillmen once told me it was probably possible, but I couldn't get it to work.

I'm much happier with what my setup became, however:
1) Download VMWare Fusion (or Boot Camp, I suppose)
2) Install windows/ruby/lich
3) Unity mode

No lag even when MAing. Very seamless.

Unity mode:
http://img214.imageshack.us/i/screenshot20100417at200.png/

Regular mode:
http://img11.imageshack.us/i/screenshot20100417at202.png/

Xanith
04-17-2010, 05:04 PM
VMWare Fusion is what I've been messing with. I guess I just don't want to have to buy Windows. Heh.

Tillmen
04-17-2010, 05:17 PM
I'd love to add an Avalon option to the Lich game entry, but I've never been able to get OSx86 to install in a virutal machine.

The way that may or may not currently work, is to install whatever OSX version of Ruby you can get your hands on, and start Lich from the command line like this:
ruby lich.rbw --gemstone --stormfront
or
ruby lich.rbw --gemstone --platinum --stormfront

You then have something like 30 seconds to start Avalon while Lich is pretending to be the Simu server before it times out. That's assuming Lich was able to modify your hosts file. It'll need something or other for that.. you have sudo or setuid on OSX?

To get it put in the Lich game entry, I'd need to know how to find Avalon. Would "which avalon" work? Also, what command line arguments would I start Avalon with to make it connect to what I want? Will it take a .sal file?

Tillmen
04-17-2010, 08:04 PM
You might also try running Stormfront or the Wizard through WINE. Should work just like using Lich on Linux.

Tillmen
04-17-2010, 10:36 PM
I just looked at a screenshot of Avalon.. it's apparently almost a clone of the Wizard. I had no idea..
Try this instead:

ruby lich.rbw --gemstone --wizard

waywardgs
04-25-2010, 03:55 PM
You might also try running Stormfront or the Wizard through WINE. Should work just like using Lich on Linux.

This is what I'm doing currently. There's a terrific step-by-step on getting wine to run here: http://davidbaumgold.com/tutorials/wine-mac/#part-3

No need to buy windows.

Gnomad
04-25-2010, 04:30 PM
That's assuming Lich was able to modify your hosts file. It'll need something or other for that.. you have sudo or setuid on OSX?http://ss64.com/osx/

sudo is there, yes.

hosts is /private/etc/hosts

I'd me more than happy to try to help out.

edit:

Haphaetsus: XXXXXXX$ ruby lich.rbw --gemstone --wizard
warning: failed to load GTK bindings: no such file to load -- gtk2
--- error: hack_hosts: Permission denied - /etc//hosts.bak

waywardgs
04-26-2010, 08:07 PM
So after much hassle I finally got Stormfront working on my mac with wine... it was a bit of a pain, and the end result was unusably slow. I installed the launcher and SF, used the launcher to open SF, could see my inventory and things like that but it was so slow the main window never even started to scroll with info. Back to the drawing board... people say they've had success with VMware?

Also, Tillmen, if you could explain a bit more about how I might be able to get lich to run with avalon as is, I'd really appreciate it. I'm willing to experiment if you've got ideas.

Gilralyn
04-26-2010, 10:49 PM
I setup wine-devel on my Macbook pro today using Mac Ports and saw similar results. It is unusable.

I'll take a stab at getting Lich to run with Avalon next. If I am successful, I'll let you know what steps to follow.

Gilralyn
04-26-2010, 11:02 PM
Well, I got ruby installed with the gtk bindings via Mac Ports. I was able to run Lich using sudo - no errors. It listens patiently on the appropriate ports. It also added the appropriate entries into /etc/hosts.

Avalon doesn't try to connect to the same host/port that Stormfront connects to, so I tried "sudo ruby lich.rbw --gemstone --wizard". This seems to be the right port, because Avalon was no longer able to connect to the gemstone server. I assume Lich was not negotiating with Avalon in the way that Avalon expects.

I'll try a few other things tomorrow. If anyone has any ideas for me to try, please let me know.

Cheers,

Gil.

Tillmen
04-26-2010, 11:13 PM
Check the debug file that was created for that attempt.

It should say

Waiting for the client to connect...

After that it should either say

Connection with the local game client is open.
or

error: timed out waiting for client to connect

I assume that it's going to say it timed out. When Azanoth tried it, it gave me the impression that Lich was able to redirect the correct domain name to localhost, but that Lich was listening on the wrong port. That would explain why Avalon gave him a "connection refused" error. However.. when checking what port Avalon used when Lich was out of the picture, it was the same port Lich was listening on. I'm a little confused as to why it doesn't work.

ruineye
04-26-2010, 11:29 PM
Well, I got ruby installed with the gtk bindings via Mac Ports. I was able to run Lich using sudo - no errors. I listens patiently on the appropriate ports. It also added the appropriate entries into /etc/hosts.

Avalon doesn't try to connect to the same host:port that Stormfront connects to, so I tried "sudo ruby lich.rbw --gemstone --wizard". This seems to be the right port, because Avalon was no longer able to connect to the gemstone server. I assume Lich was not negotiating with Avalon in the way that Avalon expects.

I'll try a few other things tomorrow. If anyone has any ideas for me to try, please let me know.

Cheers,

Gil.

I have mirrored these steps and am having the same problem, with Lich listening patiently on 4900 and Avalon failing to connect, presumably due to Lich's presence.

I believe that Naos wrote and maintains Avalon, so he may be able to provide more insight into exactly how it communicates with the Simu server. Will cross-post this on the officials and hope for the best...

waywardgs
04-26-2010, 11:41 PM
I have ruby running as well, an avalon intervention is probably in order. *raid Naos?!?*

drunksolo
04-27-2010, 12:42 AM
I believe that Naos wrote and maintains Avalon, so he may be able to provide more insight into exactly how it communicates with the Simu server. Will cross-post this on the officials and hope for the best...

Ethereal wrote Avalon, Naos maintains it. He hasn't commented on it other than saying 'I don't have time to work on it' for years - 3-5 years. I wish you the best of luck, but don't get upset if you don't hear a single word from him about it.

Also - the graphics are a clone of the wizard but the whole thing is written from scratch. It shares the same feed as the wizard, which is another reason for similarity, but it has a lot of different features.

Getting ruby installed on a Mac is fairly easy - it might be better to try to make a plugin that works with Avalon that pipes everything over to Lich.

Gilralyn
04-27-2010, 09:12 AM
After some more troubleshooting, I discovered that lich isn't actually listening for connections.

Running lich as root gives me this:
Pretending to be gs3.simutronics.net
Listening on port 4900
Waiting for the client to connect...

However, when I telnet to localhost port 4900 or gs3.simutronics.net port 4900, I am unable to connect.

$ telnet gs3.simutronics.net 4900
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

(no local firewall)

Food for thought...

Tillmen
04-28-2010, 06:19 PM
Apparent, Mac is upset by


TCPServer.new("localhost", nil)

Search through lich.rbw and change that to


TCPServer.new("127.0.0.1", nil)

It appears three times in the file. I think the second one is the one we're interested in, but it won't hurt anything to change them all.

Gilralyn
04-29-2010, 12:23 PM
Bingo!

I can now use Lich with Avalon. After making the changes you suggested, I tried to connect. I received an error that mentioned the following:

NSConcreteMutableAttributedString addAttribute:value:range:: nil value

After clearing out duplicate fonts in the Font Book application, I was able to connect successfully to Lich and Gemstone IV Prime. It works like a charm.

Thanks, Tillmen.

Gilralyn
04-29-2010, 12:40 PM
Here's a summary of the steps I followed to get it to work:

Edit: As per the post from "Back", you may need to install Xcode in order to use Mac Ports. You can find the Xcode install package in the "Optional Installs" folder on your OS X Install DVD.

1. Install and Configure Mac Ports
Follow Part 1 and Part 2 of the following guide to install Mac Ports:
http://davidbaumgold.com/tutorials/wine-mac/

By the way, if there is a way to setup gtk support using the built-in version of ruby on the Mac with gems, please let me know. I'd much prefer to avoid using Mac Ports just for simplicity.

2. Download Ruby with gtk bindings. This can take a while.


$ sudo port install rb-gnome


Check your version of ruby.


$ /usr/bin/ruby -v
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-darwin10]


The /usr/bin/ ruby is the original one installed with your system. The second one is installed by Mac Ports. If both commands give you the same version, then you haven't followed the instructions properly. Check to make sure you've added the appropriate paths to your /etc/profile file.

3. Download Lich (v4.1.37 or greater) from http://www.lichproject.org/download.html and extract it.

4. Edit lich.rbw. Search for "def find_hosts_dir", go to the end of the definition and change:



return nil


to



return '/etc'



4. Run Lich using the following command:


$ sudo ruby lich.rbw --gemstone --avalon


5. Login to the game via Avalon.

If you receive an error mentioning NSConcreteMutableAttributedString, open up the Font Book application and resolve any duplicate font issues before trying again. I think I experienced this issue because I had Wine installed, but that's just a guess.

Thanks again to everyone in this thread for helping figure this out.

Back
04-29-2010, 05:45 PM
Here's a summary of the steps I followed to get it to work: ...

Awesomeness. Thanks, dude.

For anyone still running OSX 10.4 you will need to download and install Xcode 2.5 in order to complete step 2 above.

Gnomad
04-29-2010, 06:28 PM
I was hoping to avoid MacPorts. Oh well.

waywardgs
04-29-2010, 08:31 PM
I'm getting checksum errors with this version of ruby. Hmm.

drunksolo
04-30-2010, 10:40 AM
What's the purpose of MacPorts for Lich? It might be possible to avoid using it, I've never used it but it looks like it's mostly for making things 'easier' as opposed to 'possible.'

Back
04-30-2010, 12:51 PM
Well crap. Thought I had it. When I put in...


$ sudo ruby lich.rbw --gemstone --wizard

I get...


warning: failed to load GTK bindings: Cannot open display: :0
Pretending to be gs3.simutronics.net
Listening on port 4900
Waiting for the client to connect...


Start Avalon which connects but Lich does not. Then I get this in the terminal...


error: timed out waiting for client to connect

Xanith
04-30-2010, 04:50 PM
I'd like to try doing this, what's the downside of MacPorts? Is it not working for some people?

Gilralyn
04-30-2010, 09:29 PM
Mac Ports works fine for me, it is just cumbersome. It installs a ton of stuff in /opt and in many cases it duplicates functionality. For example, it installs its own version of ruby which bypasses the built in Mac OS X version of ruby (assuming you set up your paths correctly).

Gnomad
05-24-2010, 03:27 AM
Thanks to Tillmen for all the support. The only lingering issue I see is the characters that denote a SF link seem to be displaying in Avalon where they do not in Wizard:


Stained a dark hue, massive mahogany planks fastened with steel brackets provide shelter for a hard day's work. Crowded with a ágrinder†, a ápolisher† and a áworkbench† with a ávise†, this room is perhaps a third of the building's interior. Besides the exit, a ágrey iron door† pierces the center of the structure's one interior wall. Along the far wall a pair of crossed daggers have been mounted against a Vaalorian crest. You also see a large sign, a wooden bin and a rental hourglass.

Hardly life-ending, though.

Tomorrow, I think I'm going to play with ruby-growl.

Tillmen
05-24-2010, 12:18 PM
Those characters cause highlights in the Wizard. Apparently Avalon does it differently. You can disable it with the highlight_links script.

;highlight_links none none
;favs add global highlight_links

If you figure out what I can insert into the stream to cause highlights for Avalon, let me know.

Gnomad
05-24-2010, 06:11 PM
I don't seem to see a 1-character bold tag. Is there somewhere in-game I can find it?



0x0290: 6f74 6865 722e 2020 1c47 5349 0d0a 596f other....GSI..Yo
0x02a0: 7520 616c 736f 2073 6565 201c 4753 4c0d u.also.see..GSL.
0x02b0: 0a61 2072 6167 6765 6420 6f6c 6420 626c .a.ragged.old.bl
0x02c0: 696e 6420 6d61 6e1c 4753 4d0d 0a20 616e ind.man.GSM...an
0x02d0: 6420 1c47 534c 0d0a 4775 6172 6473 6d61 d..GSL..Guardsma
0x02e0: 6e20 4c79 696d 6c79 6e1c 4753 4d0d 0a2e n.Lyimlyn.GSM...
0x02f0: 0d0a 416c 736f 2068 6572 653a 204b 7a69 ..Also.here:.Kzi


edit7: from login:


0x01f0: 2020 2020 2020 2020 2020 2020 2020 2020 ................
0x0200: 2020 2020 2020 2020 2020 2020 200d 0a1c ................
0x0210: 4753 4c0d 0a0d 0a59 6f75 2068 6176 6520 GSL....You.have.
0x0220: 756e 7265 6164 206e 6577 7320 6172 7469 unread.news.arti
0x0230: 636c 6573 2e20 2054 7970 6520 4e45 5753 cles...Type.NEWS
0x0240: 204e 4558 5420 746f 2076 6965 7720 7468 .NEXT.to.view.th
0x0250: 6520 6669 7273 7420 6e65 7720 6172 7469 e.first.new.arti
0x0260: 636c 652e 0d0a 0d0a 1c47 534d 0d0a 0d0a cle......GSM....
0x0270: 1c47 534c 0d0a 2a2a 2a2a 2a2a 2a2a 2a2a .GSL..**********
0x0280: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a ****************
0x0290: 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a 2a2a ****************
0x02a0: 2a2a 2a2a 2a2a 2a2a 0d0a 1c47 534d 0d0a ********...GSM..
0x02b0: 0d0a 2020 2020 2020 2020 2020 2020 2020 ................

prance1520
01-15-2011, 09:09 PM
Well crap. Thought I had it. When I put in...


$ sudo ruby lich.rbw --gemstone --wizard

I get...


warning: failed to load GTK bindings: Cannot open display: :0
Pretending to be gs3.simutronics.net
Listening on port 4900
Waiting for the client to connect...


Start Avalon which connects but Lich does not. Then I get this in the terminal...


error: timed out waiting for client to connect

Did you ever find an answer to this Back? I'm coming up with the same thing. Even after a complete wipe of the /opt folder and reinstall starting with MacPorts. I imagine there's some configuration outside of the installs that isn't right for me, but I haven't found the answer yet.

Back
01-15-2011, 09:22 PM
Did you ever find an answer to this Back? I'm coming up with the same thing. Even after a complete wipe of the /opt folder and reinstall starting with MacPorts. I imagine there's some configuration outside of the installs that isn't right for me, but I haven't found the answer yet.

Never did and I stopped trying because I closed my account again. Sorry. :(

prance1520
01-15-2011, 09:23 PM
Thanks for the reply, I'll update if I make progress.

yesicj
01-19-2011, 02:54 PM
Out of curiosity, did anyone manage to find a way to make this work without installing that Mac Ports thing? I've recently been lead to believe that I'm seriously missing out by not using Lich and I thought I'd pop in and ask.

waywardgs
01-19-2011, 03:07 PM
it works for me, but without GUI. I can't get GTK bindings to load.

yesicj
01-19-2011, 09:31 PM
What is it that doesn't have a GUI? Ruby, Avalon, Lich? I'm sorry if that's an obvious question, but my familiarity with this stuff doesn't go beyond Wizard (and now Avalon).

DaCapn
01-20-2011, 02:52 AM
I don't have a mac or anything (and I didn't read the thread carefully to see what has already been discussed) but here's a couple ideas for you guys who can't get GTK applications to properly communicate with your display:

Apparently after some version (maybe leopard, I can't get those silly names straight), OSX comes with X11 installed and should launch when you run an application that requires it. Check that you have it installed. Check that it runs when you try to run something that requires an active X server. I have no idea what OSX likes to name it (X, X11, Xorg?) but you should be able to do something like `ps -A | grep -i x` at the terminal to see what's running that contains 'x' in it and see, right?

You can also have an issue when you have a display set manually somewhere in your user's startup scripts (if OSX didn't have some other graphics layer running and depended upon X11 for everything, you'd run into this type of error every time you ran an app that expected to interact with the display). When X11 is started, it should set the display appropriately. If it has been set manually, the GTK may be sending information to a display that doesn't have an X server running. Check the contents of the files `~/.profile`, `~/.login` or `~/.rc` for something like `export DISPLAY=` or anything that sets the DISPLAY environment variable. Comment it out, kill the X server, if running, and try again. I think FreeBSD uses a series of rc scripts (i.e. `~/\.{1..9}rc` or `~/.rc{1..9}`) so you may want to see if anything is there instead.

If anyone has any questions about this, I doubt I could answer anything but please share if it gets you somewhere (or nowhere). The most related thing I've done on a mac was help someone run some apps with an X11 session forwarded over ssh (some time in the past year). The last time I'd used a mac before that, the screen was green and I had a tray of 5.25" floppies.

Gnomad
01-20-2011, 06:07 PM
X11 should be in /Applications/Utilities. If it's not, you probably have an older Mac (it's installed by default now). Find your install CD, find the optional components icon in it, and install the X11 server.

Norminstarr
01-21-2011, 03:24 AM
I actually opened a ticket with the folks at Macports for a similar problem. After getting snow leopard and doing some updating I finally managed to be able to port all the gtk bindings (which takes forever btw). Now lich works like a champ with GUI and everything.

RevenantG
01-25-2011, 12:17 AM
Anyone ever figure this out? I'm getting the same error when I try to log in,


sudo ruby lich.rbw --gemstone --avalon
Xlib: extension "RANDR" missing on display ":0".
Pretending to be gs3.simutronics.net
Listening on port 4900
Waiting for the client to connect...

I try logging in, nothing happens..then it times out, but if I telnet to gs3.simutronics.net 4900 it sometimes gives me the lich login message on the terminal screen. But after that, I tried re-installing Avalon and now I'm getting a new message that doesn't make sense.

telnet gs3.simutronics.net 4900
Trying 206.225.28.2...
Connected to chimera.simutronics.com.
Escape character is '^]'.

It seems like lich is running, but there is no communication between Lich/Ruby and Avalon. It doesn't pick up Avalon for some reason. Is there a way I can change the port that Avalon uses? Maybe some other solution?

prance1520
01-27-2011, 10:12 PM
I got it going. I had to uninstall everything (I uninstalled macports, its probably not needed). Reinstalled as directed on the lich site. Don't run once it installs, instead make sure you restart. I'm not familiar with GTK, but its possible it needs to do some work on startup. After this, I still get the RANDR missing error, but I can connect successfully.

Ryvicke
01-27-2011, 10:41 PM
Does this shit work for normal people yet? I would love to ditch this Vista monster permanently.

waywardgs
01-27-2011, 11:43 PM
(neg) Lich/Mac/Avalon 01-25-2011 02:03 AM Just call that cool dude from the Mac vs PC commercials. Can't you just shrug your shoulders and it all works?

lol. I shrugged and it works. So yeah, go lick Gate's asshole some more.

prance1520
01-28-2011, 01:42 AM
Does this shit work for normal people yet? I would love to ditch this Vista monster permanently.

Lich works fine for me on the OSX. Try following the lich+avalon instructions exactly how they are, but make sure you give it a reboot after the ruby install and the first time you start lich. No issues since then.

The only reason I haven't ditched the windows machine for the mac totally is because Stormfront looks nicer than Avalon, even with the nice X11 lich addons.

yesicj
02-14-2011, 05:00 PM
So I finally caved and followed the process on lichproject.org (took FOREVER, btw). I can't seem to get it to work, though.

Like the site says, I try to start Lich with
sudo ruby lich.rbw --gemstone --avalon

but the message I get in response says
ruby: No such file or directory -- lich.rbw (LoadError)

I have absolutely no coding background or anything else along those lines, so I don't know where ruby would look for Lich. Right now, it's just sitting in a folder called lich on my desktop. Anyone able to help de-idiot me?

Tillmen
02-14-2011, 05:14 PM
Ruby should be in your executable search path, so it should be found no matter what directory you're in. lich.rbw is just a text file though, so the only way it will be found is if it's in your current directory or you specify the path to it. I'm not sure where the desktop is kept on Mac, but it might be something like this:

ruby /home/username/Desktop/lich/lich.rbw --gemstone --avalon

yesicj
02-14-2011, 07:51 PM
You're my hero.