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++

[win] Save makeappx output into a separate log file

Dmitry Kazakov2901232fa0d3
diff --git a/packaging/windows/msix/build_msix.py b/packaging/windows/msix/build_msix.py
index 0b15c82a38..42c76542ec 100644
--- a/packaging/windows/msix/build_msix.py
+++ b/packaging/windows/msix/build_msix.py
@@ -236,9 +236,11 @@ The arguments stands for:
commandToRun = fr'"{environ["MAKEAPPX"]}" pack {"/v" if useVerbosePackagingLog else ""} /f "{environ["OUTPUT_DIR"]}\mapping.txt" /p "{environ["OUTPUT_DIR"]}\krita.msix" /o'
try:
print(f"Running: {commandToRun}")
- subprocess.check_call(commandToRun)
+ logPath = os.path.join(os.getcwd(), 'makeappx.log')
+ with open(logPath, 'wb') as logFile:
+ subprocess.run(commandToRun, stdout=logFile, stderr=subprocess.STDOUT, check=True)
except subprocess.CalledProcessError:
- warnings.warn("ERROR running makeappx")
+ warnings.warn(f"ERROR running makeappx, see {logPath}")
sys.exit(1)
print(f"\nMSIX generated as {environ['OUTPUT_DIR']}\\krita.msix")