Summary: | Cannot get installed version programatically on Windows | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Adric Worley <adric.worley> |
Component: | General | Assignee: | Halla Rempt <halla> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | halla, tamtamy.tymona |
Priority: | NOR | ||
Version: | 4.2.9 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/58f15a09f8697e3cbc8ba36a29318882606c28be | Version Fixed In: | |
Sentry Crash Report: |
Description
Adric Worley
2020-06-20 17:33:40 UTC
I suggested the workaround using the sysinfo file: https://docs.krita.org/en/reference_manual/sharing_krita_logs.html#id3 but (1) it doesn't exists before 4.2.9, versions 4.2.8 and before would need to check krita.log instead, and version 4.2.0-4.2.8 would have the trouble of determining the version of the last running of Krita and not some random, and (2) it is in general not safe for script usage, I think, because it's meant to be parsed by humans, not scripts. Hm... it's actually Qt that decided that on Windows it needs to show a messagebox for the version, if you add the version to the arguments with parser.addVersionOption(); I think it might be best to add a QString version() method to the Krita API in libkis, so the version can be retrieved in a Python script. Is there any other meta information about the installed Krita you'd like to retrieve? I've realized that there's an assumed requirement in this report that I should have been explicit about: the version checking needs to be available to an outside process without having to fully load and run the application. So, with that spoken, I think version/metadata method(s) would be useful in general, but not applicable to the use-case I'm considering. Git commit d91086221728c6706a83facbd190cefff87a96e1 by Boudewijn Rempt. Committed on 22/06/2020 at 13:31. Pushed by rempt into branch 'krita/4.3'. Add a small executable to print the version Not tested on Windows yet, but this should work... M +10 -0 krita/CMakeLists.txt A +36 -0 krita/kritaversion.cpp [License: GPL (v2+)] https://invent.kde.org/graphics/krita/commit/d91086221728c6706a83facbd190cefff87a96e1 Git commit 58f15a09f8697e3cbc8ba36a29318882606c28be by Boudewijn Rempt. Committed on 22/06/2020 at 13:32. Pushed by rempt into branch 'master'. Add a small executable to print the version Not tested on Windows yet, but this should work... (cherry picked from commit d91086221728c6706a83facbd190cefff87a96e1) M +10 -0 krita/CMakeLists.txt A +36 -0 krita/kritaversion.cpp [License: GPL (v2+)] https://invent.kde.org/graphics/krita/commit/58f15a09f8697e3cbc8ba36a29318882606c28be |