Lich:Software/Mac Installation: Difference between revisions

The official GemStone IV encyclopedia.
< Lich:Software
Jump to navigation Jump to search
mNo edit summary
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Installing the Lich script engine on your Mac OS X Computer==

{{#lst:Lich_(software)|About}}

==Background==
==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_(software)|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.
Mac OS X systems for all versions from Mavericks (10.9) to Mojave (10.14) have some of the elements you need to run [[Lich_(software)|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)==
==Note for versions prior to Mavericks (10.9)==
Line 11: Line 7:
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.
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==
==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 [https://www.dropbox.com/s/itj42g2bdza50se/lichdiag.sh?dl=0 file] and then:
To run this script, download the [http://bit.ly/MacLich installer] and then:


1) Open up your Terminal window (you can use Spotlight to search for Terminal, then open the application)
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:
2) In your terminal window enter the following commands:
cd
cd
chmod 744 ./Downloads/lichdiag.sh
chmod 744 ./Downloads/osxlich.sh
./Downloads/lichdiag.sh
./Downloads/osxlich.sh
3) The output in Terminal will tell you what you have and don't have.
3) The output in Terminal will tell you when you're done.


There are six steps to getting Lich up and running on your new Mac.
There are six steps to getting Lich up and running on your new Mac. The installer will take care of the first five.


1) Installing the [[Avalon]] client.
1) Installing the [[Avalon]] client.
Line 36: Line 30:
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.
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. You have two choices in how you can install Lich on your Mac OS X system. You can download the installer file and let it do most of the work for you, or you can manually install the necessary components. '''NOTE:''' when running the installer file, you will be asked for your password twice - once to install Homebrew, and once to install xQuartz. This should happen within the first 5 to 10 minutes of the install. Thereafter the script should run without any further interaction required.


==Running Lich for the First Time==
'''To install via the 3rd party script osxlich.sh''':


For most first time lich users, starting up is easy. In terminal, run the following command:
{|{{prettytable}}
|'''Command''' || '''Comment'''
|-
|'''Download the diagnostic file''' || You should run this before and after the installation to get a snapshot of your system to troubleshoot from.
|-
|'''Download the installer file''' || After you've run the diagnostics, you'll run this program to install what you need.
|-
|'''Open the Terminal Application''' || You can find Terminal by using Spotlight.
|-
|'''cd''' || type (or copy / paste this and the following commands into your Terminal window.
|-
|'''chmod 744 ./Downloads/lichdiag.sh''' || make the diagnostic file executable only by you.
|-
|'''chmod 744 ./Downloads/osxlich.sh''' || make the installer program executable only by you.
|-
|'''./Downloads/lichdiag.sh''' || run the diagnostics program. It will create a text file on your desktop for reference.
|-
|'''./Downloads/osxlich.sh''' || run the installer program. You will be asked for your password twice during the install.
|-
|'''./Downloads/lichdiag.sh''' || after the installer completes, run the diagnostics again.
|-
|'''You are now ready to play''' || scroll down to the section on Running Lich for the First Time.
|}


ruby lich/lich.rbw
'''If you would rather manually install the required components:'''


Log in with your account and password, and then select the character you want to play, and select Avalon as your FE.
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!


In order to start the game with Lich (for Frostbite and other FE users), from Terminal we'll have to run the following command:
Now we get serious.


sudo ruby lich/lich.rbw --gemstone --<name of the FE you are using>
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, you're going to type (or copy / paste) 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.
'''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 ruby line above in your Terminal window. You can just press enter, fire up Lich and enjoy again!


Enjoy!

==A Few (More) Quick Pro Tips==

If you've read this far, you're going to benefit!

'''caffeinate -di [command]'''

Sometimes your Mac will want to go to sleep, and will disrupt your processes - even sometimes causing the dread 'SEGFAULT' that reboots your Mac with cryptic information that no one really can use (despite claims to the contrary). If you use the 'caffeinate' command in Terminal, your Mac will not sleep ( [d]isplay or computer [i]dle ) until the command completes. Suggested usage might be 'caffeinate -di ./osxinstall.sh' as one (very pertinent) example.

'''Install Wine'''

Took the plunge from a Windows PC to Mac OS X, but not quite ready to give up on your Stormfront or Wizard (my personal fav) yet? Great news! You don't have to. While Avalon is a tried and tested Mac front end, let's face it - the PC crowd presently has the better collection of front ends. So, how do you make this magic all happen? Just follow these instructions (wine installs are as long or longer than the core OS X Lich installs, so make sure you have time!) And now might just be a good time to test 'caffeinate' on that first command - it takes a while and might abort if the machine tries to sleep.


{|{{prettytable}}
{|{{prettytable}}
|'''Command''' || '''Comment'''
|'''Command''' || '''Explanation'''
|-
|-
|'''cd''' || just making sure we're in our home directory
|'''Open Terminal''' || Yes, we love this application to do heavy work!
|-
|-
|'''cd''' || Always a good idea anytime you're not sure exactly where you are (which folder) on your Mac
|'''/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. You'll be asked for your password here.
|-
|-
|'''caffeinate -di HOMEBREW_NO_AUTO_UPDATE=1 brew install wine winetricks''' || This will take a bit of time to complete, so we'll pour in some caffeine.
|'''brew tap Caskroom/casks''' || we're going to use Homebrew to install XQuartz
|-
|-
|'''curl -OL http://www.play.net/software/lnchInst.exe''' || Don't just click the link, copy (or type) the entire command.
|'''brew install Caskroom/casks/xquartz''' || Install xQuartz. This might ask you for your password again.
|-
|-
|'''wine lnchInst.exe''' || You might see a few errors / warnings, but it'll work as of 8/2016
|'''brew install rbenv''' || this command will install the rbenv manager to manage ruby versions
|-
|-
|'''ruby ./lich/lich.rbw''' || Log in as normal and select the windows FE of your choice -- remember, I recommend Wizard.
|'''rbenv init''' || Initialize the environment
|-
|}

