On Fri Aug 21 15:18:45 2026 +0000, Alexandre Julliard wrote:
Potentially trying the same dir twice doesn't seem like an improvement. What's wrong with the existing code? `INSTALL_DATADIR` is not resolved properly:
``` 009c:trace:appwizcpl:install_from_default_dir package dir L"\\??\\Z:\\tmp\\wine\\wine32\\..\\" ``` The string is not concatencated correctly because of a difference between wide and narrow strings. ``` L"\\\\?\\unix" INSTALL_DATA_DIR "/wine/" ``` Casting `WCHAR data_dirs[]` resolves this.
Potentially trying the same dir twice doesn't seem like an improvement
That's always been the case, if `INSTALL_DATADIR == "/usr/share/wine"`. ``` if (ret == INSTALL_NEXT) ret = install_from_file(L"\\\\?\\unix" INSTALL_DATADIR "/wine/", addon->subdir_name, addon->file_name); if (ret == INSTALL_NEXT && strcmp("" INSTALL_DATADIR, "/usr/share") != 0) ret = install_from_file(L"\\\\?\\unix/usr/share/wine/", addon->subdir_name, addon->file_name); ``` In theory, anyway, but the first part doesn't work. If `INSTALL_DATADIR == /opt/wine-my-special-build` then checking `/usr/local/share/wine` still makes sense and isn't checked twice. It's a fallback like the others. Initially I changed the layout so I could add traces, but then found it worked so here it is. ``` 01ac:trace:appwizcpl:install_from_default_dir (Try 0) Installing L"wine-gecko-2.47.4-x86.msi" from L"\\\\?\\unix/usr/local/share/wine/"... 01ac:trace:appwizcpl:install_from_default_dir (Try 0) success. ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11723#note_149536