Specifying custom settings in Config Files for Development: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
You can find other examples [[Quicker development/debugging/testing turnaround with customised PetraClient startup|here]] that speed up the development/debugging/testing turnaround.
You can find other examples [[Quicker development/debugging/testing turnaround with customised PetraClient startup|here]] that speed up the development/debugging/testing turnaround.


==Location of auto-generated configuration files==
==Location of ''auto-generated'' configuration files - don't edit those==
* The PetraClient application picks up its configuration file from the <code>\etc\Client.config file</code>.
* The PetraClient application picks up its configuration file from the <code>\etc\Client.config file</code>.
* The PetraServerConsole application picks up its configuration file from the <code>\etc\Server.config file</code>.
* The PetraServerConsole application picks up its configuration file from the <code>\etc\Server.config file</code>.
Line 13: Line 13:
To avoid loosing your changes to these files you need to make the changes to the appropriate .config file in the ''template of that file''!
To avoid loosing your changes to these files you need to make the changes to the appropriate .config file in the ''template of that file''!


 
==Location of ''template'' configuration files==
==Location of template configuration files==
The folder <code>\inc\template\etc\</code> contains one file for the client configuration, <code>Client.config</code> and several config files for the server configuration, named <code>Server-mysql.config</code>, <code>Server-postgresql.config</code> and <code>Server-sqlite.config</code>. Determine the correct server .config file by choosing the one that relates to the RDBMS you are currently using for development.
The folder <code>\inc\template\etc\</code> contains one file for the client configuration, <code>Client.config</code> and several config files for the server configuration, named <code>Server-mysql.config</code>, <code>Server-postgresql.config</code> and <code>Server-sqlite.config</code>. For editing the correct server file choose the one that relates to the RDBMS you are currently using for development.


===Creating custom .config files===
===Creating custom .config files===

Revision as of 15:44, 28 July 2011

Why would one specify custom config file settings for development?

While developing on either the client side or the server side you might want to specify custom settings in the .config files for the client side and the server side.

For instance, you can change the DebugLevel, the IP Address/Port of your development PetraServerConsole instance, etc. You can find other examples here that speed up the development/debugging/testing turnaround.

Location of auto-generated configuration files - don't edit those

  • The PetraClient application picks up its configuration file from the \etc\Client.config file.
  • The PetraServerConsole application picks up its configuration file from the \etc\Server.config file.

However, these files get overridden when nant startPetraServer or nant startPetraClient are run!!!

To avoid loosing your changes to these files you need to make the changes to the appropriate .config file in the template of that file!

Location of template configuration files

The folder \inc\template\etc\ contains one file for the client configuration, Client.config and several config files for the server configuration, named Server-mysql.config, Server-postgresql.config and Server-sqlite.config. Determine the correct server .config file by choosing the one that relates to the RDBMS you are currently using for development.

Creating custom .config files

  • Follow the instructions here to create your custom .config files that contain your changes.
  • Then run nant initConfigFiles
  • Then run nant startPetraServer and/or nant startPetraClient to start the appropriate application with the .config file changes applied.