Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Use the portable Git on Windows when the installed Git cannot load libcurl

Bowen Xuef558b32af0dd
diff --git a/freevideo_engine/bootstrap.py b/freevideo_engine/bootstrap.py
index 34b94f4..f477cee 100644
--- a/freevideo_engine/bootstrap.py
+++ b/freevideo_engine/bootstrap.py
@@ -2020,8 +2020,10 @@ class Installer:
return micromamba, [path for path, _, _ in rows[1:]]
def install_git_windows(self):
- # An older Git on PATH cannot fetch the pinned sources; use the portable one.
- if usable_git(self.env['PATH'], self.env):
+ # An older Git on PATH, or one whose HTTPS helper cannot load libcurl, cannot
+ # fetch the pinned sources; use the portable one.
+ found = usable_git(self.env['PATH'], self.env)
+ if found and network.git_https_ready(found, self.env):
return
spec = self.versions['windows']['git']
archive = self.root / 'downloads' / ('MinGit-' + spec['version'] + '.zip')
diff --git a/freevideo_engine/network.py b/freevideo_engine/network.py
index 0c59af3..6125449 100644
--- a/freevideo_engine/network.py
+++ b/freevideo_engine/network.py
@@ -1423,6 +1423,30 @@ def git_version(executable, env=None):
return (int(found[1]), int(found[2])) if found else None
+# Windows loader codes for a missing DLL, a missing export and a wrong-architecture image.
+GIT_LOADER_FAILURES = {0xC0000135, 0xC0000139, 0xC000007B}
+
+
+def git_https_ready(executable, env=None):
+ """False when this Git's HTTPS helper cannot load its libcurl; True otherwise.
+
+ `git --version` never loads libcurl, so a damaged Git passes it and fails at
+ the first fetch. A request to a local port nobody listens on needs no network
+ and reaches the helper: "connection refused" means libcurl loaded.
+ """
+ env = dict(env if env is not None else os.environ, NO_PROXY='*', no_proxy='*')
+ try:
+ result = subprocess_output.run_external(
+ [str(executable), '-c', 'http.proxy=', 'ls-remote', 'https://127.0.0.1:9/probe.git'], env=env,
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=30, **hidden_console())
+ except (OSError, ValueError, subprocess.SubprocessError):
+ return True # Not a library failure; the version check already ran the executable.
+ output = (result.stdout or '').lower()
+ if 'failed to load library' in output or ('libcurl' in output and 'dll' in output):
+ return False
+ return (result.returncode & 0xFFFFFFFF) not in GIT_LOADER_FAILURES
+
+
def old_git_message(version):
return ('Git %d.%d is too old to download the pinned sources; FreeVideo needs Git %d.%d or newer. '
'Click Retry installation to use FreeVideo\'s own Git.' % (*version, *MIN_GIT))