Skip to content
Jonas Andersson edited this page Oct 14, 2016 · 38 revisions

Setting up your lich developer environment using the terminal

This guide assumes you are running Ubuntu or some variant (Mint). If not your results may vary.

Workflow

The general idea is to fork this repository, create a branch, make your changes, make a pull request and have your code reviewed.

Optional: Install Wine-Development

Reference: https://wiki.winehq.org/Ubuntu

sudo dpkg --add-architecture i386 
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel

This isn't developer related, but the development version of Wine will fix some annoying errors related to running Stormfront in Linux.

Optional: Install RVM

Reference: https://rvm.io/

This is useful for managing multiple versions of Ruby. Lich uses a relatively old version of Ruby, so it may be useful to install RVM so you can easily install multiple ruby versions as well as set which is the default. Set your terminal to "Run command as a login shell". This is done in "Edit|Profile Preferences" on gnome-terminal.

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable

Open a new terminal

rvm install 2.0.0
rvm --default use 2.0.0

Install lich

Reference: https://lichproject.org/download.html

Its probably best to follow the directions in the above reference, but the following is provided assuming you installed RVM and Wine-development

gem install sqlite3 
gem install gtk2 -v 3.0.7
wget http://www.play.net/software/lnchInst.exe
wine lnchInst.exe 
wget https://lichproject.org/download/lich-4.6.37.zip
unzip lich-4.6.37.zip
ruby lich/lich.rbw

Fork this repository

Forking creates a separate environment for you to change. You will need to make a pull request to have these changes deployed.

Click the "Fork" button in the top right. You will only need to do this one time.

Clone the repository to your local machine

Cloning creates a local copy of a remote repository. Run git clone git@github.com:YOURUSERNAME/dr-scripts.git in whatever directory you like.

Alternatively, you can use https: git clone https://github.com/YOURUSERNAME/dr-scripts.git

Its highly suggested that you do not commit anything to the master branch and just use it to fetch updates.

Add this repository as a remote repository

cd dr-scripts
git remote add upstream git@github.com:rpherbig/dr-scripts.git

You will fetch updates from this repository and merge them to your fork

To check your remotes: git remote -v

Read about adding a remote repository here: https://help.github.com/articles/adding-a-remote/

Symlink your cloned repository to your lich scripts folder

Back up your profiles folder by renaming it: mv profiles profiles-backup

Use the provided scripts create_symlinks.sh or create_symlinks.bat. Instructions for doing this manually are forthcoming.

Symlink your character profiles into profiles directory that the script created:

cd profiles
ln -s ../profiles-backup/MyCharacterName*

Run DR and toggle the development environment

>;e toggle_developer_mode
--- Lich: exec1 active.
[exec1: Developer mode now set to: true]
--- Lich: exec1 has exited.

This will disable script updates and you will have to update using git fetch upstream and git merge upstream/master

Create a branch

As an example, lets say you want to update combat-trainer.lic to use chunky bacon. You should create a branch and make your chunky bacon related changes to this branch. This will separate your changes from the rest of the code and make it clear what you are changing.

git branch combat-trainer-chunky-bacon
git checkout combat-trainer-chunky-bacon

Create a pull request

Instructions forthcoming

Setting up your lich developer environment using the GitHub Windows App

Instructions Forthcoming

Clone this wiki locally