Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Applies to: v10

This chapter describes the Worldgroup 3.x tool chain (Borland C++ 5.00, \WGDEV, .MAK files, MKNT, Visual C++ 4.2, Visual Basic 3.00). It is not the v10 environment. v10 uses Visual Studio projects (chapter 29, section 29.3). Sections that name Borland .MAK macros, BC50, MAKEWGS, 16-bit batch files or Visual Basic are history; the Active HTML passages are marked Not in v10 below.

...

Applies to: WG1-3.x (Client)

The VB3 variable (Visual Basic 3.0 root) concerns client programs; the other variables are WG3.x.

Development/Runtime Tree

Code Block
Directory                               Description/What is contained in them

- WGDEV                         Main development directory
        - INC                           Shared header files
        - BIN                           Development executables and batch files
                                        (formerly WGTOOLS)
        - LIB                           DEF files and all shared LIB files
        - HELP                          Developer documentation
        - SRC                           Source code broken down into single projects
        - VCPROJ                        Microsoft Visual C++ projects

The \WGDEV\SRC directory

Applies to: WG3.x

Header check: ICSRC is where the Active HTML kernel lives (icsrc\galacth, header GALACTH.H) and the Active HTML ("ah") applications are in APPS (galfilah, galpnqah, galregah); see the Active HTML note under "Files contained in each project". The kit has three more top-level SRC directories than the addendum lists: experimental, faxsrc and insutils; UTILS, OFFLINE, REBUILD and WGSERVER sit under SERVER, as the indentation shows.

The most notable change to the development environment is in the source directories. Formerly \WGDEV\WGSRC, this directory was renamed and separated into multiple projects. The new directory structure under \WGDEV\SRC looks like this:

Code Block
Directory                               Description/What is contained in them

- \WGDEV\SRC                            Source directory
        - API                           (gcommlib, galme, galsmb...)
        - APPS                          (galfil, galpnq, galrsy, galreg...)
        - DEBUG                 (galdebug, galdebgcg...)
        - ICSRC                         (galtnt, galtcpip, galftp...)
        - SERVER
                - WGSERVER              (wgserver, wgsignup, galsupah...)
                - UTILS                 (wgsdraw, wgsmtree, wgsfndo...)
                - OFFLINE               (wgscmaps, wgscolor, wgsmref...)
                - REBUILD               (wgsrbk, wgsrbt...)
        - DEVUTILS                      (galcopy, galport, galprod...)

PATH Statement

Applies to: WG3.x

Header check: the statement that \WGDEV\WGTOOLS "no longer exists" does not match the 3.2 kit, which still has a \WGDEV\WGTOOLS directory (THEDRAW.*, WGSSYNC, BTRIEVE). Command-line tools are in \WGDEV\BIN; keep that entry on the PATH.

...

9. The $(GCBUILD) is a dependency of your project that always changes. Because of this, every time you re-compile, the make utility thinks something has changed, and forces a re-link. To solve this problem, do the following:

Instead of having:

Code Block
galfil.dll:                     \
        $(GCBUILD)              \
        galfil.h                \
        $(OBJFILES)    ...

Do the following:

Code Block
start:                          \
        $(GCBUILD)              \
        galfil.dll

galfil.dll:                     \
        galfil.h                        \
        $(OBJFILES)     ...

The following is the Worldgroup 3.00 .MAK file for Cross-Wordz, followed by the changes required for this .MAK file to work properly in the 3.12 environment:

Code Block
#################################################################
#  This makefile generates TTICWD.DLL                                   #
#################################################################
!include $(WGDEV)\wgsrc\GCRULES.MAK

SRCDIR = $(WGDEV)\cwdsrc
SRCDIROS = $(SRCDIR)\$(OS)

!if $(OS) == DOS
!       if $(MODEL) == L
!               error TTICWD not supported in Large Module Under DOS!
!       endif
!endif

DLLLIB =                                \
        $(DLLLIB)                       \
        $(DLIBDIROS)\wgserver.lib       \
        $(DLIBDIROS)\galgsbl.lib

OBJFILES =                              \
        tticwd.OBJ                      \
        cscwd.OBJ                       \
        cwdboth.OBJ

tticwd.dll:                                                     \
        tticwd.h                                                        \
        $(OBJFILES) $(DLLLIB) $(DLIBDIROS)\$(DEFILE)
        CD $(OBJDIR)
        $(LINK) $(LIBCMD) @&&|
