Pichat SDK, tools documentation

Last update 02/Sep/2010 by Mark Seuffert

1. Introduction

This document describes a set of tools for Pichat software developers. These tools help with writing and maintaining software, they run on Linux, BSD and Windows. To download latest development tools please see Pichat downloads.
This document is part of the Pichat SDK, available at http://www.pichat.net

2.1. Mkdocument, documentation tool

The mkdocument program creates a simple documentation from C++ source and header files. You can either specify files at the command line or use a configuration file (with the -c flag). The basic idea of this tool is to extract documentation directly from the existing code base with easy setup and maintenance. All information are collected from class definitions, source code and comments.
When your source code contains comments a decent documentation will be automatically generated, e.g. one-line comments in front of methods are used as descriptions. Optionally, the generated output can be adjusted and extended by inline configuration. Any comment in the form '//(mkdoc-option argument)' will be interpreted as inline configuration.
The following configuration options are available, sorted by relevance:
(Some options expect arguments, text in brackets lists them)
mkdoc-titleset document title (text)
mkdoc-authorset document author and contact information (text)
mkdoc-copyrightset document copyright information (text)
mkdoc-footerset document footer (text)
mkdoc-showshow class/namespace/method/element
mkdoc-hidehide class/namespace/method/element
mkdoc-descriptionadd description for class or method (name)
mkdoc-commentsadd comments for class or namespace (name)
mkdoc-comments-block-beginbegin of comments block for class or namespace (name)
mkdoc-comments-block-endend of comments block
mkdoc-notesadd notes for method (name)
mkdoc-constructionadd constructor or factory method to class (name)
mkdoc-groupcombine multiple methods into one group (number)
mkdoc-group-forceforce multiple methods into one group (name number)
mkdoc-section-newstart a new section number with class or namespace (name)
mkdoc-section-block-beginbegin of block with new text section (name)
mkdoc-section-block-endend of block with new text section
mkdoc-ignoreignore comment line, do nothing
Syntax:mkdocument outfile namespace exportfilter filename1 [...]
mkdocument outfile namespace exportfilter -c configfile
 
Arguments:
outfile=name of output file, the file suffix defines the format:
txt = plaintext (default)
wiki = text format with formatting information
html = HTML format with meta information
xml = XML format with meta information
namespace=namespace to be documented
exportfilter=export filter for classes:
0 = document any class in given namespace, no filter
1 = document only classes marked with an EXPORT macro
filename=name of input file, C++ source or header file
configfile=name of file containing a list of input files
 
Examples:mkdocument sdklibrary.txt SdkLibrary 0 SdkLibraryClasses.h
mkdocument sdklibrary.txt SdkLibrary::Component 0 -c SdkLibrary.conf
mkdocument sdklibrary.xml SdkLibrary::Component 0 -c SdkLibrary.conf
Example documentation: PichatCore and SharkEngine libraries in the Pichat SDK
Notes: The documentation tool requires C++ code inside a namespace. Per default all public methods, variables and enums are included in the generated documentation, you can overwrite this per inline configuration in your code. Unkown or missing information are marked with 'n/a' (not available) in generated documentation. Source files should have a suffix starting with 'c' and header files starting with 'h' (e.g. *.cpp and *.h), other file extensions are ignored. Comments have to be in C++ syntax. Style sheets for HTML/XML output are included.

2.2. Mkrepository, repository tool

The mkrepository program creates file repositories with version information and SHA256 checksum. You can either specify files at the command line or use a configuration file (with the -c flag).
Syntax:mkrepository outfile name filename1 [...]
mkrepository outfile name -c configfile
 
Arguments:
outfile=name of output file
name=name for created repository
filename=name of input file, executable or plugin
configfile=name of file containing a list of input files
 
Examples:mkrepository updates.ini Plugins plugin.dll
mkrepository updates.ini Plugins -c example.conf
Notes: The repository tool tries to detect version information from executables and plugins. For unknown file formats you have to specify the version manually, in a config file you can use comma separated arguments with file name and version. The '^' character may be used as place holder in the config file, to use same version number as the previous line.

2.3. Mkresource, resource tool

The mkresource program creates resources from files in order to include them in a C++ application, plugin or library. You can either specify files at the command line or use a configuration file (with the -c flag, alternatively the -z flag to generate 'gzip' compressed data).
Syntax:mkresource outfile namespace exportversion filename1 [...]
mkresource outfile namespace exportversion -c configfile
mkresource outfile namespace exportversion -z configfile
 