|-'''echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile''' || set up the environment to 'see' rbenv
''Troubleshooting - you may get this strange error message: "concat': no implicit conversion of Errno::EACCES into String (TypeError)" . If you've used Avalon and Lich previously (in particular, using 'sudo ruby' as the instructions say), then we have one step we need to take to remove this error. Don't worry, it is an expected outcome of using sudo with lich, and can be fixed with one line.''
|-

|'''echo 'eval "$(rbenv init -)"' >> ~/.bash_profile''' || make sure this works every time we open terminal
{|{{prettytable}}
|-
|'''exit''' || log out of the terminal window
|'''Command''' || '''Explanation'''
|-
|'''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
|'''cd''' || Absolutely ensure we're in the right directory
|-
|-
|'''sudo chown -R $(whoami):staff ./lich''' || change ownership of all content in the lich directory to your username
|'''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
|'''ruby ./lich/lich.rbw''' || continue on with the login
|}
|}


At this point, you'll see the Lich login window - just type in your account information, select your character, and then '''look at the two radio buttons'''. One of them is Wizard, and the other Stormfront. Select your preference, and click PLAY. Your front end will be downloaded and you'll be guided to install (please just select the default locations - wine knows what it's doing).


''Caution - sometimes wine takes a bit of time 'searching' for a previous installation of a file, especially the Wizard. No panic, let the process complete. Then you may not connect, especially the Wizard, the first time. No worries - wait it out and close up Terminal, then start Terminal again, and re-enter the command. You'll get in the second time.''
That is everything we should need to worry about to get into the game with Lich operating.


''Note: Stormfront is a very nice looking front end, but it has a memory leak in it. This situation is really exacerbated on a Mac / wine installation. You'll notice the front end start to get sluggish. When it does - simply move someplace safe, log out, and log back in. Voilà!''
==Running Lich for the First Time==

'''Use those config files!'''


If you've been playing for a while, you'll have a couple of challenges to overcome - migrating any non-lich scripts you may have, and migrating your existing highlights, macros and other settings. The process is slightly different for each front end, but in general:
In order to start the game with Lich, from Terminal we'll have to run the following command:


Wine installs all Windows programs under the user directory at the following path:
sudo ruby lich/lich.rbw --gemstone --avalon


~/.wine/drive_c/Program\ Files
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!


So our Simutronics front ends are stored at
'''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!


~/.wine/drive_c/Program\ Files/SIMU/STORM
==Final Steps==
After confirming everything is working the way you want, don't forget! Open up Terminal and type the following three commands:


~/.wine/drive_c/Program\ Files/SIMU/WIZARD
brew pin gtk+
brew pin cairo
brew pin pango


To move your existing Stormfront configuration, take these steps:


1) Check to see if your scripts and such are saved on the server. If they are - confirm they're available to you
Enjoy!
2) If they're not, on your old system with Stormfront - click on the Options button, then select SETTINGS and EXPORT
3) This will create an XML file. Copy this file over to your Mac (desktop is fine if you wish)
4) Start the game on your Mac with Lich and Stormfront, and then on that system, click Options > SETTINGS and IMPORT
5) Confirm your settings / highlights / scripts are available to you.