$(PRODLL) $(OBJFILES)
$(RUNDIR)\$&
$(RUNDIR)\$&
$(DLLLIB) $(LINKDLL)
$(DLIBDIROS)\$(DEFILE)
|
        CD $(RUNDIR)

This is what the Worldgroup 3.12 version of the .MAK file looks like, with the changes highlighted:

Code Block
#################################################################
#  This makefile generates TTICWD.DLL                                   #
#################################################################
!include $(WGDEV)\src\GCRULES.MAK

!if $(OS) == DOS
!       if $(MODEL) == LARGE
!               error TTICWD not supported in Large Module Under DOS!
!       endif
!endif

DLLLIB =                \
        $(DLLLIB)       \
        wgserver.lib    \
        galgsbl.lib

OBJFILES =              \
        tticwd.OBJ      \
        cscwd.OBJ       \
        cwdboth.OBJ

start:                  \
        $(GCBUILD)      \
        tticwd.dll

tticwd.dll:             \
        tticwd.h                \
        $(OBJFILES)     \
        $(DLLLIB)       \
        $(DEFILE)
        $(LINK) $(LIBCMD) @&&|
$(PRODLL) $(OBJFILES)
$(RUNDIR)\$&
$(RUNDIR)\$&
$(DLLLIB) $(LINKDLL)
$(DEFILE)
|

Editor’s note: in the original manual the items that changed in the 3.12 file are printed in bold: src in the !include line, LARGE, and the three added lines start: \, $(GCBUILD) \ and tticwd.dll. Bold cannot be shown inside a code block here; compare the two listings.

...

You now have the ability to create .VIR files as part of your make procedures. Adding another dependency to your .MAK file forces .VIR files to be built on the fly. The following lines be added to accomplish this:

Code Block
VIRFILES =                      \
        file1.vir                       \
        file2.vir                       \
        file3.vir

then adding $(VIRFILES) as one of your DLL dependencies forces the .VIR files to be built. You must have an equivalent .BCR file located in your project directory. The creation of .VIR files under the Windows NT/95 server environment is set up for you by default. However, if you wish to create .VIR files for DOS, you must own a copy of the utility BUTIL.EXE included with the Btrieve Developers Kit. If you own a copy of BUTIL.EXE, the environment variable BUDOS should be pointed to it. If BUDOS is in your environment .VIR files are created for DOS. Example:

Code Block
set BUDOS=C:\BUTIL\BUTIL.EXE

Compilation Batch Files

Most compilation batch files have a matching debug batch file. The difference between the two is the debug version passes -DDEBUG to MAKE. Both mkntd galfil and mknt galfil -DDEBUG do the exact same thing. The following is a list of batch files used for the compilation of the Major BBS source:

...

The new usage for MAKEWGS.BAT is as follows:

Code Block
MAKEWGS (What) (Type)
WhatDescription
ALLBuilds everything required for server.
SERVERBuilds only server code.
SRVUTILBuilds only server utilities.
OFFLINEBuilds all offline utilities.
DEVUTILBuilds all developer utilities.
APIBuilds all API relate libraries.
APPBuilds all Major BBS Apps.
GALMEBuilds all messaging engine files.
CLIENTBuilds all client files.
MVCBuilds Microsoft Visual C++ apps.
JAVABuilds Java Apps.

...

You can pass defines to MAKEWGS.BAT. Here is an example of compiling all Windows NT source with source debugging:

Code Block
makewgs all wntd -DSRCDBG

Applies to: WG3.x

Header check: MAKEWGS.BAT takes the "What" argument as %1 and the "Type" as %2 (as printed). For ALL it sets COMPWHAT=!devutil !client !debug !lib and passes it to galmklst with BIN\makefile.lst, so what ALL really builds is decided by galmklst and makefile.lst, not by the batch file; the "Builds everything required for server" wording could not be confirmed from the kit (WGDEV/BIN/MAKEWGS.BAT).

...

Applies to: WG3.x

Editor's note: the list above is not complete. \WGDEV\BIN also contains GALPORT.EXE (source SRC\devutils\galport\GALPORT.C, named in the DEVUTILS entry of the source tree above), GALMKLST.EXE, GALPRLST.EXE, GALPARSF.EXE, CVTCHECK.EXE, REGSCAN.EXE and SCN2C.EXE. GALPORT is documented in chapter 28.

Timestamping utility similar to touch.exe. However, this utility allows you to touch a file with a new date as well as time.

...

Previous: Major BBS v10: 20 Client-Side Addendum (Worldgroup v2)  |  Contents  |  Next: Major BBS v10: 22 Data File Conversion