SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Browse photo folders, which include folder that has non ASCII character (in my case: Z:\ExternalDrive\Pictures\BM\liên hoan cuối năm\ 2. Go to Item > Edit Metadata and make changes to Date & Time section 3. Click Apply or OK alternatively: 1. same as above 2. Go to Item > Adjust Time & Date, makes changes 3. Go to Item > Write metadata to file 4. Observe the changes in actual file Those behaviors in Album are the same OBSERVED RESULT datetime value isn't updated EXPECTED RESULT datetime value should be updated SOFTWARE/OS VERSIONS Windows 11 23H2 ADDITIONAL INFORMATION
In the Exiv2 Library, the developers have removed the function for wchar file paths on Windows. Other projects are also affected. We are now planning to activate UTF-8 support in the Windows bundle for digiKam-8.4.0, this will fix the problem from Windows 10-1903. Alternatively, you can activate the writing of metadata with ExifTool in the digiKam settings. Maik
Maik, The MXE Windows build still using Exiv2 0.27 which do not have the problem as the wchar methods have been removed to Exiv2 0.28. I don't know why the Exiv2 project do not check regression about this problem and do not reverse this important changes. Note: Exiv2 report about this topic: https://github.com/Exiv2/exiv2/issues/2637 Gilles Caulier
Git commit 9bf12b2d04e2faaf05f98589b346e43d2f12a7a0 by Maik Qualmann. Committed on 16/03/2024 at 14:32. Pushed by mqualmann into branch 'master'. prepare Exiv2 file paths to use UTF-8 on Windows in the MSVC build M +1 -1 core/libs/metadataengine/engine/metaengine_comments.cpp M +1 -1 core/libs/metadataengine/engine/metaengine_exif.cpp M +2 -2 core/libs/metadataengine/engine/metaengine_fileio.cpp M +1 -1 core/libs/metadataengine/engine/metaengine_iptc.cpp M +1 -1 core/libs/metadataengine/engine/metaengine_p.cpp M +1 -1 core/libs/metadataengine/engine/metaengine_previews.cpp M +1 -1 core/libs/metadataengine/engine/metaengine_xmp.cpp https://invent.kde.org/graphics/digikam/-/commit/9bf12b2d04e2faaf05f98589b346e43d2f12a7a0
@Gilles, I need a new MSVC build. I want to link a corresponding manifest file to digikam.exe using the Windows developer SDK and mt.exe in order to test UTF-8 file paths. Maik
Build is under progress with MSVC Patch cmake rules to link with the manifest file, i will look if all works as expected at compilation under Windows.
Maik, Windows installer 8.4.0 pre-release is online...
Yes, the server is a bit busy... Maik
Ok, I started the download again, now a different mirror server is probably being used. The Windows SDK has also been at 11% for a while... Maik
Git commit 782daf2855361a8c76bff2bc418006d979454f53 by Maik Qualmann. Committed on 16/03/2024 at 17:42. Pushed by mqualmann into branch 'master'. upload digikam.exe.manifest file A +9 -0 project/bundles/vcpkg/data/digikam.exe.manifest https://invent.kde.org/graphics/digikam/-/commit/782daf2855361a8c76bff2bc418006d979454f53
@Gilles, It works! The command to apply the file is: mt.exe -manifest <MANIFEST> -outputresource:<EXE>;#1 mt.exe -manifest digikam.exe.manifest -outputresource:digikam.exe;#1 But I think that there should also be a compile time way to apply the file, but I have to research it first. Maik
We need to do the same with showFoto too. Maik
Dark table which use flame and have this kind of rules must have the command in source code Look also in Krista which provide a windows version for the Asian country where this kind of support is mandatory for utf8 file paths
Darktable seems to be using winuser.rh with "RT_MANIFEST" after this commit. https://github.com/darktable-org/darktable/pull/15899/commits/83a11d192bf2ea33092554410bde05f42f205138 https://learn.microsoft.com/de-de/windows/win32/menurc/resource-types Krita uses a QIODevice loader for everything. Maik
Git commit 323471a7c2fae67070c421dafd08aada0f04f5d9 by Maik Qualmann. Committed on 17/03/2024 at 18:36. Pushed by mqualmann into branch 'master'. try to add manifest file in the build process M +6 -0 project/bundles/vcpkg/04-build-installer.sh https://invent.kde.org/graphics/digikam/-/commit/323471a7c2fae67070c421dafd08aada0f04f5d9
@Gilles, can you please test whether it works. I don't know if you have the Windows SDK installed or if the mt.exe is in the Visual Studio path. Maik
ok, i will check that asap... Gilles
Git commit 01a9335e809fed138928b8d602162711ea63337c by Maik Qualmann. Committed on 17/03/2024 at 21:33. Pushed by mqualmann into branch 'master'. another probably copy/paste error M +2 -2 core/libs/metadataengine/focuspoint/focuspoints_extractor_canon.cpp https://invent.kde.org/graphics/digikam/-/commit/01a9335e809fed138928b8d602162711ea63337c
Comment 17 should be posted on Bug 483839 Maik
Maik, ---------- Apply manifest file to enable UTF-8 support for file paths ./04-build-installer.sh: line 271: /c/Program Files (x86)/Windows Kits/10/bin/x64/mt: No such file or directory FAILED COMMAND: "/c/Program Files (x86)/Windows Kits/10/bin/x64/mt" -manifest $ORIG_WD/data/digikam.exe.manifest -outputresource:$VCPKG_INSTALL_PREFIX/bin/digikam.exe ---------- Cleanup older bundle logs from files.kde.org repository It miss something to install on the VM. I will take a look Gilles
The "mt.exe" can also be located somewhere in the Visual Studio directory. The "mt.exe" only has one config file, no other dependencies, it can also be copied to another location. Maik
Gilles, you have to select the optional component "Visual Studio Extensions Development" (translated from German) in the Visual Studio installer to get the mt.exe. Alternatively, you can install the SDK from here: https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ Maik
yes, i will install the missing component from the MSVC setup. I will do it this evening and try again.
The executable is already installed on the VM through the Visual Studio 2022 installer : https://imgur.com/a/dDKPnsG The only rules to add is a search of this tool in Windows Kits directory as it's already done with DumpBin.exe program : https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/vcpkg/04-build-installer.sh?ref_type=heads#L56 The VisualStudio CLI tool are not in the PATH on the console (why ??? it's another opaque point from M$) Searching for CLI tool path allows to hard code path in script which breaks the compatibility between Windows kits versions in time... Gilles
Git commit a6e9d3af64e1ad1fca91db586526282052cad07f by Gilles Caulier. Committed on 20/03/2024 at 07:44. Pushed by cgilles into branch 'master'. search for mt.exe CLI tool from Windows Kits M +16 -2 project/bundles/vcpkg/04-build-installer.sh https://invent.kde.org/graphics/digikam/-/commit/a6e9d3af64e1ad1fca91db586526282052cad07f
/c/Program Files (x86)/NSIS/Bin/makensis Check NSIS CLI tools passed... /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/dumpbin.exe Check DumpBin CLI tools passed... /c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/mt.exe Check Mt CLI tools passed... /c/Program Files/ImageMagick-7.1.1-Q16-HDRI Check ImageMagick install path passed...
It's works: ... ---------- Apply manifest file to enable UTF-8 support for file paths Microsoft (R) Manifest Tool Copyright (c) Microsoft Corporation. All rights reserved. ---------- Copy executables with recursive dependencies in bundle directory Scan dependencies for /e/dk/x64-windows/bin/digikam.exe Scan dependencies for /e/dk/x64-windows/bin/digikam.dll ...
Great, it works! Exiv2 can now write and read metadata in file paths with characters that are outside the Windows code page. I will add support for showFoto. Maybe we should create the manifest files from a template, as they contain a version string and we would otherwise have to change this manually with a new digiKam version. Theoretically, we can now add UTF-8 support to many libraries that we now make special adjustments with wchar or QIODevice on Windows, e.g. libRaw, libheif, libjpg, libtiff, etc. But we still need this for MinGW/Windows7 support. Maik
> will add support for showFoto. Maybe we should create the manifest files from a template, as they contain a version string and we would >otherwise have to change this manually with a new digiKam version. yes, the template is the good way. There are template files already used in core/cmake/template/ Gilles
Maik, Look like the manifest file from Krita is really huge, due to the signing application rules for the store: https://invent.kde.org/graphics/krita/-/blob/master/packaging/windows/msix/manifest.xml.in?ref_type=heads But there are also type mime rules inside for ex. Gilles
Note: krita do not have UFT8 support for file path as i can see. The manifest do not include similar rule than the new from digiKam...
Git commit d7ff3a9747b978a1b95eaf42dfa49a5761a3c902 by Maik Qualmann. Committed on 20/03/2024 at 19:49. Pushed by mqualmann into branch 'master'. add cmake template to generate the manifest file with version M +8 -0 core/app/DigikamTarget.cmake R +1 -1 core/cmake/templates/digikam.exe.manifest.cmake.in [from: project/bundles/vcpkg/data/digikam.exe.manifest - 070% similarity] M +1 -1 project/bundles/vcpkg/04-build-installer.sh https://invent.kde.org/graphics/digikam/-/commit/d7ff3a9747b978a1b95eaf42dfa49a5761a3c902
Git commit 133d8a17f245c290e0534a7734fdea61825954a8 by Maik Qualmann. Committed on 20/03/2024 at 19:57. Pushed by mqualmann into branch 'master'. add manifest file to showFoto A +9 -0 core/cmake/templates/showfoto.exe.manifest.cmake.in M +8 -0 core/showfoto/CMakeLists.txt M +4 -0 project/bundles/vcpkg/04-build-installer.sh https://invent.kde.org/graphics/digikam/-/commit/133d8a17f245c290e0534a7734fdea61825954a8
Exiv2 now works with file paths that have characters outside the current Windows code page. I'll close now. https://files.kde.org/digikam/ Maik
Maik, To be clear here, this file is only relevant of the native Windows version compiled with MSVC and using Exiv2 >= 0.28.0. The cross compiled version with MXE still use Exiv2 0.27 to support UTF-8 path. If we upgrade to last 0.28, all will be broken. Gilles
Yes, exactly, with MXE and Exiv2-0.28 the problem would be present again. The question would be, can the manifest file also be applied to a digiKam.exe if it was created by MinGW. I will test it. Maik
The Microsoft Mt.exe tool is only available under Windows. I doubt that a MinGW equivalent exists... Gilles
Hum, perhaps a solution here : https://stackoverflow.com/questions/20255591/manifest-being-ignored-in-mingw-app Gilles
My idea would have been Wine, but "winuser.h" also uses darktable: https://github.com/darktable-org/darktable/pull/15899/files serach for "winuser" Maik
Git commit 9bc678024d7de9585564f054984a824ac6be55ac by Gilles Caulier. Committed on 01/05/2024 at 11:29. Pushed by cgilles into branch 'master'. try to activate Windows manifest descriptions under MXE M +1 -1 core/app/DigikamTarget.cmake M +1 -1 core/showfoto/CMakeLists.txt https://invent.kde.org/graphics/digikam/-/commit/9bc678024d7de9585564f054984a824ac6be55ac
Git commit 9aca251532036b8207db07538318d2bc5130bcd3 by Gilles Caulier. Committed on 01/05/2024 at 11:35. Pushed by cgilles into branch 'master'. switch to Exiv2 0.28.2 under MXE M +2 -2 project/bundles/3rdparty/ext_exiv2/CMakeLists.txt https://invent.kde.org/graphics/digikam/-/commit/9aca251532036b8207db07538318d2bc5130bcd3
Git commit 010699c40a404d1c5e0b6f064751d98e2aa79da8 by Gilles Caulier. Committed on 01/05/2024 at 11:46. Pushed by cgilles into branch 'master'. apply patch for mmap support under MXE M +2 -2 project/bundles/3rdparty/ext_exiv2/CMakeLists.txt https://invent.kde.org/graphics/digikam/-/commit/010699c40a404d1c5e0b6f064751d98e2aa79da8
Maik, I enabled the manifest files install under MXE and build the 0.28.2 version instead 0.27-maintenance branch (unmaintained since a while) Qt5 based Installer 8.4.0 pre-release will be online in one hour. Gilles