...
Applies to: v10
This chapter describes the Worldgroup 3.x tool chain (Borland C++ 5.00,
\WGDEV,.MAKfiles,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.MAKmacros,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
VB3variable (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:
ICSRCis where the Active HTML kernel lives (icsrc\galacth, headerGALACTH.H) and the Active HTML ("ah") applications are inAPPS(galfilah,galpnqah,galregah); see the Active HTML note under "Files contained in each project". The kit has three more top-levelSRCdirectories than the addendum lists:experimental,faxsrcandinsutils;UTILS,OFFLINE,REBUILDandWGSERVERsit underSERVER, 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\WGTOOLSdirectory (THEDRAW.*,WGSSYNC,BTRIEVE). Command-line tools are in\WGDEV\BIN; keep that entry on thePATH.
...
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:
srcin the!includeline,LARGE, and the three added linesstart: \,$(GCBUILD) \andtticwd.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) |
| What | Description |
|---|---|
ALL | Builds everything required for server. |
SERVER | Builds only server code. |
SRVUTIL | Builds only server utilities. |
OFFLINE | Builds all offline utilities. |
DEVUTIL | Builds all developer utilities. |
API | Builds all API relate libraries. |
APP | Builds all Major BBS Apps. |
GALME | Builds all messaging engine files. |
CLIENT | Builds all client files. |
MVC | Builds Microsoft Visual C++ apps. |
JAVA | Builds 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.BATtakes the "What" argument as%1and the "Type" as%2(as printed). ForALLit setsCOMPWHAT=!devutil !client !debug !liband passes it togalmklstwithBIN\makefile.lst, so whatALLreally builds is decided bygalmklstandmakefile.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\BINalso containsGALPORT.EXE(sourceSRC\devutils\galport\GALPORT.C, named in theDEVUTILSentry of the source tree above),GALMKLST.EXE,GALPRLST.EXE,GALPARSF.EXE,CVTCHECK.EXE,REGSCAN.EXEandSCN2C.EXE.GALPORTis 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