Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 3.43 KB

README-how-to-build.md

File metadata and controls

85 lines (56 loc) · 3.43 KB

How to build the msi

Build client requirements

The build client is where the msi installer is built.

You need

  • 64bit Windows 10
  • Git repositories salt, salt-windows-nsis and salt-windows-msi
  • .Net 3.5 SDK (for WiX)*
  • Wix 3**
  • Build tools 2015**
  • Microsoft_VC140_CRT_x64.msm from Visual Studio 2015**
  • Microsoft_VC140_CRT_x86.msm from Visual Studio 2015**
  • Microsoft_VC120_CRT_x64.msm from Visual Studio 2013**
  • Microsoft_VC120_CRT_x86.msm from Visual Studio 2013**

Notes:

  • * build.cmd will open optionalfeatures if necessary.
  • ** build.cmd will download them to .\_cache.dir and install if necessary.

Step 1: build the Nullsoft (NSIS) exe installer or use the mockup

  • Build the Nullsoft (NSIS) exe installer

  • Or execute test-copy_mock_files_to_salt_repo.cmd for only testing configuration

Step 2: build the msi installer

Execute

build.cmd

Remark on transaction safety

  • Wix is transaction safe: either the product is installed or the prior state is restored/rolled back.
  • C# is not.

Directory structure

  • Product.wxs: main file.
  • CustomAction01/: custom actions in C#
  • *-discovered-files.wxs: TEMPORARY FILE

Naming conventions

  • Immediate custom actions serve initialization (before the install transaction starts) and must not change the system.
  • Deferred custom action may change the system but run in a "sandbox".
Postfix Example Meaning
_IMCAC ReadConfig_IMCAC Immediate custom action written in C#
_DECAC WriteConfig_DECAC Deferred custom action written in C#
_CADH WriteConfig_CADH Custom action data helper (only for deferred custom action)

"Custom action data helper" send properties to the deferreed actions in the sandbox.

Other Notes

msi conditions for install, uninstall, upgrade:

Install sequences documentation:

The Windows installer restricts the maximum values of the ProductVersion property:

  • major.minor.build
  • 255.255.65535

Therefore we generate an "internal version":

  • Salt 3002.1 becomes 30.02.1

Which Python version uses which MS VC CRT version

  • Python 2.7 = VC CRT 9.0 = VS 2008
  • Python 3.6 = VC CRT 14.0 = VS 2017