User:DOUG/Sandbox Lich Stuff: Difference between revisions

The official GemStone IV encyclopedia.
< User:DOUG
Jump to navigation Jump to search
mNo edit summary
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<section begin=GTK3PublicBeta />
Let's start a short note page that keeps track of what I'm trying to do to get Lich to run on El Capitan. Using Virtual Box to keep from having to reinstall over and over and over. . .


==GTK3 Beta Test==
Initial effort successful. Now working with basic installation. Basic installation below successful (for those who might be peeking and simply can't wait). Now working on bottling the two odd lines (cairo and gtk+). If I can bottle them, I should be able to build a binaries distribution package that won't require a long time compiling these brew recipes and the gems. It'll start being El Cap only, but I might add Mavericks and Yosemite to the binaries package as well. I'd have to move to downloading most of the bottles at that point, but it still would be significantly faster.


Welcome to the GTK3 Ruby Lich Public Beta!
==Current Issues==


Before we begin, there are a couple of things you should know about participating in this beta program:
AS OF 7/25/2016


1) It IS a beta program. If something can go wrong, it just might, here. So follow these instructions carefully to have the BEST shot at recovering your Lich installation and continuing to enjoy Gemstone.
Newest gem versions (3.0.8) do not compile under Ruby 2.0 (OEM install on OSX)
Homebrew no longer supports versions (can't install anything but current brews)
Ruby 2.3+ drops support for $SAFE to only 0 and 1 (normal and tainted data). Lich uses $SAFE=3.
Note: Modify Lich file to $SAFE=1 allows Lich to operate in 2.3 - fastest possible path, but need Tillmen's input and his risk acceptance


* It is vitally important that you NOT participate in the GTK3 beta if you are not already a Lich user. If you are new to Gemstone and Lich, do not use this Public Beta. Instead, use the stable installer build at https://bit.ly/WinLich .
Building pkg has several challenges, including continual auto build / test / update cycles that aren't available to me presently.
* If you are already a Lich user, and you are comfortable participating in the Public Beta, then you should at an absolute minimum, back up your existing Lich folder. The beta installer does not touch the existing lich folder, but if something can go wrong, you should have a copy saved somewhere.
* If you are already a Lich user, and you are comfortable participating in the Public Beta, then you should rename your existing Ruby installation. If you accepted the default installation from the stable installer build, your Ruby installation is at C:\Ruby4Lich . You can simply rename that folder C:\save-Ruby4Lich , and you will be able to easily revert back from the beta to your current Ruby4Lich installation.
* Remember that the GTK3 beta is intended to retire GTK2, given its age and lack of updates. What this means to you is that any Lich program that uses a graphical user interface (GUI) will behave differently. The team has updated the LICH.RBW file and the core scripts distributed by Tillmen to work with GTK3. The team has also updated some of the more popular scripts and included them in a subdirectory for you to use, if you wish.
2) If you are happy with what you have read so far, and are eager to get started, exit all characters from the game.
3) Back up your lich directory and rename your existing Ruby4Lich (or other Ruby) installation.
4) Download the BetaGTK3-Ruby4Lich installer here: https://www.dropbox.com/s/upkg2qy1vmip31z/BetaGTK3-Ruby4Lich.exe?dl=1
5) Run the installer. Be patient, it may take some time especially on non-SSD harddrives - it is installing 70K plus files.
6) When done, click FINISH on the installer, and you will see the GTK3Lich folder on your desktop. Run the LICH.RBW file from that folder and confirm you can log in with Lich active.
At this point, you can make plans to copy the GTK3Lich files into your existing Lich directory so you don't have to redo everything. You did remember to back up your existing Lich directory, right? If not, do it now before you start moving scripts around.
Any and all errors please share in the #scripting channel on Discord. Please ensure you provide a current run of ''';version''' with your report
Enjoy!


'''Turning focus to a shell script install, which will take the actions for the users and will hopefully be simpler to maintain.'''




===GTK3 Public Beta FAQ===
==Script outline==


'''Q: Why am I renaming my Ruby4Lich directory instead of just deleting it?'''
1) Detect platform (OSX 10.9, 10.10 or 10.11)
2) Detect CLT and if absent, install CLT (oh, and xQuartz. . . hmmm)
3) Detect current active Ruby version (likely 2.0.0.p645 on OEM installs)
4) Detect homebrew and if present, update to latest formulae. If not present, install.
5) Detect rbenv / rvm - might need to consider if this is a developer platform. If neither present, install rbenv
6) Install and set global ruby 2.2.5 (last general release prior to 2.3)
7) Update gem and rehash rbenv env
8) Install cairo (x-11), gtk+ (2.24!), sqlite3, gtk2 gems
9) Grab lich, avalon
10) Test lich (both login window type and gemstone / avalon switch)
11) Save all log / diagnostic and publish loc to user for follow up if required
12) Release to user


