[Manager][linux] Search for skins in /usr/(local)/share/boinc-manager/skins or ./skins folders.

This fixes #4809.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2022-06-24 23:58:51 +02:00
parent e9d122480b
commit 4dba08083b
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
4 changed files with 33 additions and 1 deletions

View File

@ -32,7 +32,7 @@ if ENABLE_CLIENT
endif
if ENABLE_MANAGER
CLIENTGUI_SUBDIRS = clientgui locale clientgui/res
CLIENTGUI_SUBDIRS = clientgui locale clientgui/res clientgui/skins
if BUILD_X11_SCREENSAVER
CLIENTGUI_SUBDIRS += clientscr
endif

View File

@ -976,6 +976,14 @@ wxString CSkinManager::GetSkinsLocation() {
strSkinLocation = wxGetApp().GetRootDirectory();
strSkinLocation += wxFileName::GetPathSeparator();
strSkinLocation += wxT("skins");
#elif defined(__WXGTK__)
strSkinLocation = wxGetApp().GetRootDirectory();
if (strSkinLocation.StartsWith("/usr/")) {
strSkinLocation += wxT("/../share/boinc-manager/skins");
}
else {
strSkinLocation += wxT("/skins");
}
#else
strSkinLocation = wxString(wxGetCwd() + wxString(wxFileName::GetPathSeparator()) + wxT("skins"));
#endif

View File

@ -0,0 +1,23 @@
## -*- mode: makefile; tab-width: 4 -*-
include $(top_srcdir)/Makefile.incl
datadir = $(prefix)/share/boinc-manager/skins
skins_dirs = \
"Charity Engine" \
"GridRepublic" \
"People for a Smarter Planet" \
"People for a Smarter Planet/graphic" \
"ProgressThruProcessors" \
"World Community Grid" \
"Default"
install-data-hook:
mydir=$(DESTDIR)$(datadir) ;\
for sdir in $(skins_dirs) ; do \
$(INSTALL) -d "$$mydir/$$sdir" ; \
find "$(top_srcdir)/clientgui/skins/$$sdir" -maxdepth 1 -type f -print0 | while read -d $$'\0' file ; do \
$(INSTALL_DATA) "$$file" "$$mydir/$$sdir" ; \
done ; \
done

View File

@ -1372,6 +1372,7 @@ AC_CONFIG_FILES([
apps/Makefile
clientgui/Makefile
clientgui/res/Makefile
clientgui/skins/Makefile
clientscr/Makefile
client/Makefile
client/win/boinc_path_config.py:py/boinc_path_config.py.in