This document describes the steps that need to be taken to enable the TradeWright Common components to be built.
It is quite a detailed procedure, but it only needs to be done once.
Visual Basic 6 must be installed.
You must install the Microsoft Visual Basic 6.0 Service Pack 6 Security Rollup Update, published on 21 March 2021. To check whether you already have this installed, examine the 'Apps & features' page in the Windows Settings app in Windows 10 (or use the 'Programs and Features' applet in the Control Panel): the relevant entry is entitled 'Cumulative Update for Microsoft Visual Basic 6.0 SP6 (KB3096896)'. If not already installed, you can download it from here:
https://www.microsoft.com/en-us/download/details.aspx?id=50722
Visual Studio 2017 or later must be installed (earlier versions will probably be fine, but haven't been tested). The free Community editions are fine and recommended.
In order to get set up for building the TradeWright Common components, a number of Git repositories have to be cloned from GitHub.
You can locate the cloned repositories anywhere you like on your computer.
However, it's recommended that you put them all in a common root folder, and for
consistency with these instructions this should be at C:\Projects
.
-
Clone the vb6-build project from https://github.com/tradewright/vb6-build. This contains tools and scripts used in building TradeWright Common and other software.
-
Build the SetProjectComp tool using Visual Studio 2017 (or later) from the SetProjectComp.sln solution file in the
src\SetProjectComp folder
. Copy the generated SetProjectComp.exe file to the Tools folder of the vb6-build project. NB: this is a .Net program, so you can't build it with VB6. -
Edit the system PATH variable to include the SCRIPTS and TOOLS folders in the vb6-build project.
-
Edit the system PATH variable to include:
C:\Program Files (x86)\Microsoft Visual Studio\VB98
-
Clone the manifest-generator project from https://github.com/rlktradewright/manifest-generator. This project provides tools for generating assembly and program manifests for use with COM-free registration.
-
Build the manifest-generator solution using Visual Studio 2017 (or later) from the ManifestUtilities.sln solution file in the root folder. Copy the GenerateManifest.exe, ManifestUtilities.dll and Utils.dll files to the Tools folder of the vb6-build project. NB: this is a .Net solution, so you can't build it with VB6.
-
Clone the TradeWright Common repository to your computer from GitHub. The link to the repository is:
-
Install TradeWright Common using the .msi installer file from the latest Release on GitHub. By default, the files will be installed to:
C:\Program Files (x86)\TradeWright Software Systems\TradeWright Utilities nnn
where nnn is the version number.
Note that you only need to install TradeWright Common to give you initial versions to control binary compatibility during the first build process. Once you have successfully built TradeWright Common, you can uninstall it again.
-
Create a folder called Bin directly below the folder you cloned the repository to, for example:
C:\Projects\tradewright-common\Bin
This folder will be the root of a set of subfolders where the compiled TradeWright Common components components will be stored.
-
Create a folder called Compat directly below the folder you cloned the repository to, for example:
C:\Projects\tradewright-common\Compat
This folder will contain a parallel set of folders to those in the Bin folder, which will contain compiled TradeWright Common components components used for controlling binary compatibility.
-
Copy the
TradeWright.Common
folder from the TradeWright Common installation folder tree to the Compat folder you just created. -
Create a user environment variable called
TW-PROJECTS-DRIVE
, and set it to the drive letter that contains your Projects folder (in this example set it toC:
). -
Create a user environment variable called
TW-PROJECTS-PATH
, and set it to the path to your clone of the TradeWright Common components repository (in this example set it to\Projects\tradewright-common
).
-
You are now ready to do the first build of the TradeWright Common components project.
-
Start a Visual Studio developer command prompt as Administrator (as described earlier).
-
Set the current directory to the Build folder:
cd C:\projects\tradewright-common\Build
-
Initiate the build:
makeall
-
This will compile all the TradeWright Common components components, storing the resulting .exe's, dll's and ocx's into
C:\projects\tradewright-common\Build
and its various subfolders. It also generates COM interop components for all relevant items to enable them to be used seamlessly in .Net programs. -
Once you have successfully built TradeWright Common, you can uninstall the version created by the .msi installer, as none of that installation is now in use.