1cdf0e10cSrcweir#************************************************************************* 2cdf0e10cSrcweir# 3cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4cdf0e10cSrcweir# 5cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6cdf0e10cSrcweir# 7cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8cdf0e10cSrcweir# 9cdf0e10cSrcweir# This file is part of OpenOffice.org. 10cdf0e10cSrcweir# 11cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14cdf0e10cSrcweir# 15cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20cdf0e10cSrcweir# 21cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25cdf0e10cSrcweir# 26cdf0e10cSrcweir#************************************************************************* 27cdf0e10cSrcweirPRJ=.. 28cdf0e10cSrcweirPRJNAME=packimages 29cdf0e10cSrcweirTARGET=packimages 30cdf0e10cSrcweir 31cdf0e10cSrcweir.INCLUDE: settings.mk 32cdf0e10cSrcweir# point to an existing directory as default that poses no threat 33cdf0e10cSrcweir# to a "find" that looks for "*.png" 34cdf0e10cSrcweirRSCCUSTOMIMG*=$(PRJ) 35cdf0e10cSrcweir.INCLUDE: target.mk 36cdf0e10cSrcweir 37cdf0e10cSrcweirIMAGES := $(COMMONBIN)$/images.zip 38cdf0e10cSrcweirSORTED_LIST=$(RES)$/img$/sorted.lst 39cdf0e10cSrcweir# Custom sets, at 24x24 & 16x16 fall-back to industrial preferentially 40*31fabce7SPedro GiffuniCUSTOM_IMAGE_SETS=hicontrast industrial tango classic 41cdf0e10cSrcweirCUSTOM_IMAGES+=$(foreach,i,$(CUSTOM_IMAGE_SETS) images_$i) 42cdf0e10cSrcweirCUSTOM_PREFERRED_FALLBACK_1*=-c $(SOLARSRC)$/ooo_custom_images$/tango 43cdf0e10cSrcweirCUSTOM_PREFERRED_FALLBACK_2*=-c $(SOLARSRC)$/ooo_custom_images$/industrial 44cdf0e10cSrcweir 45cdf0e10cSrcweirCLASSIC_TARBALL=$(SOLARSRC)$/ooo_custom_images$/classic/classic_images.tar.gz 46cdf0e10cSrcweir 47cdf0e10cSrcweirALLTAR : $(IMAGES) $(CUSTOM_IMAGES) $(COMMONBIN)$/images_brand.zip 48cdf0e10cSrcweir 49cdf0e10cSrcweir$(IMAGES) $(CUSTOM_IMAGES) : $(SORTED_LIST) 50cdf0e10cSrcweir 51cdf0e10cSrcweir$(SORTED_LIST) : image-sort.lst 52cdf0e10cSrcweir +-$(MKDIR) $(RES)$/img 53cdf0e10cSrcweir +$(PERL) $(SOLARENV)$/bin$/image-sort.pl image-sort.lst $(SOLARXMLDIR) $@ 54cdf0e10cSrcweir 55cdf0e10cSrcweir$(RES)$/img$/commandimagelist.ilst .PHONY : $(SORTED_LIST) 56cdf0e10cSrcweir @@-$(MKDIR) $(RES)$/img 57cdf0e10cSrcweir#+-$(RM) $@ $@.$(INPATH) 58cdf0e10cSrcweir $(FIND) $(SOLARSRC)$/$(RSCDEFIMG)/res/commandimagelist -name "*.png" | sed "s#$(SOLARSRC)$/$(RSCDEFIMG)/res#%GLOBALRES%#" | $(PERL) $(SOLARENV)$/bin$/sort.pl > $@.$(INPATH) 59cdf0e10cSrcweir $(PERL) $(SOLARENV)$/bin$/diffmv.pl $@.$(INPATH) $@ 60cdf0e10cSrcweir 61cdf0e10cSrcweir$(COMMONBIN)$/images.zip .PHONY: $(RES)$/img$/commandimagelist.ilst 62cdf0e10cSrcweir $(PERL) $(SOLARENV)$/bin$/packimages.pl -g $(SOLARSRC)$/$(RSCDEFIMG) -m $(SOLARSRC)$/$(RSCDEFIMG) -c $(RSCCUSTOMIMG) -l $(SOLARCOMMONRESDIR)$/img -s $(SORTED_LIST) -l $(RES)$/img -o $@ 63cdf0e10cSrcweir 64cdf0e10cSrcweirimages_% : $(RES)$/img$/commandimagelist.ilst 65cdf0e10cSrcweir $(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 66cdf0e10cSrcweir 67cdf0e10cSrcweir# make sure to have one to keep packing happy 68cdf0e10cSrcweir$(COMMONBIN)$/images_brand.zip: 69cdf0e10cSrcweir @$(TOUCH) $@ 70cdf0e10cSrcweir 7125d782d7SPedro Giffuni# generate the HiContrast icon set 7225d782d7SPedro Giffuni$(MISC)$/hicontrast.flag .PHONY : 7325d782d7SPedro Giffuni $(PERL) $(SOLARENV)$/bin$/hicontrast-to-theme.pl $(SOLARSRC)$/default_images $(MISC)$/hicontrast && $(TOUCH) $@ 7425d782d7SPedro Giffuni 75cdf0e10cSrcweir# unpack the classic icon set 76cdf0e10cSrcweir$(MISC)$/classic.flag : $(CLASSIC_TARBALL) 77cdf0e10cSrcweir cd $(MISC) && gunzip -c $(CLASSIC_TARBALL) | ( tar -xf - ) && $(TOUCH) $(@:f) 78cdf0e10cSrcweir.IF "$(GUI)"=="UNX" 79cdf0e10cSrcweir chmod -R g+w $(MISC)$/classic 80cdf0e10cSrcweir.ENDIF 81cdf0e10cSrcweir @$(TYPE) $@ || echo "ERROR: unpacking $(CLASSIC_TARBALL) failed" 82cdf0e10cSrcweir 83cdf0e10cSrcweir# dependencies 84cdf0e10cSrcweirimages_hicontrast : $(MISC)$/hicontrast.flag $(RES)$/img$/commandimagelist.ilst 85cdf0e10cSrcweir 86cdf0e10cSrcweirimages_crystal : $(MISC)$/crystal.flag $(RES)$/img$/commandimagelist.ilst 87cdf0e10cSrcweir 88cdf0e10cSrcweirimages_classic : $(MISC)$/classic.flag $(RES)$/img$/commandimagelist.ilst 89cdf0e10cSrcweir 90