To move over your existing Wizard configuration (it's a bit harder), take these steps:

1) On your old system, copy the directory under Wizard called Gemstone
2) On your new Mac you'll need to use Terminal to put them in the right place
3) On your new Mac, you need to have the Wizard front end (via wine) already installed
4) Put the Gemstone folder on your desktop
5) In Terminal, type in
cd
cp -R ./Desktop/Gemstone ./.wine/drive_c/Program\ Files/SIMU/WIZARD/
6) Log into the game and see if your files made the transfer


'''Don't forget, Terminal remembers your command history'''

Just like in the game front ends, if you want to repeat a command that you've already typed in, you can simply hit the UP ARROW on your keyboard, and scroll backwards to find the command. If you go too far, DOWN ARROW will scroll you forwards. Admittedly, this is most advantageous when you're getting ready to play, and you hit UP ARROW to get your 'ruby ./lich/lich.rbw' command back.

From time to time, contributors may make changes / modifications to these tips (and the article in general), so bookmark this page, and check it periodically to see what's new and exciting!

'''If you're lazy, like a good Unix admin, use AUTOCOMPLETE in your Terminal window'''

Your Terminal window in Mac OS X will allow you to zip through long filenames and directory paths, if you use the TAB key (autocomplete). For example, in the Wizard instructions above, you can simply type in the following (and hit the TAB key where the field has [T]ab

5) cp -R ./Desk[T]ab/Gem[T]ab ./.wine/driv[T]ab/Prog[T]ab/SIMU/WIZ[T]ab

Autocomplete makes things much easier, and much less error prone! This will work if the file or directory already exists. If you hit TAB and it doesn't autocomplete, the capitalization is off - Unix is case sensitive!


