Skip to content

MSI: Add support for installer branding#1235

Open
lrandersson wants to merge 11 commits into
conda:briefcase-integrationfrom
lrandersson:dev-ra-823
Open

MSI: Add support for installer branding#1235
lrandersson wants to merge 11 commits into
conda:briefcase-integrationfrom
lrandersson:dev-ra-823

Conversation

@lrandersson
Copy link
Copy Markdown
Contributor

@lrandersson lrandersson commented May 14, 2026

Description

Add branding image support (welcome_image, header_image, icon_image) to MSI installers.

MSI installers now generate branded dialog images and icons, matching the existing EXE behavior. Users can provide custom images or rely on auto-generation.

Key changes:

  • imaging.py: Added MSI image dimensions (493x312 welcome, 493x58 header, 256x256 icon) and refactored os parameter to installer_type for clarity ("exe", "pkg", "msi")
  • briefcase.py: Integrated write_images() to generate branding files and configured pyproject.toml with installer_background, installer_banner, and icon paths
  • osxpkg.py: Updated to use new installer_type="pkg" parameter
  • _schema.py: Added "(Not supported for MSI installers.)" to text branding options (welcome_file, welcome_text, readme_file, readme_text, conclusion_file, conclusion_text)
  • Cleanup: Removed unused if __name__ == "__main__" block from imaging.py and deleted examples/miniconda/ directory

Note on image dimensions: MSI welcome/header images have different aspect ratios than EXE (landscape vs portrait). Auto-resize will stretch images. I added a TODO because I will likely need to revisit this (hence also why it's opened as a Draft for now).

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review May 14, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 14, 2026
@lrandersson lrandersson marked this pull request as ready for review May 15, 2026 20:14
@lrandersson lrandersson requested a review from a team as a code owner May 15, 2026 20:14
Comment thread constructor/imaging.py
def write_images(info, dir_path, os="windows"):
if os == "windows":
def write_images(info, dir_path, installer_type="exe"):
if installer_type == "exe":
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also learnt today that _schema.py defines class InstallerTypes(StrEnum), I think we should expose this class in constructor and update all the installer type checks to use this.

Comment thread constructor/_schema.py Outdated
If the installer is for Windows EXE and the welcome file type is nsi,
it will use the nsi script to add in extra pages before the installer
begins the installation process.
begins the installation process. (Not supported for MSI installers.)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to add all the items that are not supported for MSI installers. You are being explicit with the supported formats already.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See a886add

Comment thread constructor/briefcase.py Outdated
# The following EXE branding options are not supported for MSI installers
# because they require modifications to the WiX template in briefcase-windows-app-template:
# - welcome_file / welcome_text (custom welcome page text)
# - readme_file / readme_text (readme page)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the readme file is for PKG installers only anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread constructor/imaging.py
(
"welcome",
welcome_size_msi,
lambda info: mk_welcome_image(info, welcome_size_msi),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the EXE installers also use lambda functions so that we have more explicit names for variables?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lambdas are only needed for MSI because it passes sizes different from default. EXE uses default parameters, so lambdas would be redundant. I could change it just for consistency but provides with no functional benefit, let me know what you think.

@lrandersson lrandersson requested a review from marcoesters May 18, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

3 participants