|
12 | 12 | """Bump the AdvancedInstaller .aip project for a release. |
13 | 13 |
|
14 | 14 | Usage: |
15 | | - python scripts/bump_installer.py # version bump only |
16 | | - python scripts/bump_installer.py --sync-files # bump + re-sync APPDIR |
17 | | - python scripts/bump_installer.py --sync-only # re-sync APPDIR only (CI) |
18 | | - python scripts/bump_installer.py --version 0.7.0 # explicit version override |
19 | | -
|
20 | | -The version-bump path rewrites ProductVersion / ProductCode / PackageFileName. |
21 | | ---sync-files additionally walks dist/scenedetect/ (pyinstaller output) and |
22 | | -rewrites the project's directory + component + file tables to match, which |
23 | | -is needed when bundled dependencies change. --sync-only does the resync |
24 | | -without touching version/identity fields - intended for CI, where the .aip |
25 | | -is already at the release version and we just want the file list to match |
26 | | -CI's pyinstaller output (rather than the developer's local one). |
27 | | -
|
28 | | -All paths shell out to AdvancedInstaller.com so the .aip's invariants |
29 | | -(line endings, attribute ordering, GUID casing) stay intact. The CLI lives |
30 | | -under "C:\\Program Files (x86)\\Caphyon\\Advanced Installer ..\\bin\\x86\\". |
31 | | -Override discovery with the ADVINST environment variable. |
| 15 | + python scripts/bump_installer.py # version bump only |
| 16 | + python scripts/bump_installer.py --sync-files # bump + re-sync APPDIR |
| 17 | + python scripts/bump_installer.py --sync-only # re-sync APPDIR only (CI) |
| 18 | + python scripts/bump_installer.py --sync-only --dev # CI dev build (renames MSI) |
| 19 | + python scripts/bump_installer.py --version 0.7.0 # explicit version override |
| 20 | +
|
| 21 | +The committed .aip is a baseline; CI's --sync-only adapts it per build and is |
| 22 | +never written back to git. Refresh locally with --sync-files before each release. |
| 23 | +
|
| 24 | +All paths shell out to AdvancedInstaller.com to preserve .aip invariants |
| 25 | +(line endings, attribute ordering, GUID casing). Override CLI discovery with |
| 26 | +the ADVINST environment variable. |
32 | 27 | """ |
33 | 28 |
|
34 | 29 | import argparse |
@@ -109,19 +104,35 @@ def main() -> None: |
109 | 104 | action="store_true", |
110 | 105 | help="Re-sync APPDIR only; leave version/GUID fields untouched (CI use).", |
111 | 106 | ) |
| 107 | + parser.add_argument( |
| 108 | + "--dev", |
| 109 | + action="store_true", |
| 110 | + help=( |
| 111 | + "Rename the MSI to PySceneDetect-{ver}-dev-win64.msi so dev-build artifacts " |
| 112 | + "are distinguishable from release artifacts. Only valid with --sync-only." |
| 113 | + ), |
| 114 | + ) |
112 | 115 | parser.add_argument( |
113 | 116 | "--version", |
114 | 117 | dest="version_override", |
115 | 118 | help="MSI version override (default: derived from scenedetect.__version__).", |
116 | 119 | ) |
117 | 120 | args = parser.parse_args() |
118 | 121 |
|
| 122 | + if args.dev and not args.sync_only: |
| 123 | + sys.exit("--dev is only valid in combination with --sync-only.") |
| 124 | + |
119 | 125 | advinst = find_advinst() |
120 | 126 | print(f"Using {advinst}") |
121 | 127 |
|
122 | 128 | if args.sync_only: |
123 | 129 | print(f"Re-syncing APPDIR in {INSTALLER_AIP.name}") |
124 | 130 | resync_appdir(advinst) |
| 131 | + if args.dev: |
| 132 | + version = msi_version(args.version_override or scenedetect.__version__) |
| 133 | + dev_name = f"PySceneDetect-{version}-dev-win64.msi" |
| 134 | + print(f"Renaming MSI package to {dev_name} (dev build)") |
| 135 | + run(advinst, "/SetPackageName", dev_name, "-buildname", "DefaultBuild") |
125 | 136 | return |
126 | 137 |
|
127 | 138 | raw_version = args.version_override or scenedetect.__version__ |
|
0 commit comments