Recent Changes - Search:

Home Page


Main

Downloads
Windows
macOS
Linux (via apt / rpm )
Linux wxWidgets
Release Notes

Wiki
Documentation
FAQ

Build CodeLite
Linux
Windows
macOS

Devs
Debug CodeLite Linux
Building Clang
Build wxWidgets (MSW)
Coding Guidelines
Create a Plugin

CreatePlugin


Creating a new plugin


To create a plugin we use the 'Wizards' plugin. This contains a simple wizard that creates a plugin skeleton that compiles but does nothing useful.

  • From the main menu go to Plugins -> Wizards -> New CodeLite Plugin Wizard.
  • Fill in the plugin name and give it a short description.
  • Next select the path to the CodeLite source files, and the location where you want CodeLite to create the folder for the plugin sources.

It is recommended that plugins are created inside CodeLite's folder. So, in the previous step, you should set both paths to point to CodeLite's root folder.

  • Click 'Finish' and you are done.

By clicking the Finish button in the wizard, you should now have a new project with the plugin's skeleton files. The project has 2 configurations:

  • Win_x64_Debug
  • Win_x64_Release

There configurations are used to build the plugin on Windows 64 bit in debug/release For Linux and OSX, the configurations don't really matter since the build is using CMake which will automatically pick your new plugin CMakeLists.txt file

If you have created your plugin folder inside CodeLite's source tree as recommended, then the Post Build command created by the Wizard will make sure that the plugin is copied into the proper CodeLite folder. Otherwise, you need manually to change the Post Build command that copies the plugin to: /path/to/codelite-sources/Runtime/plugin. That will cause the plugin to be copied to there.

Installing the plugin on Windows


To copy a plugin into the installation folder, you can either simply copy it manually to /Path/To/CodeLite/Installation/Folder/Plugins; or you can use the script update.bat which can be found under /path/to/codelite-sources/Runtime :

cd C:\path\to\codelite-sources\Runtime
update.bat

The script uses the variable TARGET_DIR as the base path for CodeLite installation folder. By default it is set to C:\Program Files (x86) You might need to change that to match your local installation

Compiling the plugin on Linux / Mac OSX


The Wizard will create a file named CMakeLists.txt for you under the plugin folder. All you need to do is to add the following line to the top level CMakeLists.txt (near the bottom of the file):

add_subdirectory(/path/to/plugin/folder)
  • Re-run CodeLite's cmake command; for example:
cd /path/to/codelite/build-release
cmake .. -DCMAKE_BUILD_TYPE=Release

From this point, your plugin will be included in the normal build process and will also have an install target (i.e. running make install will install your plugin)

Edit - History - Print - Recent Changes - Search
Page last modified on September 17, 2015, at 12:52 PM