1.6 Pre- and Postbuild steps |
CodeBlocks makes it possible to perform additional operations before or after compiling a
project. These operations are called Prebuilt or Postbuilt Steps. Typical Postbuilt Steps are:
Creating a Disassembly from an object under Windows. Piping to a file requires calling
cmd with the
/c option.
Archiving a project can be another example for a Postbuilt Step. For this purpose, create a
Build Target ’Archive’ and include the following instruction in the Postbuilt Step:
With this command, the active project and its sources, header and objects will be packed as a
zip file. In doing so, the Built-in variables
$(PROJECT_NAME) and
$(TODAY), the project
name and the current date will be extracted (see
section 3.2). After the execution of the
Target ’Archive’, the packed file will be stored in the project directory.
In the share/codeblocks/scripts
directory you will find some examples for scripts.
You can add a script via menu ’Settings’ /’Scripting’ and register in a
menu. If you execute e.g. the script make_dist
from the menu then all files belonging to a project
will be compressed in an archive
<project>.tar.gz.
1.5 Virtual Targets
1.7 Adding Scripts in Build Targets
Created: 2010/25/05 11:52 Updated: 2010/25/05 11:52
Author: HighTec EDV-Systeme GmbH
Copyright © 2010 HighTec EDV-Systeme GmbH
Author: HighTec EDV-Systeme GmbH
Copyright © 2010 HighTec EDV-Systeme GmbH