LiteEditor is an open source, cross platform IDE (Integrated Development
Environment) for the C/C++ languages.
It was first developed to demonstrate the features of CodeLite - the internal
CodeCompletion engine - but evolved to become more.
Installation
Linux
For Linux users, I suggest downloading the sources from the SVN and building
it using makefile.
Below is a list of the dependencies that LiteEditor requires:
-
wxWidgets 2.8.X (wxWidgets can be obtained from here:
wxWidgets Web Site)
-
'wx-config' tool is located somewhere in your path (after installing
wxWidgets, it should be there), to test it, type:
which wx-config
Download the sources using any SVN client:
svn co https://codelite.svn.sourceforge.net/svnroot/codelite codelite
From within the trunk directory, type:
make type=release
then, to install it:
sudo make type=release install
The makefile argument 'type' can accept any of the following values, depends
on the build configuration you used for wxWidgets:
-
release_unicode
-
release
-
debug_unicode
-
debug
Additionals (MinGW)
LiteEditor is working best with the GCC compilers (g++, gcc).
For windows users, it is recommend to download and install MinGW from here:
http://sourceforge.net/project/showfiles.php?group_id=2435
download the 'Current -> MinGW-5.1.3.exe' and follow the instructions.
General Overview
Directory layout
The default installation path for LiteEditor on Windows, is
'
C:\Progream Files\LiteEditor'
(this can be modified during setup), on Linux it will be copied to
$(HOME)/.liteeditor .
Under the installation directory, LiteEditor expects the following four
directories:
'config' directory
Under config directory, you will find two xml files:
-
liteeditor.xml - the main configuration file, which contains data
saved between sessions, such as: Find history, panes layout, windows
positioning different dialogs settings and more
-
build_settings.xml - this file contains information related to the
compilers & the build system. (see below for more information)
'lexers' directory
This directory contains the syntax highlight settings used by
LiteEditor in an XML format. Each XML file, describes a single language
attributes (e.g. keywords, colors for comments, fonts to use etc).
To add new syntax highlight to the IDE, simply copy one of the existing
XML files, and modified it to suite you needs (for a good example, see the
lexer_makefile.xml file).
For the changes take effect, you will need to restart LiteEditor. Opening
the 'View -> Options...' dialog, will reveal new tab for the newly
added language:
'rc' the resource directory
This directory contains the XRC file for LiteEditor menu bar (see here for
more information
http://wx4j.org/documentation/manual/xrc.html)
'templates'
Under this directory, LiteEditor saves project template files. When installing
a fresh copy of LiteEditor, it comes with 3 basic templates:
-
Executable
-
Static Library
-
Dynamic Library
LiteEditor can save any project that you are working on as a template for
future use, so you wont need to type the same settings twice.
Note: Under windows: the
installation path (e.g. C:\Documents and Settings\Eran\.liteeditor) is added
to your system PATH environment variable
Prerequisites
Currently, LiteEditor is configured to work with g++/gcc and the GNU make as
the build system.
Before creating new workspace/project, you will need to configure at least one
compiler and build system.
Defining compiler
New compilers can be added via the 'Advanced dialog' (From the 'Build' menu,
select 'Advanced Settings...')
Choosing the above, the following dialog will appear:
By pressing the 'New' button, you will be prompted to give the new compiler a
name, give it a name and hit OK, A new tab is now added to the dialog with the
new name.
The new compiler's values are set to to the 'g++' values. you can then modify
them to fit your own compiler.
For example, to add gcc compiler follow these steps:
-
Press the 'New' button and give your compiler a name (e.g. 'gnu gcc')
-
Since, as I mentioned above, the default values are set to g++, all is
left to be done is to rename the 'Tools' entries to fit gcc: rename g++ to
gcc for 'Compiler Name', 'Linker Name' and 'Shared Object Linker' entries.
-
Thats it, once saved (i.e. click 'OK'), the new compiler can be selected
in the project settings dialog
Define the build system
Currently, LiteEditor only supports the GNU make build system. All it
needs to know is the path to the 'make' utility. The default values are set
to:
make and make flag is set '-f'.
However, if you choose to use different make name (e.g. mingw32-make you can
explicitly specifies it in the build settings tab in the dialog), as shown
below:
Creating an 'Hello World' application
Now we are ready to give LiteEditor a test
drive by creating the world's famous 'hello world' application!
Createing the workspace
First we need to create a workspace:
1. Open the 'New Item' dialog from 'Workspace->Create New Workspace' and
complete the 'Workspace' tab fields as shown and click 'Create':
Note: 'C:\HelloWorld'
directory must exist (The dialog the pops when hitting 'Browse' buttons allows
you to create new folders)
2. Right click on the new workspace, pops up the workspace's context menu,
select 'Create New Project'
3. Fill the 'new project dialog' as shown below and click create:
Note: 'C:\HelloWorld\testme'
directory must exist (The dialog the pops when hitting 'Browse' button allows
you to create new folders)
4. Add source file to the project and paste it the following code:
#include "stdio.h"
int main(int
argc, char **argv) {
printf("Hello world from
LiteEditor\n");
return 0;
}
5. Hit 'F7' (accelerator key for 'Build Active Project') to build the project
and hit Ctrl+F5 to run it!