Ubuntu Developer Setup - elanthia-online/dr-scripts GitHub Wiki
Setting up your lich developer environment using the terminal
This guide assumes you are running Ubuntu. 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
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
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. It also removes the need to run ruby commands (gem install) as super user (with sudo)
Set your terminal to "Run command as a login shell". This is done in "Edit|Profile Preferences" on gnome-terminal.
Follow the directions here to install: https://github.com/rvm/ubuntu_rvm#install
Windows Subsystem for Linux(WSL) users:
Skip the step about checking a box for running as login shell. This is done by default on WSL.
Use this version of ruby if you have no preference.
rvm install 2.3.7
rvm --default use 2.3.7
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
Open a new terminal
gem install sqlite3
gem install gtk2
wget http://www.play.net/software/lnchInst.exe
wine lnchInst.exe
wget https://lichproject.org/download/lich-4.6.49.zip
unzip lich-4.6.49.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 [email protected]: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 [email protected]: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/
Run DR and Install Dependency
See instructions elsewhere on this wiki for this
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
Toggle the Lich fork
With dependency installed you can run a DR specific version of lich which has some targeted improvements for the game, not found in the original lich. To do this run ;e use_lich_fork
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-* .
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 checkout -B combat-trainer-chunky-bacon
Create a pull request
Instructions forthcoming