A: During the beta test you may find a critical script that you cannot live without that simply does not work right. If you delete your existing Ruby4Lich installation, and later decide to exit the beta test, you'll have to reinstall Ruby4Lich to continue enjoying Lich and Gemstone. Renaming will save you time, if you decide the beta program is not for you.
Options to consider:
Apple script or additional bash script to semi-automate game start with lich
Maintenance methods (partial update, troubleshooting assistance)
MacPorts for ruby version install (not desired)


'''Q: What should I do when I see a bunch of information about a script that I'm running needing to be fixed?'''
==Prior Issues==
'''[[3/7]]''' Created hash and edited formula. Bottle pours properly, build seems to work. Have a couple decisions to make - bottles for each of 3 (Mavericks, Yosemite, El Capitan) which will make the install bundle 75M for about 25M worth of useful files, or bottles for 'most popular' and compile for all the rest. A third option - check to see if 'universal binary' means what it says and it works on all three OS's. Probably a pipe dream, though.


A: Come to Discord#scripting and put the script name up with a reference to GTK3. The team will look at it, and convert it or notify the script author to do the update.
[[prior to 3/7]] 2.24.28 doesn't want to bottle - but kludged through. Formula needs to be updated and sent or bottle cannot be installed. - need sha256 value for bottle to install - stopping here for a day or two.


'''Q: I just copied the new GTK3Lich scripts into my standard Lich folder, and now nothing works right. What do I do?'''
==Alpha Build Package==
add pre action script to start log, detect major.minor of OS
add pre action script health check (gcc, brew, gem, installed brews, installed gems)


A: Check to be sure you also copied the Lich.rbw file over - without that, your install will not work properly.
needs a lot of work here, but will have to make some logical choices and decide if moving / saving old configs might be in the cards.


'''Q: Why are we doing this when the existing installer works?'''
add post action script to existing package to pour 2.24.28 properly.
add post action script to pin 3 gems


A: Three reasons - the most important being that we want to update to a faster and more stable Ruby. Second, we want to get onto the more current graphics display framework (GTK3), since the older existing graphics display framework (GTK2) is not updated and has some defects in it. Third, some exciting new scripts are being developed that will only work with the more current graphics display framework.
==Build Installation==


'''Q: What's my emergency recovery procedure if I just want to go back to what I know?'''
Clean 10.11.3 install with CLT, Homebrew (and glib), xQuartz


A: Tricky question! That will depend on what you did or chose not to do from the recommendations. The short list based on the recommendations is to restore your original LICH folder from the copy you made at the very beginning, then uninstall the GTK3Beta-Ruby4Lich application and delete the folder, then rename your saved Ruby4Lich folder back to just Ruby4Lich. You are now ready to try starting up your restored LICH installation. If it asks you how to deal with lich.rbw, just associate the file with the Ruby4Lich\bin\rubyw.exe application. That should restore your functionality. If it doesn't, swing by Discord#scripting and let us know.
bottle cairo with the x11 arg


<section end=GTK3PublicBeta />
bottle gtk+2.24.28 https://raw.githubusercontent.com/Homebrew/homebrew/bb3fe5f2de87f76bc0a3f3480635c8fd0d68cec3/Library/Formula/gtk+.rb

package up the gems

pkgbuild two (or more?) bottles with prefix /Library/Caches/Homebrew and 7 gems with prefix $(gem environment gemdir)

then put them together into an OS X Installer package - no frills.

Copy installer package to subsequent clean 10.11.3 install and install.

Then manually brew install the bottles, copy / extract lich, download avalon and test.

==Basic Installation==
'''This works''' for anyone who wants to use it on a clean install. Might require some cleanup if user already attempted to install.

Base 10.11 install

gcc -v to force command line tool install

update through App Store to 10.11.3 (current as of 2/29/2016)

Install Homebrew

brew install glib

Install Chrome

Install xQuartz

brew install --with-x11 cairo

brew install https://raw.githubusercontent.com/Homebrew/homebrew/bb3fe5f2de87f76bc0a3f3480635c8fd0d68cec3/Library/Formula/gtk+.rb

updated long link to - brew install http://bit.ly/GetGTKLich (test this)

sudo gem install gtk2

sudo gem install sqlite3

curl -OL https://lichproject.org/download/lich-4.6.22.zip (current Tillmen Lich)

install Avalon 4.3.2 beta (current GS FE for Mac)

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

(Options to set up for no sudo - hate using sudo for local gem installs)

change sudo gem install gtk2 to gem install --user-install --bindir~/bin --no-document gtk2

change sudo gem install sqlite3 to gem install --user-install -bindir~/bin --no-document sqlite3

still have to sudo to get into the game (due to having to temp modify /etc/hosts) '''This *could* be addressed a couple different ways, pursue this!'''

Test


'''Important note''': while 2.24.28 https://raw.githubusercontent.com/Homebrew/homebrew/0772cb6a2c25589ef9914698082509fe518f596d/Library/Formula/gtk+.rb already has a bottled install, it causes the same issue. No value to that bottle.


Base OS 10.11 install.

Update to 10.11.3 (current as of 4 March 2016).

Install Chrome (because)

Install CLT

Install Homebrew

---------

