update-desktop-database and gtk-update-icon-cache exist on every desktop distro that ships a .desktop file system, but we don't fail integration if they're missing — modern compositors inotify-watch the dirs and pick up new files within seconds anyway. wxExecute with wxEXEC_SYNC still returns instantly if the binary isn't found.
| 173 | // up new files within seconds anyway. wxExecute with wxEXEC_SYNC still |
| 174 | // returns instantly if the binary isn't found. |
| 175 | void RefreshSystemCaches(const wxString& userAppsDir, const wxString& userIconsDir) |
| 176 | { |
| 177 | wxExecute(wxT("update-desktop-database \"") + userAppsDir + wxT("\""), |
| 178 | wxEXEC_SYNC | wxEXEC_NODISABLE | wxEXEC_NOEVENTS); |
| 179 | wxExecute(wxT("gtk-update-icon-cache -f -t \"") + userIconsDir + wxT("/hicolor\""), |
| 180 | wxEXEC_SYNC | wxEXEC_NODISABLE | wxEXEC_NOEVENTS); |
| 181 | } |
| 182 | |
| 183 | bool DesktopFileAlreadyInstalled() |
| 184 | { |