Skip to content

Building on Ubuntu 14.04

Tamir Bahar edited this page Jul 12, 2018 · 23 revisions

Base dependencies

Dependency Python 3.5 Oniguruma Git Mercurial Go 1.4
Command python3.5 python3.5-dev libonig2 libonig-dev git mercurial golang

To meet all the dependencies :

for the latest version of go (because the one in the repo's is old) do:

sudo add-apt-repository ppa:evarlast/golang1.4

As of October 13th 2015, python 3.5 isn't on the official ubuntu repo, you can find it in this one:

sudo add-apt-repository ppa:deadsnakes

and after that do:

sudo apt-get update
sudo apt-get install python3.5 python3.5-dev libonig2 libonig-dev git golang mercurial libqt5qml-graphicaleffects libqt5opengl5-dev qtbase5-private-dev qtdeclarative5-dev qtdeclarative5-controls-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-dialogs-plugin qtdeclarative5-window-plugin

Downloading backend and setting up environment

Backend will be automatically downloaded as frontend's dependency.

export GOPATH=~/golang
export PKG_CONFIG_PATH=$GOPATH/src/github.com/limetext/rubex

GET THE BACKEND

Use the go source-code controller to get the lime-backend source

go get github.com/limetext/lime-backend/lib/...

If you have various other go packages on your machine, it's possible that your local copies of those libraries are stale and need to be updated. If that's the case, add the -u flag to update all the dependencies.

go get -u github.com/limetext/lime-backend/lib/...

You also need to init and update all the submodules which isn't done automatically by go get.

cd $GOPATH/src/github.com/limetext/lime-backend
git submodule update --init --recursive

It will take a while, as it has to update all the submodules.

Testing

Now make sure it all installed correctly by running the tests.

go test github.com/limetext/lime-backend/lib/...

Getting the FRONTENDS

Lime text frontends comes in three variants :

  • QML - The QT Modelling Language
  • HTML - Browser based text editor
  • TERMBOX - Vim like terminal based text editor

QML

Getting the QML

To run the QML frontend, you'll need Qt 5 installed:

sudo apt-get install libqt5qml-graphicaleffects libqt5opengl5-dev qtbase5-private-dev qtdeclarative5-dev qtdeclarative5-controls-plugin qtdeclarative5-quicklayouts-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-dialogs-plugin qtdeclarative5-window-plugin

Go get the QML frontend.

go get github.com/limetext/lime-qml/main/...

Similar to the backend, there is a step to update all the modules.

cd $GOPATH/src/github.com/limetext/lime-qml
git submodule update --init --recursive

Building the QML Frontend

To build the QML Frontend,

cd $GOPATH/src/github.com/limetext/lime-qml/main
go build
./main

By now there should be a lime-text window, with the file main.go open

HTML

Getting the HTML

Go get the HTML frontend.

go get github.com/limetext/lime-html/main/...

Again update all the submodules,

cd $GOPATH/src/github.com/limetext/lime-html
git submodule update --init --recursive

Building the HTML Frontend

To build and run the html frontend,

cd $GOPATH/src/github.com/limetext/lime-html/main
go build
./main

The port 8080 at the localhost is being listened, Point your browser to localhost:8080 :

Termbox

Getting the TERMBOX

Go get the termbox frontend.

go get github.com/limetext/lime-termbox/main/...

And again,

cd $GOPATH/src/github.com/limetext/lime-termbox
git submodule update --init --recursive

Building the Termbox Frontend

To build and run:

cd $GOPATH/src/github.com/limetext/lime-termbox/main
go build
./main main.go

Press Ctrl / Cmd + Q to quit.