Please note that this page refers to the compilation process for cdcompile.exe prior to version 2.1. For newer versions, see [[Compile Components Using Cdcompile]].
cdcompileui.exe can be used to compile components, it only allows one icon to be embedded. This article describes how to use
cdcompile.exe to embed a separate thumbnail for each configuration of your component.
Creating a Compilation Description
The first step is to create a compilation description xml file. This file holds information about what should be embedded within the .cdcom file.
The compilation file will look something like this:
<?xml version="1.0" encoding="utf-8"?> <cdcom markupversion="1.0"> <component path="C:\Users\Username\Documents\resistor.xml"> <icon>C:\Users\Username\Documents\Resistor icon.png</icon> <icon configuration="Potentiometer">D:\Users\Username\Documents\Potentiometer icon.png</icon> <icon configuration="LDR">C:\Users\Username\Documents\LDR icon.png</icon> <icon configuration="Thermistor">C:\Users\Username\Documents\Thermistor icon.png</icon> <icon configuration="Variable Resistor">C:\Users\Username\Documents\Variable resistor icon.png</icon> </component> </cdcom>
component tag has one attribute,
path, which contains the full path to the XML component you want to compile.
component tag can contain one or more
icon tags, which hold the full path to the icons which will be embedded.
It is recommended that the first icon does not have a
configuration attribute - this will be used as the default icon for the component, and for any configurations without their own icon.
Additional ''icon'' tags should have a "configuration" attribute, which contains the name of the configuration which they will be used for.
Once you have made the description file, download the Circuit Diagram Tools and unzip the file to a location on your computer.
- Open command prompt (click on the start menu and then type
- The working directory must be set to the folder containing
cdcompile.exe, which you unzipped earlier. To do this, type
cd directoryinto the command prompt window, replacing ''directory'' with the path to the folder, and press '''enter'''.
cdcompile.exe -i inputfile -o outputfile, replacing
inputfilewith the path to the description file you made earlier, and
outputfilewith the path of the file you want to create.
cdcompile.exe -i "C:\Users\Username\Documents\CompileDescription.xml" -o "C:\Users\Username\Documents\component.cdcom"
When you press enter, your component will be compiled. You can now install the newly created component.