CopperSpice API  1.7.2
Plugin Path Configuration

The cs.conf file overrides the hard coded paths compiled into the CopperSpice libraries. If the cs.conf file does not exist, the methods in the QLibraryInfo class will return the locations specified when CopperSpice was built.

CopperSpice uses a default path to look for plugins and translation files. Since the specified path may not exist or may not be available on the user's computer at runtime, the cs.conf file can be used to instruct CopperSpice where to look.

The QLibraryInfo class will look for the cs.conf file in the following locations:

• Searches .qrc files visible to your application for a file named,":/etc/cs.conf"
• On Mac OS X, searches in the Resource directory inside the application bundle.
For example: myapp.app/Contents/Resources/cs.conf

### Conf File Details

The cs.conf file is an INI text file as described in the QSettings documentation. The file should have a Paths group which contains entries corresponding to each value of the QLibraryInfo::LibraryLocation enum. Refer to the QLibraryInfo documentation for details of the various locations.

All paths in the conf file are relative to the Prefix value.

(1) On Windows and X11, the Prefix is the directory containing the application executable, QCoreApplication::applicationDirPath().

(2) On Mac OS X, the Prefix is relative to the Contents in the application bundle. For example, application.app/Contents/plugins/ is the default location for loading plugins.

### Sample

Using the following sample cs.conf file, the PostgreSQL plugin library must be located in \myAppPath\plugins\sqldrivers and the translation files must be \myAppPath\il8n

[Paths]
Prefix = myAppPath
Plugins = plugins
Translations = il8n

Refer to Creating Plugins for further details about creating plugins.