first commit

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kunkunxiaomaoandClaude committed 2026-11-16 20:45:22 +08:00
commit 9c5fef1a4d
412 files changed
+94582

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
"""Quick check: which plugin dirs are bundled in the EXE."""
import zipfile, io, sys
from pathlib import Path
exe = Path("dist/sakuradownloader.exe")
if not exe.exists():
print("EXE not found")
sys.exit(1)
with open(exe, "rb") as f:
raw = f.read()
# Find PyInstaller CArchive magic
magic = b"MEI\x14\x14"
pos = raw.rfind(magic)
if pos == -1:
print("CArchive marker not found")
sys.exit(1)
z = zipfile.ZipFile(io.BytesIO(raw[pos:]))
plugin_dirs = set()
for name in z.namelist():
parts = name.replace("\\", "/").split("/")
if len(parts) >= 2 and parts[0] == "plugins":
plugin_dirs.add(parts[1])
print("Plugins included in EXE:")
for p in sorted(plugin_dirs):
print(f" - {p}")
excluded = {"ao3", "changpei"}
included_but_should_not = excluded & plugin_dirs
if included_but_should_not:
print(f"\nWARNING: these should be excluded: {included_but_should_not}")
else:
print("\nOK: ao3 and changpei are correctly excluded.")