GPGee BUILDING NOTES
--------------------


Requirements
------------
To build GPGee you will need:
 - Borland C++ Builder 6 (BCB6)
 - GPGee source tree
 - MyGPGME - Timo Schulz's version of the GPG Made Easy library
 - TCheckedComboBox component

Everything above (except for C++ Builder of course) is included in the GPGee
source tree.


Components
----------
The only non-standard component is TCheckedComboBox found in CheckCombo.pas
(source code), CheckCombo.r32 (drop-down button glyph), and CheckCombo.dpr
(design-time component palette icon).  This component is in the GPGee source
tree under Components\CheckCombo.  The code as it is included in GPGee has
been modified to make it able to match GPGee's visual style (added support
for BevelInner, BevelOuter, and BevelWidth.  The original code is in the GPGee
source tree under Components\CheckCombo\chcombox.zip.  The component shoult
work in its original form, it just won't look as nice and it won't have a nice
component palette icon.

The easiest way to add this component
to your palette is to:
 - Save the files as $(BCB)\Projects\Source\CheckCombo\*
 - Bring up BCB and make sure all files are closef (File->Close All)
 - Select Component->Install Component.  Select CheckCombo.pas as the unit
   filename and dclusr60.bpk as the package to install it into.
 - BCB will now recompile dcluser60 and the component should appear on the
   palette under 'Samples'.  You can now move it wherever you like.


Building
--------
Because Borland doesn't like to store relative paths in project files, you
will probably have to change several paths before the project will load/build.
When you unzip the source tree, make sure you leave the "GPGee" and "Shared"
folders next to each other.  If you do this, you can simply load SelfImage.bpr
in a text editor and replace all instances of "w:\shared" with "..\shared".

Once this is done, simply load the GPGee.bpg project group (not the GPGee.bpr
project file).  If you have already installed a binary version of GPGee then
it is best to uninstall it or unregister it first.

Once the project group is loaded, you can build the MyGPGME library and then
GPGee.dll.


Language Support
----------------
GPGee now includes a German language module, GPGee.DEU.

If you are doing any work on the language module, then do a "build all".
There is a custom build step in between the GPGee.dll build and the GPGee.DEU
language module build.  This step copies the correct source files from the
GPGee directory to the language module directory.  This step is required
because Borland's language support in C++ Builder is horribly broken - unless
the .cpp and .h file for each form is located in the same directory as the
language module's forms, you can't use the form editor on them.

Do NOT use Borland's form editor to change language strings.  That is, you can
and they will show up as changed in the form editor, but GPGee will change
them at runtime to be what the language module's strings resource
(strings-deu.rc) contains.  The form editor is not used for translation, it is
only used to tweak the component spacing when language strings are differently
sized.  Likewise, Borland's own (also horribly broken) translation manager is
not used.  In this way, distributed translation is easier - every string that
needs translating is located in the strings.rc file.


Debugging
---------
Debugging an explorer shell extension can be tricky.  Windows usually only
launches a single explorer process to handle the desktop and all explorer
windows.  This needs to be changed in order to make debugging possible.

In Win98 through 2000, load a registry editor and navigate to
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Explorer,
add a DWORD value called "DesktopProcess", and set it to 1.  Once windows is
restarted there will be two explorer processes.  One will handle the start
menu and desktop.  A seperate explorer process will be started whenever you
open an explorer window.

In Windows XP the same effect can be obtained by bringing up an explorer
window, clicking on Tools->Folder Options then the View tab, and activating
the setting "Launch folder windows in a seperate process".  The above
registry setting also works in Windows XP, but has been reported to cause
other odd behavior.  In XP once this setting is made, you need to log out and
back in again for it to take effect.

Once this has been done, you can debug GPGee by setting the host application
to be c:\windows\explorer.exe in the Run->Parameters dialog.  Make sure you
register the activex server through the run menu first.


Logging
-------
A logging version can be built in one of two ways.  Either you can turn on
debugging (which causes the _DEBUG macro to be defined), or by defining
the ENABLE_LOGGING macro.  See the LOGGING comment in GPGee.cpp for details
on setting the log level.

If logging is not enabled with either the _DEBUG or ENABLE_LOGGING #define,
then the log macros throughout the project will actually expand to nothing.
Thus, logging statements have zero overhead one a production build, so feel
free to add as many logging statements as you wish.


Problems
--------
If you have problems building GPGee, feel free to contact me at:
kfitzner@excelcia.org.

Don't, however, bring me issues about porting GPGee to MSVC, Delphi, or
earlier versions of C++ Builder.