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

// These are examples
set productCode={43DB1183-F3D9-4DBF-A7CD-C60B86A0E3D0}
set upgradeCode={C14F1609-DD32-43A9-AC1F-CE5776136F80}

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

// This is an example version
set releaseVersion=3.3.0

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:

Other parameters/values in the batch scripts that can be found are;

Below you can find an example of how you can initiate the packaging. Fill in the required parameters

1_FULL_PACKAGE.bat [client] [environment]

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:

C:\...\_windows\_t1c-api_x64\Release

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 updated