Arguments:
outfile=base name for output files
namespace=namespace for created data
exportversion=line number of text string (in first file), adds an
EXPORT macro to generated files, 0 to disable
filename=name of input file
configfile=name of file containing a list of input files
 
Examples:mkresource PluginResourceModule Plugin 0 plugin.txt plugin.png
mkresource PluginResourceModule Plugin::Uncompressed 0 -c example.conf
mkresource PluginResourceModule Plugin::Compressed 0 -z example.conf
Notes: Generated resources can be statically linked to your application, e.g. to create a single executable file. The SharkEngine library offers the class CResourceHandler to access resources and the class CDataCompression to decompress data. Each resource has meta data with file name, size and modification time.

2.4. Padupdate, PAD version updater

The padupdate program updates version information in a PAD file, which contains application description in XML format. You can specify application and PAD file at the command line, plus an optional configuration file (with the -c flag).
The following fields are updated:
Program_Versionversion information from application or configuration file
Program_Release_Dayfile modification time
Program_Release_Month(")
Program_Release_Year(")
File_Size_Bytesfile size (bytes)
File_Size_Kfile size (kB)
File_Size_MBfile size (MB)
File_Checksum_SHA256file SHA256 checksum
Primary_Download_URLhas to match name of application file (field is NOT modified)
Syntax:padupdate appfile filename
padupdate appfile filename -c configfile
 
Arguments:
appfile=name of application file, executable or plugin
filename=name of PAD file
configfile=name of file containing a list of input files
 
Examples:padupdate application.exe application.xml
padupdate application.exe application.xml -c example.conf
Notes: The PAD updater tries to detect version information from executables and plugins. For unknown file formats you have to specify the version manually, in a config file you can use comma separated arguments with file name and version. The '^' character may be used as place holder in the config file, to use same version number as the previous line.

2.5. Pngupdate, PNG comment updater

The pngupdate program updates or adds a comment to a PNG image, for example author or copyright information. You can either specify files at the command line or use a configuration file (with the -c flag). All comments are stored as meta data and not visible in the image.
Syntax:pngupdate key text filename1 [...]
pngupdate key text -c configfile
 
Arguments:
key=name of comment
text=text of comment, multiple words have to be quoted
filename=name of PNG image
configfile=name of file containing a list of PNG images
 
Here is a list of standard keys:
 
Titletitle of image
Authorimage creator and contact information
Copyrightcopyright information
Descriptiondescription of image
Softwaresoftware used to create the image
Disclaimerlegal disclaimer
Sourcedevice used to create the image
Commentmiscellaneous comment
 
Examples:pngupdate Author "Mark Seuffert" screenshot.png
pngupdate Copyright "Piratson Technologies" screenshot.png
pngupdate Copyright "Piratson Technologies" -c example.conf
Notes: Files with unknown format are ignored. An empty text removes the key.

3. Description of files

mkdocumentDocumentation tool for Linux/BSD
mkdocument.exeDocumentation tool for Windows
mkdocument_default.cssDocumentation tool, style sheet (part 1)
mkdocument_default.xslDocumentation tool, style sheet (part 2)
mkrepositoryRepository tool for Linux/BSD
mkrepository.exeRepository tool for Windows
mkresourceResource tool for Linux/BSD
mkresource.exeResource tool for Windows
pichat_sdk_tools.txtThis friendly help file
padupdatePAD version updater for Linux/BSD
padupdate.exePAD version updater for Windows
pngupdatePNG comment updater for Linux/BSD
pngupdate.exePNG comment updater for Windows
Linux/BSD software is compiled with gcc4 and libc6, i586 compatible CPU.
Windows software is compiled with VC6, i386 compatible CPU.
These files may be used and distributed under the terms of the Piratson public license as published in Pichat readme.
Pichat is a simple to use peer-to-peer (P2P) chat software. It comes with integrated LAN messenger and webchat. The chat server supports multiple chatrooms, text formatting with smileys and a user-friendly webchat (HTML, CSS, DOM, JavaScript). The webchat works with nearly any web browser, easily integrated into your design, no PHP/Flash/Java required. Software for free information exchange for Linux and Windows.