Difference between revisions of "Scripting Code::Blocks"

From Code::Blocks
m (Add link to examples)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Code::Blocks supports scripting to extend various parts of its functionality during runtime. The scripting language used is [http://www.squirrel-lang.org Squirrel]. Check http://www.squirrel-lang.org/#doc for documentation.
+
[[Category:Developer Documentation]]
 +
[[Category:Scripting Code::Blocks]]
 +
Code::Blocks supports '''scripting''' to extend various parts of its functionality during runtime. The scripting language used is [http://www.squirrel-lang.org Squirrel].
  
 
Currently, Code::Blocks uses scripts for:
 
Currently, Code::Blocks uses scripts for:
  
* [[Startup script|Startup]]: Run arbitrary commands on application startup.
+
'''[[Startup script|Startup]]'''
* [[Wizard scripts|Wizards]]: Register new wizards for generating projects, build targets, files or anything else. All wizards shipped with Code::Blocks are scripted.
+
: Run arbitrary commands on application startup.
* [[GDB scripts]]: Extend GDB to support arbitrary data types. Code::Blocks ships with scripts that add wxString, std::string and std::vector "knowledge" to GDB.
+
 
* [[Build scripts]]: Extend the build system. Scripts can be attached to build targets and are executed before and/or after each build target is built.
+
'''[[Wizard scripts|Wizards]]'''
 +
: Register new wizards for generating projects, build targets, files or anything else. All wizards shipped with Code::Blocks are scripted.
 +
 
 +
'''[[Script plugins]]
 +
: Create and register new plugins written entirely in [http://www.squirrel-lang.org Squirrel].
 +
 
 +
'''[[Debugger scripts|Debugger]]'''
 +
: Extend the GNU Debugger (and others) to support arbitrary data types. Code::Blocks ships with scripts that add wxString, std::string and std::vector "knowledge" to the GNU Debugger.
 +
 
 +
'''[[Build scripts|Build]]'''
 +
: Extend the build system. Scripts can be attached to projects and/or build targets and are executed before and/or after each of these is built.<br/>
 +
 
 +
'''[[Variable expansion]]'''
 +
:As a special case of [[variable expansion]], scripts can be run in place of a variable, expanding to the output generated by the script.
 +
 
 +
'''[[Some examples]]'''
 +
:Collection of useful scripts
  
 
More Code::Blocks parts may be exposed to scripting in the future.
 
More Code::Blocks parts may be exposed to scripting in the future.
  
''NOTE: Before you attempt editing the shipped scripts or writing your own, please read about [[scripting commands]].''
+
== See also ==
 +
* [[Scripting commands]]
 +
: This page will describe the script bindings of C::B in detail as a developer reference. It will show how certain parts of C::B and wxWidgets are exposed. This is an important reference for all script developers!
 +
 
 +
* [[Script bindings]]
 +
:This page will describe how the script binding is actually done from a developers point of view. It is a reference to add own script bindings to C::B at source-code level.
  
[[Category:Code::Blocks_Documentation]]
+
== External links ==
 +
* [http://www.squirrel-lang.org/#doc Squirrel documentation]

Latest revision as of 22:38, 18 October 2019

Code::Blocks supports scripting to extend various parts of its functionality during runtime. The scripting language used is Squirrel.

Currently, Code::Blocks uses scripts for:

Startup

Run arbitrary commands on application startup.

Wizards

Register new wizards for generating projects, build targets, files or anything else. All wizards shipped with Code::Blocks are scripted.

Script plugins

Create and register new plugins written entirely in Squirrel.

Debugger

Extend the GNU Debugger (and others) to support arbitrary data types. Code::Blocks ships with scripts that add wxString, std::string and std::vector "knowledge" to the GNU Debugger.

Build

Extend the build system. Scripts can be attached to projects and/or build targets and are executed before and/or after each of these is built.

Variable expansion

As a special case of variable expansion, scripts can be run in place of a variable, expanding to the output generated by the script.

Some examples

Collection of useful scripts

More Code::Blocks parts may be exposed to scripting in the future.

See also

This page will describe the script bindings of C::B in detail as a developer reference. It will show how certain parts of C::B and wxWidgets are exposed. This is an important reference for all script developers!
This page will describe how the script binding is actually done from a developers point of view. It is a reference to add own script bindings to C::B at source-code level.

External links