(advinst: Path)
| 73 | |
| 74 | |
| 75 | def resync_appdir(advinst: Path) -> None: |
| 76 | if not DIST_TREE.exists(): |
| 77 | sys.exit( |
| 78 | f"{DIST_TREE} not found. Run `pyinstaller packaging/windows/scenedetect.spec` first." |
| 79 | ) |
| 80 | # /ResetSync errors out if APPDIR isn't already a synced folder |
| 81 | # (true on the first run); /NewSync will fail if it IS synced. So |
| 82 | # try the reset but tolerate failure, then sync. |
| 83 | run(advinst, "/ResetSync", "APPDIR", check=False) |
| 84 | run(advinst, "/NewSync", "APPDIR", str(DIST_TREE)) |
| 85 | |
| 86 | |
| 87 | def main() -> None: |