Audit portable Windows DLL dependencies before releasing
This commit is contained in:
1 parent
d20ce064a5
commit
2fb675e64c
4 files changed
+13
-2
No files matched your search
@@ -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('*')):
|
||||
|
||||
Reference in new issue
Block a user