Audit portable Windows DLL dependencies before releasing
Gitea CI / Windows x64 and Android (pull_request) Canceled after 0s
Gitea CI / Gitea CI passed (pull_request) Canceled after 0s

This commit is contained in:
lingjhf committed 2026-10-06 03:11:15 +08:00
1 parent d20ce064a5
commit 2fb675e64c
4 files changed
+13 -2

No files matched your search

+8
View File
@@ -4,6 +4,7 @@ import json
from pathlib import Path
import re
import shutil
import sys
import zipfile
ROOT = Path(__file__).resolve().parents[2]
@@ -25,6 +26,13 @@ def main():
if any(name.startswith('lib/armeabi-v7a/') for name in names):
raise ValueError('APK must use supported 64-bit ABIs only')
shutil.copyfile(apk, output / f'cutdex-{version}-android.apk')
sys.path.insert(0, str(ROOT / 'tool/windows'))
from check_windows_release import audit
unused_jni = windows / 'dartjni.dll'
if unused_jni.exists():
unused_jni.unlink()
report = audit(windows, require_processing=False)
(output / 'windows-dependency-audit.json').write_text(json.dumps(report, indent=2) + '\n')
package = output / f'cutdex-{version}-windows-x64.zip'
with zipfile.ZipFile(package, 'w', compression=zipfile.ZIP_DEFLATED) as archive:
for path in sorted(windows.rglob('*')):