Calculate the MSI install path from the construct.yaml config. MSI installers use ' ' as the install directory name, matching the formal_name set in briefcase.py.
(config_path: Path)
| 343 | |
| 344 | |
| 345 | def calculate_msi_install_path(config_path: Path) -> Path: |
| 346 | """Calculate the MSI install path from the construct.yaml config. |
| 347 | |
| 348 | MSI installers use '<name> <version>' as the install directory name, |
| 349 | matching the formal_name set in briefcase.py. |
| 350 | """ |
| 351 | config = parse_construct(str(config_path), platform="win-64") |
| 352 | dir_name = f"{config['name']} {config['version']}" |
| 353 | local_dir = os.environ.get("LOCALAPPDATA", str(Path.home() / r"AppData\Local")) |
| 354 | root_dir = Path(local_dir) / "Programs" |
| 355 | root_dir.mkdir(parents=True, exist_ok=True) |
| 356 | |
| 357 | assert root_dir.is_dir() # Consistency check to avoid strange unexpected errors |
| 358 | return Path(root_dir) / dir_name |
| 359 | |
| 360 | |
| 361 | def handle_exception_and_error_out( |