Building CodeLite from sources
Windows
Important
We only support MSYS2 terminal
- Open
MSYS2terminal, and type:
git clone https://github.com/eranif/codelite.git
cd codelite
git submodule update --init --recursive
# Use the build script to build CodeLite along with its dependencies
./build.sh
Note
build.sh builds wxWidgets inside the build folder (.build-release/wxWidgets-install) and CMake finds it using
its CMake package config. You do not need to install wx-config (or wx-config-msys2) on Windows.
To build a different wxWidgets version (a tag or a branch), set CL_WX_VERSION (Windows only), for example:
CL_WX_VERSION=v3.2.11 ./build.sh. If the existing build in .build-release/wxWidgets-install is of another
version, it is rebuilt.
- To run the new CodeLite:
(cd .build-release/install/bin && ./codelite.exe)
Linux
- You do not need to install wxWidgets:
build.shbuilds it inside the build folder (.build-release/wxWidgets-install). It needs the GTK 3 development package (libgtk-3-devon Ubuntu / Debian). - Install the build tools and the libraries (the package names depend on your distro). On Ubuntu / Debian, you can use this command:
sudo apt install build-essential \
git cmake \
libgtk-3-dev \
libssh-dev libsqlite3-dev \
libmariadb-dev \
libpq-dev \
libpcre2-dev bison flex \
universal-ctags \
fonts-noto
sudo fc-cache -fv
Note
fonts-noto is required for proper display of Unicode symbols in the editor.
- Git clone the sources and build CodeLite:
git clone https://github.com/eranif/codelite.git
cd codelite
git submodule update --init --recursive
./build.sh
Note
The first build is slow, because it also builds wxWidgets. The next builds reuse it.
- To run the new CodeLite:
.build-release/bin/codelite
- To uninstall CodeLite:
cd .build-release # cd to the build directory created by build.sh script
sudo xargs rm -vf < install_manifest.txt
macOS
Prerequisites:
- CMake
- Git
- clang++ / clang
- Flex
- autoconf
Preparation:
- (Optional) Make a separate folder for building if you want to get rid of all except the
.appfile after building - Install Xcode from Mac App Store
- Install Xcode command-line tools:
xcode-select --install(or you can typeclangfrom the command line and if it is missing you will be prompted to install it) - Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install the required libraries:
brew update
brew install git \
cmake \
universal-ctags\
flex \
autoconf \
automake \
libtool \
mariadb \
postgresql \
gettext
- Usually,
brewwill install everything under/opt/homebrew, so run this from the terminal:
echo 'export PATH=/opt/homebrew/bin:$PATH' >> $HOME/.$(basename $SHELL)rc
source $HOME/.$(basename $SHELL)rc
- Finally, Build CodeLite:
mkdir -p $HOME/devl
cd $_
git clone https://github.com/eranif/codelite.git
cd codelite
git submodule update --init --recursive
./build.sh
You should now have an app bundle $HOME/devl/codelite/.build-release/codelite.app
To launch CodeLite:
open $HOME/devl/codelite/build-release/codelite.app
Shell completion for build.sh
On all platforms (Bash only, in the MSYS2 terminal on Windows), you can get tab completion for the options and
targets of build.sh. Add this line to your ~/.bashrc (replace the path with your CodeLite sources folder):
source /path/to/codelite/scripts/build-completion.bash
Open a new shell, then type ./build.sh --<TAB> to see the options, or ./build.sh <TAB> to see the targets.