Lich:Software/Mac Installation

The official GemStone IV encyclopedia.
< Lich:Software
Jump to navigation Jump to search

Installing the Lich script engine on your Mac OS X Computer

The Lich is third-party software that expands scripting capabilities on Simutronics front end clients (The Wizard and Wrayth for Windows users, and Avalon for Mac OS X users), allowing players to script using the Ruby Programming Language, a high-level programming language with almost limitless capability. The program comes bundled with several scripts, such as scripts that calculate a character's redux, move from any location to another within a database, walk through an area until a creature is found, and spell up a character using all available spells. Also, there is a repository that allows for the quick, easy downloading of user-made scripts through The Lich, itself. Scripts can range from being very simple to quite advanced; for example, there is a script, titled xpSF, that modifies the experience window in Wrayth to display additional information about the character's experience level that updates itself when experience is gained.

Background

Mac OS X systems for Mavericks (10.9), Yosemite (10.10) and El Capitan (10.11) have some of the elements you need to run Lich already installed. Some elements are missing, and will require you to install components on your system. While most software distributed for Mac OS X comes in the form of an automated install file, Lich is different. Lich will require that you install some components via a Terminal window command prompt. You will also start Lich from the Terminal window.

Note for versions prior to Mavericks (10.9)

Installation instructions for Mac OS X versions prior to 10.9 is more complicated. The best option is to update your OS X version to current.

Steps to Install

Before you begin, it may be a good idea to download and run the 3rd party provided lich diagnostics script. This script is written to run on your Mac no matter how much, or how little of the required components you have installed. It can be useful to create a reference snapshot before you begin installing, and again after. Just run the script again, it will simply add on to your existing diagnostics file, so you have a before and after picture.

To run this script, download the file and then:

1)  Open up your Terminal window (you can use Spotlight to search for Terminal, then open the application)
2)  In your terminal window enter the following commands:
         cd
         chmod 744 ./Downloads/lichdiag.sh
         ./Downloads/lichdiag.sh
3)  The output in Terminal will tell you what you have and don't have.

There are six steps to getting Lich up and running on your new Mac.

1)  Installing the Avalon client.
2)  Installing the xQuartz windowing system.
3)  Installing the software compiling tools from Apple.
4)  Installing the core software Ruby will use to support gems required for Lich.
5)  Installing the Ruby gems used by Lich.
6)  Testing the game and finalizing the installation.

Coming soon: A script to automate as much as possible the installation of Lich on your Mac OS X. Contact doug@play.net if you would like to try out the beta version of this script.

Depending on the capabilities of your Mac and your network, you should anticipate that this installation process will take between 15 minutes and 45 minutes for most Macbook Pros and MacPros.

Detailed Installation Instructions

Let's get you set up to use Lich on your Mac system. Coming soon: a 3rd party script that will automate this process for you. If you'd like to try the beta version of this script, contact doug@play.net .

First, if you haven't already, download Avalon 4.3.3 (beta) from http://www.play.net/playdotnet/play/avalon-info.asp You'll want to scroll down to the bottom to find the right one. After you've downloaded it, double click on the download to unzip it. Then, I would recommend you drag the application onto your desktop where it can be handy!

Second, let's install xQuartz from http://www.xquartz.org This is the standard DMG style installation, so just open it up and follow along the installation prompts. Don't forget to eject the DMG when finished. You'll be asked to log out and log back in - please do that before continuing (bookmark this post!)

Now we get serious.

Below, you'll find a list of commands that you'll need to enter in Terminal. Terminal is an application on every Mac system that allows you to enter Unix-style commands. If you've never used Terminal before, it is simply a console that you type information (commands) into and the system responds. It is in the Applications / Utilities folder, or you can simply use Spotlight (magnifying glass upper right corner on most Macs) to search for Terminal, and open it.

In Terminal, we're going to type the commands below. It is absolutely ok to copy and paste these commands into Terminal rather than type them in. You only need to copy the bold part. Anything in comment column is to help inform what's going on. Don't copy that portion. Be sure to copy the complete command, though.

Command Comment
cd just making sure we're in our home directory
gcc -v force an install of the Apple Command Line Tools. Follow promots
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" copy and paste this whole command - don't just click on the link
brew doctor this command is just checking the installation of Homebrew - should say 'Ready to Brew'
brew install rbenv this command will install the rbenv manager to manage ruby versions
rbenv init Initialize the environment
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile make sure this works every time we open terminal
exit log out of the terminal window
From the Terminal > Shell menu, open a new window If you need to, you can use Spotlight to search for Terminal
brew install --build-from-source --with-x11 cairo this command should take a few minutes to complete
brew install https://raw.githubusercontent.com/Homebrew/homebrew/bb3fe5f2de87f76bc0a3f3480635c8fd0d68cec3/Library/Formula/gtk+.rb copy and paste this whole command - don't just click on the link
rbenv install 2.2.5 Install Ruby version 2.2.5
rbenv global 2.2.5 Set 2.2.5 as the Ruby the system will use
rbenv rehash Setting up to install the gems needed
gem install sqlite3 Install the database Lich uses This command may fail on some systems complaining that it is already installed. That's ok.
gem install gtk2 Install the graphics interface Lich uses for advanced scripts like narost
cd just making sure we're in our home directory
curl -OL http://lichproject.org/download/lich-4.6.33.zip download the current Lich software
unzip lich-4.6.33.zip unzip the lich software for use


That is everything we should need to worry about to get into the game with Lich operating.

Running Lich for the First Time

In order to start the game with Lich, from Terminal we'll have to run the following command:

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

You will be prompted for your password. Then, you should see in Terminal that Lich is waiting for the game client to connect. Just fire up Avalon, log in and enjoy!

Quick pro tip: The next time you want to play, just open up Terminal and hit your 'up arrow' one time. You should see the sudo ruby line above in your Terminal window. You can just press enter, fire up Avalon and enjoy again!

Final Steps

After confirming everything is working the way you want, don't forget! Open up Terminal and type the following three commands:

brew pin gtk+
brew pin cairo
brew pin pango


Enjoy!

Resources

Third-Party Software - edit
Lich Installation: Lich
Downloadable Lich Scripts: Go2 | Map | Repository | Popular Scripts