==Resources==
==Resources==
* [https://www.dropbox.com/s/itj42g2bdza50se/lichdiag.sh?dl=0 Lich Diagnostics] 3rd party, not supported by Simutronics
* [http://bit.ly/GSLichDiag OS X Lich Diagnostics] 3rd party, not supported by Simutronics
* [http://bit.ly/GSLichInstall OS X Lich Installation Script] 3rd party, not supported by Simutronics
* [[Lich scripting reference]]
* [[Lich scripting reference]]
* Tillmen's Lich Update (v4.6.33): https://lichproject.org/
* Tillmen's Lich Update (v4.6.33): https://lichproject.org/

Revision as of 02:48, 20 July 2019

Background

Mac OS X systems for all versions from Mavericks (10.9) to Mojave (10.14) 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

To run this script, download the installer 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/osxlich.sh
         ./Downloads/osxlich.sh
3)  The output in Terminal will tell you when you're done.

There are six steps to getting Lich up and running on your new Mac. The installer will take care of the first five.

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.


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.


Running Lich for the First Time

For most first time lich users, starting up is easy. In terminal, run the following command:

ruby lich/lich.rbw

Log in with your account and password, and then select the character you want to play, and select Avalon as your FE.

In order to start the game with Lich (for Frostbite and other FE users), from Terminal we'll have to run the following command:

sudo ruby lich/lich.rbw --gemstone --<name of the FE you are using>


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 ruby line above in your Terminal window. You can just press enter, fire up Lich and enjoy again!


Enjoy!

A Few (More) Quick Pro Tips

If you've read this far, you're going to benefit!

caffeinate -di [command]

Sometimes your Mac will want to go to sleep, and will disrupt your processes - even sometimes causing the dread 'SEGFAULT' that reboots your Mac with cryptic information that no one really can use (despite claims to the contrary). If you use the 'caffeinate' command in Terminal, your Mac will not sleep ( [d]isplay or computer [i]dle ) until the command completes. Suggested usage might be 'caffeinate -di ./osxinstall.sh' as one (very pertinent) example.

Install Wine

Took the plunge from a Windows PC to Mac OS X, but not quite ready to give up on your Stormfront or Wizard (my personal fav) yet? Great news! You don't have to. While Avalon is a tried and tested Mac front end, let's face it - the PC crowd presently has the better collection of front ends. So, how do you make this magic all happen? Just follow these instructions (wine installs are as long or longer than the core OS X Lich installs, so make sure you have time!) And now might just be a good time to test 'caffeinate' on that first command - it takes a while and might abort if the machine tries to sleep.

Command Explanation
Open Terminal Yes, we love this application to do heavy work!
cd Always a good idea anytime you're not sure exactly where you are (which folder) on your Mac
caffeinate -di HOMEBREW_NO_AUTO_UPDATE=1 brew install wine winetricks This will take a bit of time to complete, so we'll pour in some caffeine.
curl -OL http://www.play.net/software/lnchInst.exe Don't just click the link, copy (or type) the entire command.
wine lnchInst.exe You might see a few errors / warnings, but it'll work as of 8/2016
ruby ./lich/lich.rbw Log in as normal and select the windows FE of your choice -- remember, I recommend Wizard.

Troubleshooting - you may get this strange error message: "concat': no implicit conversion of Errno::EACCES into String (TypeError)" . If you've used Avalon and Lich previously (in particular, using 'sudo ruby' as the instructions say), then we have one step we need to take to remove this error. Don't worry, it is an expected outcome of using sudo with lich, and can be fixed with one line.

Command Explanation
cd Absolutely ensure we're in the right directory
sudo chown -R $(whoami):staff ./lich change ownership of all content in the lich directory to your username
ruby ./lich/lich.rbw continue on with the login

At this point, you'll see the Lich login window - just type in your account information, select your character, and then look at the two radio buttons. One of them is Wizard, and the other Stormfront. Select your preference, and click PLAY. Your front end will be downloaded and you'll be guided to install (please just select the default locations - wine knows what it's doing).

Caution - sometimes wine takes a bit of time 'searching' for a previous installation of a file, especially the Wizard. No panic, let the process complete. Then you may not connect, especially the Wizard, the first time. No worries - wait it out and close up Terminal, then start Terminal again, and re-enter the command. You'll get in the second time.

Note: Stormfront is a very nice looking front end, but it has a memory leak in it. This situation is really exacerbated on a Mac / wine installation. You'll notice the front end start to get sluggish. When it does - simply move someplace safe, log out, and log back in. Voilà!

Use those config files!

If you've been playing for a while, you'll have a couple of challenges to overcome - migrating any non-lich scripts you may have, and migrating your existing highlights, macros and other settings. The process is slightly different for each front end, but in general:

Wine installs all Windows programs under the user directory at the following path:

~/.wine/drive_c/Program\ Files

So our Simutronics front ends are stored at

~/.wine/drive_c/Program\ Files/SIMU/STORM

~/.wine/drive_c/Program\ Files/SIMU/WIZARD

To move your existing Stormfront configuration, take these steps:

1) Check to see if your scripts and such are saved on the server.  If they are - confirm they're available to you
2) If they're not, on your old system with Stormfront - click on the Options button, then select SETTINGS and EXPORT
3) This will create an XML file.  Copy this file over to your Mac (desktop is fine if you wish)
4) Start the game on your Mac with Lich and Stormfront, and then on that system, click Options > SETTINGS and IMPORT
5) Confirm your settings / highlights / scripts are available to you.

To move over your existing Wizard configuration (it's a bit harder), take these steps:

1) On your old system, copy the directory under Wizard called Gemstone
2) On your new Mac you'll need to use Terminal to put them in the right place
3) On your new Mac, you need to have the Wizard front end (via wine) already installed
4) Put the Gemstone folder on your desktop
5) In Terminal, type in
      cd
      cp -R ./Desktop/Gemstone ./.wine/drive_c/Program\ Files/SIMU/WIZARD/
6) Log into the game and see if your files made the transfer


Don't forget, Terminal remembers your command history

Just like in the game front ends, if you want to repeat a command that you've already typed in, you can simply hit the UP ARROW on your keyboard, and scroll backwards to find the command. If you go too far, DOWN ARROW will scroll you forwards. Admittedly, this is most advantageous when you're getting ready to play, and you hit UP ARROW to get your 'ruby ./lich/lich.rbw' command back.

From time to time, contributors may make changes / modifications to these tips (and the article in general), so bookmark this page, and check it periodically to see what's new and exciting!

If you're lazy, like a good Unix admin, use AUTOCOMPLETE in your Terminal window

Your Terminal window in Mac OS X will allow you to zip through long filenames and directory paths, if you use the TAB key (autocomplete). For example, in the Wizard instructions above, you can simply type in the following (and hit the TAB key where the field has [T]ab

 5)  cp -R ./Desk[T]ab/Gem[T]ab ./.wine/driv[T]ab/Prog[T]ab/SIMU/WIZ[T]ab

Autocomplete makes things much easier, and much less error prone! This will work if the file or directory already exists. If you hit TAB and it doesn't autocomplete, the capitalization is off - Unix is case sensitive!

Resources

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