Skip to content

MSI: Add support for user supplied scripts#1189

Merged
lrandersson merged 7 commits into
conda:briefcase-integrationfrom
lrandersson:dev-ra-user-supplied-scripts
Apr 1, 2026
Merged

MSI: Add support for user supplied scripts#1189
lrandersson merged 7 commits into
conda:briefcase-integrationfrom
lrandersson:dev-ra-user-supplied-scripts

Conversation

@lrandersson
Copy link
Copy Markdown
Contributor

@lrandersson lrandersson commented Mar 27, 2026

Description

Added support for user-supplied pre_install, post_install, and pre_uninstall scripts in MSI installers, mirroring existing NSIS functionality.

A summary of the changes:

Script integration (briefcase.py)

  • User scripts are copied to base/pkgs/ as user_pre_install.bat, user_post_install.bat, user_pre_uninstall.bat
  • Validated with is_bat_file() before copying

Template Updates (run_installation.bat, pre_uninstall.bat)

  • Added installer metadata env vars: INSTALLER_NAME, INSTALLER_VER, INSTALLER_PLAT, INSTALLER_TYPE=MSI
  • INSTALLER_UNATTENDED not available (requires WiX template changes)

Followed the same logic as explained in the schema (and NSIS):

  • Scripts with *_desc are optional (gated by OPTION_*_SCRIPT checkbox)
  • Scripts without *_desc are mandatory

Documentation (_schema.py)

  • Updated pre_uninstall and post_install to document MSI support

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 Mar 27, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Mar 27, 2026
@lrandersson lrandersson changed the base branch from main to briefcase-integration March 27, 2026 12:50
@lrandersson lrandersson self-assigned this Mar 27, 2026
@lrandersson lrandersson force-pushed the dev-ra-user-supplied-scripts branch from 5bdc044 to 45643fc Compare March 27, 2026 12:51
@lrandersson lrandersson changed the title MSI: MSI: Add support for user supplied scripts Mar 27, 2026
@lrandersson lrandersson force-pushed the dev-ra-user-supplied-scripts branch from d5ebc52 to a494224 Compare March 27, 2026 15:12
Comment thread tests/test_examples.py
@lrandersson lrandersson marked this pull request as ready for review March 30, 2026 13:21
@lrandersson lrandersson requested a review from a team as a code owner March 30, 2026 13:21
@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Approved in 🔎 Review Mar 31, 2026
@lrandersson lrandersson merged commit d2a6fa2 into conda:briefcase-integration Apr 1, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Apr 1, 2026
lrandersson added a commit that referenced this pull request Apr 7, 2026
* Add support for user supplied scripts

* Enable some new examples

* Fix type error for test

* Change copying of extra_files to base environment

* Fix issue with license file not being copied

* Add debug output

* Fix order of user script, fixes last error
lrandersson added a commit that referenced this pull request Apr 24, 2026
* Add support for user supplied scripts

* Enable some new examples

* Fix type error for test

* Change copying of extra_files to base environment

* Fix issue with license file not being copied

* Add debug output

* Fix order of user script, fixes last error
lrandersson added a commit that referenced this pull request May 1, 2026
* Add support for user supplied scripts

* Enable some new examples

* Fix type error for test

* Change copying of extra_files to base environment

* Fix issue with license file not being copied

* Add debug output

* Fix order of user script, fixes last error
lrandersson added a commit to lrandersson/constructor that referenced this pull request May 28, 2026
* Add support for user supplied scripts

* Enable some new examples

* Fix type error for test

* Change copying of extra_files to base environment

* Fix issue with license file not being copied

* Add debug output

* Fix order of user script, fixes last error
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

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants