Skip to content

Building on Debian Stretch

Brendan Ingram edited this page Jun 8, 2016 · 1 revision

NOTE 1: I am not a contributor to LimeText, and have only just found the project. The notes below are copied from the Ubuntu 16.04 instructions, with package names changed to reflect Debian packages. I have verified all of the following on my Debian Stretch machine.

NOTE 2: The application runs, but it appears there are a few styling issues. Due to my inexperience with the codebase, I can not say for certain whether these are because of missing Qt libraries, or because of the immaturity of the codebase.

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
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 install git golang libonig-dev libonig2 mercurial python3.5 python3.5-dev
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 install libqt5opengl5-dev qml-module-qtgraphicaleffects qtbase5-private-dev qml-module-qtquick-controls qtdeclarative5-dev qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-window2
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.