This document describes the steps that need to be taken to enable the TradeBuild Platform 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.
In order to get set up for building the TradeBuild Platform, 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 TradeBuild 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 TradeBuild repository to your computer from GitHub. The link to the repository is:
https://github.com/rlktradewright/tradebuild-platform
-
Create a user environment variable called
TB-PLATFORM-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
TB-PLATFORM-PROJECTS-PATH
, and set it to the path to your clone of the TradeBuild repository (in this example set it to\Projects\tradebuild-platform
). -
Create a folder called Bin directly below the folder you cloned the repository to, for example:
C:\Projects\tradebuild-platform\Bin
This folder will be the root of a set of subfolders where the compiled TradeBuild components will be stored.
-
Create a folder called Compat directly below the folder you cloned the repository to, for example:
C:\Projects\tradebuild-platform\Compat
This folder will contain a parallel set of folders to those in the Bin folder, which will contain compiled TradeBuild components used for controlling binary compatibility.
-
Install TradeBuild 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\TradeBuild Platform nnn
where nnn is the version number. In the following, this folder is referrred to as the 'TradeBuild installation folder'.
Note that you only need to install TradeBuild to give you initial versions to control binary compatibility during the first build process. Once you have successfully built TradeBuild, you can uninstall it again.
-
Copy the following folder from the TradeBuild installation folder to the Bin folder you just created:
TradeWright.Common
-
Copy the following folders from the TradeBuild installation folder to the Compat folder:
TradeWright.TradeBuild.Platform
TradeWright.TradeBuild.ServiceProviders
TradeWright.TradeBuild.ExternalComponents
-
Register the TradeWright Common components and the External components:
-
Open a Visual Studio 2017 developer command prompt as Administrator to ensure that the regsvr32exe program is on the path). The easiest way to do this on Windows 10 is to expand the Visual Studio 2017 entry in the Start menu, right-click the Developer Command Prompt item, and select
More > Run as Administrator
. -
run the
registerTradeWrightCommonComponents.bat
command file in the Build folder. -
run the
registerExternalComponents.bat
command file in the Build folder.
-
-
You are now ready to do the first build of the TradeBuild project.
-
Start a Visual Studio 2017 developer command prompt as Administrator (as described earlier).
-
Set the current directory to the Build folder:
cd C:\projects\tradebuild-platform\Build
-
Initiate the build:
makeall
-
This will compile all the TradeBuild components, storing the resulting .exe's, dll's and ocx's into
C:\projects\tradebuild-platform\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. -
This process is quite lengthy, so don't feel you need to watch it!
-
Once you have successfully built TradeBuild, you can uninstall the version created by the .msi installer, as none of that installation is now in use.