Building on Ubuntu 16.04 - adamallaf/lime GitHub Wiki

The build process is divided in several steps; one for the backend and one for each frontend. In the script below, dependencies and source code is downloaded for the backend and the QML frontend. It does not cover the Termbox and HTML frontends as they have (at the time of writing) not been updated to build correctly since the backend was restructured.

#!/usr/bin/env bash
# # source: https://github.com/limetext/lime/wiki/Building-on-Ubuntu-16.04
set -euo pipefail

# Set the required environment variables.
export GOPATH=~/golang
export PKG_CONFIG_PATH=$GOPATH/src/github.com/limetext/rubex
export GODEBUG=cgocheck=0 # Required for the code to work with Go 1.6.

# Set up the backend.
sudo apt-get -y install git golang libonig-dev libonig2 mercurial python3.5 python3.5-dev
# next line is from https://github.com/limetext/lime/issues/565
go get github.com/limetext/sublime 
go get github.com/limetext/backend
cd $GOPATH/src/github.com/limetext/backend
git submodule update --init --recursive
go test github.com/limetext/backend/...

# Set up the QML frontend.
sudo apt-get -y install libqt5opengl5-dev libqt5qml-graphicaleffects qtbase5-private-dev qtdeclarative5-controls-plugin qtdeclarative5-dev qtdeclarative5-dialogs-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-window-plugin
go get github.com/limetext/lime-qml/main/...
cd $GOPATH/src/github.com/limetext/lime-qml
git submodule update --init --recursive

# Build and run the QML frontend.
cd $GOPATH/src/github.com/limetext/lime-qml/main
go build
./main

The environment variables must be set when working with the source. The smoothest way to handle it is likely to add

# limetext configuration
export GOPATH=~/golang
export PKG_CONFIG_PATH=$GOPATH/src/github.com/limetext/rubex
export GODEBUG=cgocheck=0
alias limeqml="cd $GOPATH/src/github.com/limetext/lime-qml/main && go build && ./main"

to your ~/.bashrc and then use limeqml in your terminal to rebuild and start the QML frontend.