Create a Windows Trust1Connector API package

Introduction

This page will describe the steps to create a Windows API package.

Prerequisites

For creating a package we need the following components:
Programs like Wget, Unzip etc are also available via chocolatey, this is the equivalent of HomeBrew
When installing visual studio make sure that the msbuild executable is saved as a system environment variable.
Internet access towards Google cloud storage environment is a requirement, see the introduction for more information

Step 1: Preparation

for the first step make sure all assets are updated for your version, environment and naming (application naming, installation folder, logos, ...). For this you can look at Windows introduction
application.conf is a file that needs to be provided by Trust1Team. We will need the following information to create a valid application.conf;
    Distribution service URL
    Distribution service certificate
    Domain of the Trust1Connector (t1c.t1t.io) -- this needs to map to localhost
    certificate of the Trust1Connector domain -- Trust1Team will put this in a keystore
t1c.conf needs to be updated with a valid API key for the specified version and environment.

Step 1a: Upgrade of previous installation (Optional)

To make the new version to have the possibility to upgrade the previous installation implicitly you have to provide a new product code and update the product version which can be found in the package.bat of your desired configuration
1
// These are examples
2
set productCode={43DB1183-F3D9-4DBF-A7CD-C60B86A0E3D0}
3
set upgradeCode={C14F1609-DD32-43A9-AC1F-CE5776136F80}
Copied!
The upgrade code has to stay the same but the product code has to be different.
The version is managed via the releaseVersion variable at the top of the package.bat file
1
// This is an example version
2
set releaseVersion=3.3.0
Copied!
This value has to be higher than the version you want to upgrade from.

Installer

The Installer will just run like a regular installer. This will prompt for installation but will run the necessary tasks before upgrading.

Step 2: packaging script

the file 1_FULL_PACKAGE.bat in the folder windows/_t1c-api_x64 and in folder windows/_t1c-api_x86 is everything you need to create your package. It will fetch all needed resources from the cloud and copy all resources needed from the local repository to create an MSI.

Signing

Do not forget to update the signtool command to your desired method.
For the API in package.bat you can find this on line 49 and 79 or search for the word signtool For the Proxy in package_proxy.bat you can find this on line 59 or search for the word signtool

Step 3: Execute the script

The batch scripts found in _mac and _windows have the following parameters that you need to provide:
Parameter
Description
client
customer to be packaged, this will most likely be only 1
environment
environment to be packaged (dev, acc, prod)
Other parameters/values in the batch scripts that can be found are;
Parameter
Description
releaseVersion
Version of the release used to determine which folders to look into
client
customer to be packaged, this will most likely be only 1
environment
environment to be packaged
applicationName
name of the application to be run in the taskmanager and to be used in the scripts
productCode
product code of the application, this is provided to you to prevent clashes with other clients
upgradeCode
upgrade code of the application, this is provided to you to prevent clashes with other clients
installName
Installation name of the application also used for registry keys and folder description
company
Company name used for registry keys
Below you can find an example of how you can initiate the packaging. Fill in the required parameters
1
1_FULL_PACKAGE.bat [client] [environment]
Copied!

Step 4: finalising installer

After you've run the full package script the outcome will be a msi installer. which is not signed at this moment.
The installer can be found in the following folder:
1
C:\...\_windows\_t1c-api_x64\Release
Copied!
Here you will find the Trust1Connector msi installer. At this point you are able to sign the package with the desired code signing certificate. See signing
Last modified 10mo ago