webdrop-bridge/test_msi.py
claudi 2b12ee2aef Add test script for MSI creation using WindowsBuilder
This commit introduces a new test script, `test_msi.py`, which automates the process of creating an MSI installer. The script utilizes the `WindowsBuilder` class to generate the installer and checks for its successful creation, providing feedback on the result and the file size.
2026-02-18 15:14:21 +01:00

24 lines
709 B
Python

#!/usr/bin/env python
"""Test MSI creation."""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent / "build" / "scripts"))
from build_windows import WindowsBuilder
if __name__ == "__main__":
builder = WindowsBuilder()
print("Creating MSI installer...")
result = builder.create_msi()
print(f"MSI Creation Result: {result}")
# Check if MSI was created
msi_path = builder.dist_dir / f"WebDropBridge-{builder.version}-Setup.msi"
if msi_path.exists():
print(f"\n✅ MSI created successfully: {msi_path}")
print(f" Size: {msi_path.stat().st_size / 1024 / 1024:.1f} MB")
else:
print(f"\n❌ MSI not found: {msi_path}")