Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Let package-complete.py accept python pre-zip hooks

Dmitry Kazakov9059cbeafd67
diff --git a/packaging/windows/package-complete.py b/packaging/windows/package-complete.py
index 7e87d41b9b..3f9d5c7e9d 100644
--- a/packaging/windows/package-complete.py
+++ b/packaging/windows/package-complete.py
@@ -636,8 +636,15 @@ for f in files:
if args.pre_zip_hook:
print("Running pre-zip hook...")
- subprocess.run(["cmd", "/c", args.pre_zip_hook,
- f"{pkg_root}\\"], check=True)
+ if args.pre_zip_hook.endswith('.cmd'):
+ subprocess.run(["cmd", "/c", args.pre_zip_hook,
+ f"{pkg_root}\\"], check=True)
+ elif args.pre_zip_hook.endswith('.py'):
+ subprocess.run([sys.executable, "-u", args.pre_zip_hook,
+ f"{pkg_root}\\"], check=True)
+ else:
+ warnings.warn("ERROR: pre-zip hook has unknown format!")
+ sys.exit(102)
print("\nPackaging stripped binaries...")
subprocess.run([os.environ["SEVENZIP_EXE"], "a", "-tzip",