Support for Conditional Commands Based on Windows Target in Briefcase Configuration
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 40
Description
### What is the problem or limitation you are having?
Currently, Briefcase supports conditional configuration for Linux systems based on the target distribution (e.g., `[tool.briefcase.app.wunjo.linux.system.debian]` or `[tool.briefcase.app.wunjo.linux.system.rhel]`). However, I tried to implement a similar configuration for Windows with a target like `[tool.briefcase.app.wunjo.windows.msi]`, but it didn’t work as expected. Specifically, I wanted to define custom paths or commands for different Windows formats (e.g., .msi vs. .zip) but was unable to do so.
### Describe the solution you'd like
I would like the ability to define platform-specific configurations in a similar way to how it is done for Linux, for example:
```
[tool.briefcase.app.wunjo.windows.msi]
cleanup_paths = [
"**/app_packages/torch",
"**/app_packages/torchvision",
"**/app_packages/torchaudio"
]
[tool.briefcase.app.wunjo.windows.zip]
sources = [
".portable"
]
```
This would allow users to tailor the configuration based on the type of Windows package being built (MSI vs. ZIP) and make customizations such as specifying paths, adding or removing files, or defining different build commands.
### Describe alternatives you've considered
Currently, there are no alternatives in Briefcase to achieve this level of granularity for Windows targets. I considered manually managing different configurations outside of Briefcase, but that would defeat the purpose of using the tool for automation.
### Additional context
This feature would greatly enhance the flexibility of Briefcase for cross-platform development, especially for scenarios where specific commands or paths need to be handled differently based on the target package format on Windows.
Contributor guide
Research direction
No files or tests are identified in the issue. Start by locating Briefcase's existing Linux distribution-specific configuration handling and the Windows MSI and ZIP target selection paths, then compare how conditional settings are resolved. Done means Windows configurations can distinguish MSI from ZIP targets for settings such as cleanup_paths, sources, and commands, with coverage for both formats.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100