michelou / wix-examples

Running WiX Toolset on Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playing with WiX Toolset on Windows

WiX project This repository gathers Windows installer examples coming from various websites and books.
It also includes several build scripts (batch files) for experimenting with the WiX Toolset on a Windows machine.

Ada, Akka, C++, Dart, Deno, Docker, Flix, Golang, GraalVM, Haskell, Kafka, Kotlin, LLVM, Rust, Scala 3, Spark, Spring and TruffleSqueak are other trending topics we are continuously monitoring.

Project dependencies

This project depends on two external software for the Microsoft Windows platform:

Optionally one may also install the following software:

Installation policy
When possible we install software from a Zip archive rather than via a Windows installer. In our case we defined C:\opt\ as the installation directory for optional software tools (similar to the /opt/ directory on Unix).

For instance our development environment looks as follows (December 2023) 5:

C:\opt\Git\                    (314 MB)
C:\opt\ImageMagick-7.1.0-Q16\  (300 MB)
C:\opt\WiX-3.11.2\             ( 99 MB)
C:\Program Files (x86)\instedit.com\InstEd\  (  7 MB)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\  (2.98 GB)
C:\Program Files (x86)\Windows Kits\10\      (5.46 GB)

🔎 Git for Windows provides a BASH emulation used to run git from the command line (as well as over 250 Unix commands like awk, diff, file, grep, more, mv, rmdir, sed and wc).

Directory structure

This project is organized as follows:

docs\
examples\{README.md, MiniAppKiller, uberAgent}
firegiant-examples\{README.md, SampleFirst, etc.}
myexamples\{README.md, MyApp, etc.}
openjdk-examples\{README.md, OpenJDK11, etc.}
scala2-examples\{README.md, Scala2First, Scala2UI, etc.}
scala3-examples\{README.md, Scala3First, Scala3UI, etc.}
MSI.md
QUICKREF.md
README.md
RESOURCES.md
SECURITY.md
SETUP.md
setenv.bat

where

Batch commands

setenv.bat 6

Command setenv.bat is executed once to setup our development environment; it makes external tools such as code.cmd and git.exe directly available from the command prompt.

> setenv -verbose
Tool versions:
   candle 3.11.2.4516, light 3.11.2.4516,
   msiinfo 5.0, uuidgen v1.01
   magick 7.1.0-7, git 2.43.0.windows.1, diff 3.10
 
> where msiinfo git
C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\MsiInfo.exe
C:\opt\Git\bin\git.exe
C:\opt\Git\mingw64\bin\git.exe

Footnotes

[1] ImageMagick

ImageMagick is a free software to create, edit, compose, or convert digital images. In this project we rely on the convert tool to customize the dialog windows in the generated Windows installer.

[2] InstEd

InstEd is a free MSI editor built for professionals. In this project we use that tool to inspect Windows installers available for other software products, e.g.

[3] Visual Studio 2019

Microsoft Visual Studio 2019 is the defacto IDE for devopping Microsoft Windows application (either console applications or GUI applications). In this project we use the MSBuild tool to build a basic GUI application and the WiX Toolset to create a Windows installer.

[4] Windows SDK

The Windows SDK provides libraries and tools for building Windows applications; for instance signtool.exe is the security tool we use in this project to sign the generated Windows installers.

[5] Downloads

In our case we downloaded the following installation files (see section 1):
ImageMagick-7.1.0-portable-Q16-x64.zip  (111 MB)
PortableGit-2.43.0-64-bit.7z.exe        ( 44 MB)
vs_2019_community.exe                   (1.7 GB)
winsdksetup.exe                         (  1 MB)
wix311-binaries.zip                     ( 33 MB)
Microsoft doesn't provide an offline installer for VS 2019 but we can follow the following instructions to create a local installer (so called layout cache) for later (re-)installation.

[6] setenv.bat usage

setenv.bat has specific environment variables set that enable us to use command-line developer tools more easily.
It is similar to the setup scripts described on the page "Visual Studio Developer Command Prompt and Developer PowerShell" of the Visual Studio online documentation.
For instance we can quickly check that the two scripts Launch-VsDevShell.ps1 and VsDevCmd.bat are indeed available in our Visual Studio 2019 installation :
> where /r "C:\Program Files (x86)\Microsoft Visual Studio" *vsdev*
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Launch-VsDevShell.ps1
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevcmd\core\vsdevcmd_end.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevcmd\core\vsdevcmd_start.bat
Concretely, setenv.bat in our GitHub projects which depend on Visual Studio (e.g. michelou/cpp-examples) do invoke VsDevCmd.bat (resp. vcvarall.bat for older Visual Studio versions) to setup the Visual Studio tools on the command prompt.

mics/December 2023  

About

Running WiX Toolset on Windows


Languages

Language:Rich Text Format 45.4%Language:XSLT 37.1%Language:C++ 16.5%Language:HTML 1.0%