Install XQuartz

Install RBENV (because I personally prefer this to RVM)

Install ruby 2.2.2

Global 2.2.2

Install gtk+2.24.28 (requires specific pull from https://raw.githubusercontent.com/Homebrew/homebrew/bb3fe5f2de87f76bc0a3f3480635c8fd0d68cec3/Library/Formula/gtk+.rb)

gem install gtk2

gem install sqlite3

curl -OL https://lichproject.org/download/lich-4.6.22.zip (current Tillmen Lich)

install Avalon 4.3.2 beta (current GS FE for Mac)

Special note - seems gtk+-2.24.28 will require Cairo built with X11 (xQuartz) extensions, so the normal cairo bottle will fail. - brew install --with-x11 cairo to address.

--------------

If all this works, back up to base image and try with standard El Cap Ruby

Revision as of 14:09, 9 September 2020


GTK3 Beta Test

Welcome to the GTK3 Ruby Lich Public Beta!

Before we begin, there are a couple of things you should know about participating in this beta program:

1) It IS a beta program. If something can go wrong, it just might, here. So follow these instructions carefully to have the BEST shot at recovering your Lich installation and continuing to enjoy Gemstone.

  • It is vitally important that you NOT participate in the GTK3 beta if you are not already a Lich user. If you are new to Gemstone and Lich, do not use this Public Beta. Instead, use the stable installer build at https://bit.ly/WinLich .
  • If you are already a Lich user, and you are comfortable participating in the Public Beta, then you should at an absolute minimum, back up your existing Lich folder. The beta installer does not touch the existing lich folder, but if something can go wrong, you should have a copy saved somewhere.
  • If you are already a Lich user, and you are comfortable participating in the Public Beta, then you should rename your existing Ruby installation. If you accepted the default installation from the stable installer build, your Ruby installation is at C:\Ruby4Lich . You can simply rename that folder C:\save-Ruby4Lich , and you will be able to easily revert back from the beta to your current Ruby4Lich installation.
  • Remember that the GTK3 beta is intended to retire GTK2, given its age and lack of updates. What this means to you is that any Lich program that uses a graphical user interface (GUI) will behave differently. The team has updated the LICH.RBW file and the core scripts distributed by Tillmen to work with GTK3. The team has also updated some of the more popular scripts and included them in a subdirectory for you to use, if you wish.

2) If you are happy with what you have read so far, and are eager to get started, exit all characters from the game.

3) Back up your lich directory and rename your existing Ruby4Lich (or other Ruby) installation.

4) Download the BetaGTK3-Ruby4Lich installer here: https://www.dropbox.com/s/upkg2qy1vmip31z/BetaGTK3-Ruby4Lich.exe?dl=1

5) Run the installer. Be patient, it may take some time especially on non-SSD harddrives - it is installing 70K plus files.

6) When done, click FINISH on the installer, and you will see the GTK3Lich folder on your desktop. Run the LICH.RBW file from that folder and confirm you can log in with Lich active.

At this point, you can make plans to copy the GTK3Lich files into your existing Lich directory so you don't have to redo everything. You did remember to back up your existing Lich directory, right? If not, do it now before you start moving scripts around.

Any and all errors please share in the #scripting channel on Discord. Please ensure you provide a current run of ;version with your report

Enjoy!


GTK3 Public Beta FAQ

Q: Why am I renaming my Ruby4Lich directory instead of just deleting it?

A: During the beta test you may find a critical script that you cannot live without that simply does not work right. If you delete your existing Ruby4Lich installation, and later decide to exit the beta test, you'll have to reinstall Ruby4Lich to continue enjoying Lich and Gemstone. Renaming will save you time, if you decide the beta program is not for you.

Q: What should I do when I see a bunch of information about a script that I'm running needing to be fixed?

A: Come to Discord#scripting and put the script name up with a reference to GTK3. The team will look at it, and convert it or notify the script author to do the update.

Q: I just copied the new GTK3Lich scripts into my standard Lich folder, and now nothing works right. What do I do?

A: Check to be sure you also copied the Lich.rbw file over - without that, your install will not work properly.

Q: Why are we doing this when the existing installer works?

A: Three reasons - the most important being that we want to update to a faster and more stable Ruby. Second, we want to get onto the more current graphics display framework (GTK3), since the older existing graphics display framework (GTK2) is not updated and has some defects in it. Third, some exciting new scripts are being developed that will only work with the more current graphics display framework.

Q: What's my emergency recovery procedure if I just want to go back to what I know?

A: Tricky question! That will depend on what you did or chose not to do from the recommendations. The short list based on the recommendations is to restore your original LICH folder from the copy you made at the very beginning, then uninstall the GTK3Beta-Ruby4Lich application and delete the folder, then rename your saved Ruby4Lich folder back to just Ruby4Lich. You are now ready to try starting up your restored LICH installation. If it asks you how to deal with lich.rbw, just associate the file with the Ruby4Lich\bin\rubyw.exe application. That should restore your functionality. If it doesn't, swing by Discord#scripting and let us know.