1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23PRJ=.. 24PRJNAME=packimages 25TARGET=packimages 26 27.INCLUDE: settings.mk 28# point to an existing directory as default that poses no threat 29# to a "find" that looks for "*.png" 30RSCCUSTOMIMG*=$(PRJ) 31.INCLUDE: target.mk 32 33IMAGES := $(COMMONBIN)$/images.zip 34SORTED_LIST=$(RES)$/img$/sorted.lst 35# Custom sets, at 24x24 & 16x16 fall-back to industrial preferentially 36CUSTOM_IMAGE_SETS=hicontrast industrial classic 37CUSTOM_IMAGES+=$(foreach,i,$(CUSTOM_IMAGE_SETS) images_$i) 38CUSTOM_PREFERRED_FALLBACK_1*=-c $(SOLARSRC)$/ooo_custom_images$/industrial 39 40CLASSIC_TARBALL=$(SOLARSRC)$/ooo_custom_images$/classic/classic_images.tar.gz 41 42ALLTAR : $(IMAGES) $(CUSTOM_IMAGES) $(COMMONBIN)$/images_brand.zip 43 44$(IMAGES) $(CUSTOM_IMAGES) : $(SORTED_LIST) 45 46$(SORTED_LIST) : image-sort.lst 47 +-$(MKDIR) $(RES)$/img 48 +$(PERL) $(SOLARENV)$/bin$/image-sort.pl image-sort.lst $(SOLARXMLDIR) $@ 49 50$(RES)$/img$/commandimagelist.ilst .PHONY : $(SORTED_LIST) 51 @@-$(MKDIR) $(RES)$/img 52#+-$(RM) $@ $@.$(INPATH) 53 $(FIND) $(SOLARSRC)$/$(RSCDEFIMG)/res/commandimagelist -name "*.png" | sed "s#$(SOLARSRC)$/$(RSCDEFIMG)/res#%GLOBALRES%#" | $(PERL) $(SOLARENV)$/bin$/sort.pl > $@.$(INPATH) 54 $(PERL) $(SOLARENV)$/bin$/diffmv.pl $@.$(INPATH) $@ 55 56$(COMMONBIN)$/images.zip .PHONY: $(RES)$/img$/commandimagelist.ilst 57 $(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -l $(SOLARCOMMONRESDIR)$/img -s $(SORTED_LIST) -l $(RES)$/img -o $@ 58 59images_% : $(RES)$/img$/commandimagelist.ilst 60 $(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -c $(SOLARSRC)$/ooo_custom_images$/$(@:s/images_//) -c $(MISC)$/$(@:s/images_//) $(CUSTOM_PREFERRED_FALLBACK_1) $(CUSTOM_PREFERRED_FALLBACK_2) -l $(SOLARCOMMONRESDIR)$/img -l $(RES)$/img -s $(SORTED_LIST) -o $(COMMONBIN)$/$@.zip 61 62# make sure to have one to keep packing happy 63$(COMMONBIN)$/images_brand.zip: 64 @$(TOUCH) $@ 65 66# generate the HiContrast icon set 67$(MISC)$/hicontrast.flag .PHONY : 68 $(PERL) $(SOLARENV)$/bin$/hicontrast-to-theme.pl $(SOLARSRC)$/default_images $(MISC)$/hicontrast && $(TOUCH) $@ 69 70# unpack the classic icon set 71$(MISC)$/classic.flag : $(CLASSIC_TARBALL) 72.IF "$(GUI)"=="OS2" 73 cd $(MISC) && tar zxf $(CLASSIC_TARBALL) && $(TOUCH) $(@:f) 74.ELSE 75 cd $(MISC) && gunzip -c $(CLASSIC_TARBALL) | ( tar -xf - ) && $(TOUCH) $(@:f) 76.ENDIF 77.IF "$(GUI)"=="UNX" 78 chmod -R g+w $(MISC)$/classic 79.ENDIF 80 @$(TYPE) $@ || echo "ERROR: unpacking $(CLASSIC_TARBALL) failed" 81 82# dependencies 83images_hicontrast : $(MISC)$/hicontrast.flag $(RES)$/img$/commandimagelist.ilst 84 85images_crystal : $(MISC)$/crystal.flag $(RES)$/img$/commandimagelist.ilst 86 87images_classic : $(MISC)$/classic.flag $(RES)$/img$/commandimagelist.ilst 88 89