Building a Windows installer file

In addition to building a Windows executable, we can build a Windows installer file (.msi) using the bdist_msi operation. Apart from being ideally compact and simple to distribute, this file provides some additional capabilities for our build, such as an install wizard and shortcut generation.

One thing we can specify here is the upgrade code:

cx.setup(    #...    options = {
        'bdist_msi': {
            'upgrade_code': '{12345678-90AB-CDEF-1234-567890ABCDEF}',

The upgrade code is a Globally Unique Identifier (GUID) value that will identify this program on the OS. By specifying this, subsequent builds of this .msi file will remove and replace any existing installations of the same program.

Upgrade codes consist of five ...

Get Python GUI Programming with Tkinter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.