I have spent most of the last week or so getting Subversion version control and TortoiseSVN up and running on our network. I will blog about that experience later, but to cut a long story short I have come to the realization that I have to change the folder structure that I use for my projects and products. They just don't work well for version control at all!
For about 10 years or so I have used a pretty good structure, that goes something like this:
C:\Clarion\Apps\C63\Products\Automator
C:\Clarion\Apps\C63\Products\AutomatorDLL
C:\Clarion\Apps\C63\Products\Utilities
C:\Clarion\Clarion6
C:\Clarion\Shared\LibSrc\Automator
C:\Clarion\Shared\LibSrc\Utilities
C:\Clarion\Shared\Templates\Automator
C:\Clarion\Shared\Templates\Utilities
C:\Clarion\VC\Automator
Rather than being separated by products or projects, the folders are separated by over all contents, such as Apps, Shared, etc. Apps are then first separated by what version of Clarion they are being compiled in, then if they are projects (which are in-house projects), products or client projects.
The problem with this is that the separation of products is at the very lowest level of the folder structure, where as for version control, it should be as close to the top as possible so you can check out and commit the entire folder tree for all realted product or project files at the highest possible level. So I have decided on structure like this one:
C:\Clarion\Clarion6
C:\Dev\Prod\Automator\Apps\C63\Automator
C:\Dev\Prod\Automator\Apps\C63\AutomatorDLL
C:\Dev\Prod\Automator\Apps\VC\Automator
C:\Dev\Prod\Automator\Src
C:\Dev\Prod\Automator\Tpl
C:\Dev\Prod\Utilities\Apps
C:\Dev\Prod\Utilities\Src
C:\Dev\Prod\Utilities\Tpl
This way I can for example check Build Automator out at C:\Dev\Prod and it will work with everything related to that product.
This of course requires a lot of changes to all sorts of files, such as the redirection files (RED files), Build Automator scripts, Editor projects, etc. Definitely not a walk in the park and as I'm kind of feeling my way around this it's very, very different from the way I have worked for many years and the older the dog, the slower it is to pick up new tricks:)
I expected the RED file to be relatively easy, but it has proved to be one of the most challenging; for a reason I'm not yet sure of.
Clarion allows you to set up "macros" in the C60EE.INI file as shortcuts to the folders. This is done in the [Redirection Macros] section in the INI file like this:
Shared=C:\Clarion\Shared
SharedTpl=C:\Clarion\Shared\Templates
SharedImg=C:\Clarion\Shared\Images
SharedIco=C:\Clarion\Shared\Icons
SH_Automator=C:\Clarion\Shared\LibSrc\Automator
SH_Catalyst=C:\Clarion\Shared\LibSrc\Catalyst
SH_CCS=C:\Clarion\Shared\LibSrc\CCS
SH_Files=C:\Clarion\Shared\LibSrc\Filesandstuff
SH_Magic=C:\Clarion\Shared\LibSrc\Magic
SH_Other=C:\Clarion\Shared\LibSrc\Other
SH_Previewer=C:\Clarion\Shared\LibSrc\Previewer
SH_Utilities=C:\Clarion\Shared\LibSrc\Utilities
SH_Xplore=C:\Clarion\Shared\LibSrc\Xplore
SH_LibSrc=C:\Clarion\Shared\LibSrc
My corresponding Redirection file entries looked like this:
*.clw=.\Z-CLW ; .; .\CLASSFILES; %ROOT%\LIBSRC;
%ROOT%\3RDPARTY\LIBSRC;%SH_AUTOMATOR%; %SH_CATALYST%;
%SH_CCS%; %SH_FILES%; %SH_MAGIC%; %SH_OTHER%;
%SH_PREVIEWER%; %SH_UTILITIES%; %SH_XPLORE%;
%SH_LibSrc%\PowerOffice
*.inc=.\Z-INC ; .\CLASSFILES; %ROOT%\LIBSRC;
%ROOT%\3RDPARTY\LIBSRC;%SH_AUTOMATOR%; %SH_CATALYST%;
%SH_CCS%; %SH_FILES%; %SH_MAGIC%; %SH_OTHER%;
%SH_PREVIEWER%; %SH_UTILITIES%; %SH_XPLORE%;
%SH_LibSrc%\PowerOffice
This works great and no problems with this at all.
But what I found today was that my changes for *.clw files and *.equ files (Equate files) as well as *.trn seem to work just great, the same cannot be said for the entry for the *.inc files! Currently I have this in my new Redirection file:
*.clw=.\Z-CLW ; .; .\CLASSFILES; %ROOT%\LIBSRC;
%ROOT%\3RDPARTY\LIBSRC; C:\Dev\Prod\Automator\Src;
C:\Dev\Prod\Utilities\src; C:\Dev\Prod\Checkbf\src;
C:\Dev\Prod\ITMB\src; C:\Dev\Prod\ITME\src;
C:\Dev\Prod\ITML\src; C:\Dev\Prod\Outlookbar\src;
C:\Dev\Prod\PowerToolbar\src;C:\Dev\Prod\Previewer\src;
C:\Dev\Prod\SQLBrowse\src; C:\Dev\Prod\Taskpanel\src;
C:\Dev\Prod\WinFix\src; C:\Dev\Prod\XPlore\src;
C:\Dev\Prod\XPTheme\src
*.inc=.\Z-INC ; .; .\CLASSFILES; %ROOT%\LIBSRC;
%ROOT%\3RDPARTY\LIBSRC; C:\Dev\Prod\Automator\Src;
C:\Dev\Prod\Utilities\src; C:\Dev\Prod\XPTheme\src
This works without any issues for the *.clw (as well as the *.equ files, which I'm not showing here) but not so for the *.inc files! The compiler simply will not find *.inc files in the Automator, Utilities and XPTheme folders (there are several more, but I'm concentrating on just those to start with).
However, if I create a macro for the C:\Dev\Prod\Automator\Src and C:\Dev\Prod\Utilities\src paths, and use that macro in the Redirection file, everything compiles without a problem! I.e.
[Redirection Macros]
BA=C:\Dev\Prod\Automator
UT=C:\Dev\Prod\Utilities
*.inc=.\Z-INC ; .; .\CLASSFILES; %ROOT%\LIBSRC;
%ROOT%\3RDPARTY\LIBSRC; %BA%\Src; %UT%\Src;
Since I had set up macros for all the *.inc folders last time I guess I never ran into this anomaly before, or maybe that was why I had created all those macros - just can't remember!
Bottom line is that if something weird happens in your redirection file and it doesn't seem to work, try to create a macro in the INI file and see if that helps! Note, that in order to create the macros, you MUST close the Clarion IDE! In the INI the macro does NOT include the %, i.e. BA defined in the INI becomes %BA% when used in the Redirection file.
Arnor Baldvinsson