Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ $PYTHON = $null
foreach ($cmd in @("python3", "python")) {
$found = Get-Command $cmd -ErrorAction SilentlyContinue
if ($found) {
$versionOutput = & $cmd --version 2>&1
if ($versionOutput -match "(\d+)\.(\d+)") {
$major = [int]$Matches[1]
$minor = [int]$Matches[2]
if ($major -ge 3 -and $minor -ge 8) {
$PYTHON = $cmd
break
try {
$versionOutput = & $cmd --version 2>&1
if ($versionOutput -match "(\d+)\.(\d+)") {
$major = [int]$Matches[1]
$minor = [int]$Matches[2]
if ($major -ge 3 -and $minor -ge 8) {
$PYTHON = $cmd
break
}
}
} catch {
# python3 on Windows may be a Store redirect alias that fails; skip it
continue
}
}
}
Expand Down Expand Up @@ -109,13 +114,20 @@ if (-not ($userPath -split ';' | Where-Object { $_ -eq $VIT_BIN })) {
# ── Install Resolve plugin scripts ───────────

Write-Host " Installing DaVinci Resolve scripts..."
$vitExe = "$VIT_BIN\vit.exe"
if (Test-Path $vitExe) {
& $vitExe install-resolve
} else {
try {
& "$VIT_VENV\Scripts\python.exe" -m vit.cli install-resolve
} catch {
# Prefer python module over vit.exe — the exe may be blocked by antivirus on Windows
try {
& "$VIT_VENV\Scripts\python.exe" -m vit.cli install-resolve
} catch {
$vitExe = "$VIT_BIN\vit.exe"
if (Test-Path $vitExe) {
try {
& $vitExe install-resolve
} catch {
Write-Host ""
Write-Host " Note: Could not auto-install Resolve scripts."
Write-Host " After restarting your terminal, run: vit install-resolve"
}
} else {
Write-Host ""
Write-Host " Note: Could not auto-install Resolve scripts."
Write-Host " After restarting your terminal, run: vit install-resolve"
Expand All @@ -131,7 +143,7 @@ Write-Host " Next steps:"
Write-Host " 1. Restart your terminal"
Write-Host " 2. Create and open your project in DaVinci Resolve"
Write-Host " 3. Run: vit init your-project-name (in your terminal)"
Write-Host " (creates a vit tracking folder anywhere on disk location doesn't matter)"
Write-Host " (creates a vit tracking folder anywhere on disk -- location doesn't matter)"
Write-Host " 4. Run: vit collab setup"
Write-Host " (connect to a GitHub repo so your team can share the project)"
Write-Host " 5. In Resolve: Workspace > Scripts > Vit"
Expand Down
6 changes: 3 additions & 3 deletions vit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def cmd_install_resolve(args):
shutil.copy2(source, dest)
else:
os.symlink(source, dest)
print(f" Linked: {menu_name} {source}")
print(f" Linked: {menu_name} -> {source}")

# Save the repo root path so Resolve scripts can find the vit package
# even if __file__ or symlink resolution fails in Resolve's Python
Expand Down Expand Up @@ -584,7 +584,7 @@ def cmd_remote(args):

if args.remote_cmd == "add":
git_remote_add(project_dir, args.name, args.url)
print(f" Added remote '{args.name}' {args.url}")
print(f" Added remote '{args.name}' -> {args.url}")

elif args.remote_cmd == "list" or args.remote_cmd is None:
remotes = git_remote_list(project_dir)
Expand Down Expand Up @@ -650,7 +650,7 @@ def _print_ssh_instructions(url: str, remote_name: str) -> None:
print(f" git remote set-url {remote_name} {ssh_url}")
else:
print(" Use the SSH URL from GitHub: [email protected]:username/repo.git")
print(" (On the repo page, click Code SSH to copy it)")
print(" (On the repo page, click Code -> SSH to copy it)")
print()
print(" Then re-run: vit collab setup")

Expand Down