From bda833aa3e501b35bd2f8bfab236118b6015a606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 22 Sep 2023 18:38:57 +0200 Subject: [PATCH] Get component controls icons both from its 'control' directory and the optional associated Gambas project of the same name. [CONFIGURATION] * NEW: Get component controls icons both from its 'control' directory and the optional associated Gambas project of the same name. --- component.am | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/component.am b/component.am index e6cf9c5f6..f684aa062 100644 --- a/component.am +++ b/component.am @@ -4,7 +4,7 @@ dist_gblib_DATA = $(COMPONENT).component install-data-hook: @$(INSTALL) -d $(DESTDIR)$(gbdatadir)/info @rm -f $(DESTDIR)$(gblibdir)/$(COMPONENT).gambas; - @if test -d $(COMPONENT) && test -e $(COMPONENT)/.project ; then \ + @if test -d $(COMPONENT) && test -e $(COMPONENT)/.project; then \ echo; \ echo "Compiling '$(COMPONENT)' component..."; \ ( \ @@ -27,16 +27,18 @@ install-data-hook: $(INSTALL) data/* $(DESTDIR)$(gbdatadir)/$(COMPONENT); \ fi @rm -rf $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); - @if test -d control; then \ + @if test -d control -o -d $(COMPONENT)/.hidden/control; then \ echo "Installing '$(COMPONENT)' control icons..."; \ - $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control; \ - $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ - $(INSTALL) control/*.png $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ - fi - @if test -d $(COMPONENT)/.hidden/control; then \ - $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control; \ - $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ - $(INSTALL) $(COMPONENT)/.hidden/control/*.png $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ + if test -d control; then \ + $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control; \ + $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ + $(INSTALL) control/*.png $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ + fi; \ + if test -d $(COMPONENT)/.hidden/control; then \ + $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control; \ + $(INSTALL) -d $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ + $(INSTALL) $(COMPONENT)/.hidden/control/*.png $(DESTDIR)$(gbdatadir)/control/$(COMPONENT); \ + fi \ fi @echo "Creating the information files for '$(COMPONENT)' component..." @if test "$(EXTRACT_HELP)" = "1"; then \