- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
(extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
BT game source (never mixed into CODE/). Round 1-3 state:
* 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
(BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
since 1996.
* BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
its binary-recorded line 400 exactly.
* BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
(Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
TeamScore=12 flagged [T4]).
* MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
(VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
the period compiler is the drift detector).
* Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
(per-TU verification sweep under authentic OPT.MAK flags).
* README: corrected roadmap - MECH.HPP is the capstone grown with the mech
TU reconstructions; BTREG.CPP green = the header-family milestone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
244 lines
7.3 KiB
Plaintext
244 lines
7.3 KiB
Plaintext
'////////////////////////////////////////////////////////////////////////////////////
|
|
' Expert PROJECT
|
|
' Expert - (C) Copyright 1993 by Borland International, Inc. All Rights Reserved.
|
|
'
|
|
' SUBSYSTEM: OWL code template
|
|
' FILE: TDialog.OWL
|
|
'
|
|
'
|
|
' OVERVIEW
|
|
' ========
|
|
' Definition of all OWL classes when can be generated by the CODEGEN phase of
|
|
' AppGen and ClassExpert. AppGen generates when all options have been selected
|
|
' and multiple classes are generated. ClassExpert uses the CODEGEN phase when
|
|
' a new class is generated.
|
|
'////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
<<[H]TDialog [[TDialog]]
|
|
##{hheader.snp}
|
|
#include <owl\owlpch.h>
|
|
#pragma hdrstop
|
|
|
|
##<<TApplication QUERY_FILENAME_CPP [[Filename]]
|
|
#include "[[Filename]].rh" // Definition of all resources.
|
|
|
|
|
|
//{{TDialog = [[TDialog]]}}
|
|
class [[TDialog]] : public TDialog {
|
|
public:
|
|
##QUERY_DLOG [[DLogRsrc]]
|
|
[[TDialog]] (TWindow *parent, TResId resId = [[DLogRsrc]], TModule *module = 0);
|
|
virtual ~[[TDialog]] ();
|
|
|
|
//{{[[TDialog]]VIRTUAL_BEGIN}}
|
|
public:
|
|
void SetupWindow ();
|
|
##:DBVirtual(\\"[[TDialog]]", "SetupWindow")
|
|
//{{[[TDialog]]VIRTUAL_END}}
|
|
}; //{{[[TDialog]]}}
|
|
|
|
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
// Reading the VERSIONINFO resource.
|
|
class ProjectRCVersion {
|
|
public:
|
|
ProjectRCVersion (TModule *module);
|
|
virtual ~ProjectRCVersion ();
|
|
|
|
bool GetProductName (LPSTR &prodName);
|
|
bool GetProductVersion (LPSTR &prodVersion);
|
|
bool GetCopyright (LPSTR ©right);
|
|
bool GetDebug (LPSTR &debug);
|
|
|
|
protected:
|
|
LPBYTE TransBlock;
|
|
void FAR *FVData;
|
|
|
|
private:
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
// Don't allow this object to be copied.
|
|
ProjectRCVersion (const ProjectRCVersion &);
|
|
ProjectRCVersion & operator =(const ProjectRCVersion &);
|
|
};
|
|
##{hfooter.snp}
|
|
>>[H]TDialog [[TDialog]]
|
|
|
|
|
|
'
|
|
' TDialog CPP file.
|
|
'
|
|
<<[CPP]TDialog [[TDialog]]
|
|
##{cheader.snp}
|
|
#include <owl\owlpch.h>
|
|
#pragma hdrstop
|
|
|
|
#if !defined(__FLAT__)
|
|
#include <ver.h>
|
|
#endif
|
|
|
|
##<<TApplication QUERY_FILE_H [[FileName]]
|
|
#include "[[FileName]]"
|
|
##QUERY_FILE_H [[FileName]]
|
|
#include "[[FileName]]"
|
|
|
|
|
|
ProjectRCVersion::ProjectRCVersion (TModule *module)
|
|
{
|
|
char appFName[255];
|
|
char subBlockName[255];
|
|
DWORD fvHandle;
|
|
UINT vSize;
|
|
|
|
FVData = 0;
|
|
|
|
module->GetModuleFileName(appFName, sizeof(appFName));
|
|
OemToAnsi(appFName, appFName);
|
|
DWORD dwSize = ::GetFileVersionInfoSize(appFName, &fvHandle);
|
|
if (dwSize) {
|
|
FVData = (void FAR *)new char[(UINT)dwSize];
|
|
if (::GetFileVersionInfo(appFName, fvHandle, dwSize, FVData)) {
|
|
// Copy string to buffer so if the -dc compiler switch (Put constant strings in code segments)
|
|
// is on VerQueryValue will work under Win16. This works around a problem in Microsoft's ver.dll
|
|
// which writes to the string pointed to by subBlockName.
|
|
strcpy(subBlockName, "\\VarFileInfo\\Translation");
|
|
if (!::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&TransBlock, &vSize)) {
|
|
delete FVData;
|
|
FVData = 0;
|
|
} else
|
|
// Swap the words so wsprintf will print the lang-charset in the correct format.
|
|
*(DWORD *)TransBlock = MAKELONG(HIWORD(*(DWORD *)TransBlock), LOWORD(*(DWORD *)TransBlock));
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
ProjectRCVersion::~ProjectRCVersion ()
|
|
{
|
|
if (FVData)
|
|
delete FVData;
|
|
}
|
|
|
|
|
|
bool ProjectRCVersion::GetProductName (LPSTR &prodName)
|
|
{
|
|
UINT vSize;
|
|
char subBlockName[255];
|
|
|
|
if (FVData) {
|
|
wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"ProductName");
|
|
return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&prodName, &vSize) : false;
|
|
} else
|
|
return false;
|
|
}
|
|
|
|
|
|
bool ProjectRCVersion::GetProductVersion (LPSTR &prodVersion)
|
|
{
|
|
UINT vSize;
|
|
char subBlockName[255];
|
|
|
|
if (FVData) {
|
|
wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"ProductVersion");
|
|
return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&prodVersion, &vSize) : false;
|
|
} else
|
|
return false;
|
|
}
|
|
|
|
|
|
bool ProjectRCVersion::GetCopyright (LPSTR ©right)
|
|
{
|
|
UINT vSize;
|
|
char subBlockName[255];
|
|
|
|
if (FVData) {
|
|
wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"LegalCopyright");
|
|
return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)©right, &vSize) : false;
|
|
} else
|
|
return false;
|
|
}
|
|
|
|
|
|
bool ProjectRCVersion::GetDebug (LPSTR &debug)
|
|
{
|
|
UINT vSize;
|
|
char subBlockName[255];
|
|
|
|
if (FVData) {
|
|
wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"SpecialBuild");
|
|
return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&debug, &vSize) : false;
|
|
} else
|
|
return false;
|
|
}
|
|
|
|
|
|
//{{[[TDialog]] Implementation}}
|
|
|
|
|
|
##--BEGIN-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
//////////////////////////////////////////////////////////
|
|
// [[TDialog]]
|
|
// ==========
|
|
// Construction/Destruction handling.
|
|
##--END-- @QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
[[TDialog]]::[[TDialog]] (TWindow *parent, TResId resId, TModule *module)
|
|
: TDialog(parent, resId, module)
|
|
{
|
|
// INSERT>> Your constructor code here.
|
|
}
|
|
|
|
|
|
[[TDialog]]::~[[TDialog]] ()
|
|
{
|
|
Destroy();
|
|
|
|
// INSERT>> Your destructor code here.
|
|
}
|
|
|
|
|
|
void [[TDialog]]::SetupWindow ()
|
|
{
|
|
LPSTR prodName = 0, prodVersion = 0, copyright = 0, debug = 0;
|
|
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
// Get the static text for the value based on VERSIONINFO.
|
|
TStatic *versionCtrl = new TStatic(this, IDC_VERSION, 255);
|
|
TStatic *copyrightCtrl = new TStatic(this, IDC_COPYRIGHT, 255);
|
|
TStatic *debugCtrl = new TStatic(this, IDC_DEBUG, 255);
|
|
|
|
TDialog::SetupWindow();
|
|
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
// Process the VERSIONINFO.
|
|
ProjectRCVersion applVersion(GetModule());
|
|
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
// Get the product name and product version strings.
|
|
if (applVersion.GetProductName(prodName) && applVersion.GetProductVersion(prodVersion)) {
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE 2
|
|
// IDC_VERSION is the product name and version number, the initial value of IDC_VERSION is
|
|
// the word Version (in whatever language) product name VERSION product version.
|
|
char buffer[255];
|
|
char versionName[128];
|
|
|
|
buffer[0] = '\0';
|
|
versionName[0] = '\0';
|
|
|
|
versionCtrl->GetText(versionName, sizeof(versionName));
|
|
wsprintf(buffer, "%s %s %s", prodName, versionName, prodVersion);
|
|
|
|
versionCtrl->SetText(buffer);
|
|
}
|
|
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
//Get the legal copyright string.
|
|
if (applVersion.GetCopyright(copyright))
|
|
copyrightCtrl->SetText(copyright);
|
|
|
|
##:@QUERY_APPL_COMMENT == VALUE_VERBOSE
|
|
// Only get the SpecialBuild text if the VERSIONINFO resource is there.
|
|
if (applVersion.GetDebug(debug))
|
|
debugCtrl->SetText(debug);
|
|
}
|
|
>>[CPP]TDialog [[TDialog]]
|