From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje. Note that embryo wont be used, but I'm not sure yet if you can build edje without it. --- libraries/edje/utils/Makefile.am | 7 + libraries/edje/utils/Makefile.in | 497 +++++++++++++++++++++++++++++++ libraries/edje/utils/gimp-edje-export.py | 146 +++++++++ libraries/edje/utils/inkscape2edc | 309 +++++++++++++++++++ 4 files changed, 959 insertions(+) create mode 100644 libraries/edje/utils/Makefile.am create mode 100644 libraries/edje/utils/Makefile.in create mode 100755 libraries/edje/utils/gimp-edje-export.py create mode 100755 libraries/edje/utils/inkscape2edc (limited to 'libraries/edje/utils') diff --git a/libraries/edje/utils/Makefile.am b/libraries/edje/utils/Makefile.am new file mode 100644 index 0000000..81cbad4 --- /dev/null +++ b/libraries/edje/utils/Makefile.am @@ -0,0 +1,7 @@ +MAINTAINERCLEANFILES = Makefile.in + +if HAVE_PYTHON +bin_SCRIPTS = inkscape2edc +endif + +EXTRA_DIST = gimp-edje-export.py inkscape2edc diff --git a/libraries/edje/utils/Makefile.in b/libraries/edje/utils/Makefile.in new file mode 100644 index 0000000..4c05fe5 --- /dev/null +++ b/libraries/edje/utils/Makefile.in @@ -0,0 +1,497 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = utils +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ + $(top_srcdir)/m4/efl_binary.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bindir)" +SCRIPTS = $(bin_SCRIPTS) +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_IMF_CFLAGS = @ECORE_IMF_CFLAGS@ +ECORE_IMF_LIBS = @ECORE_IMF_LIBS@ +EDJE_CC_CFLAGS = @EDJE_CC_CFLAGS@ +EDJE_CC_LIBS = @EDJE_CC_LIBS@ +EDJE_CC_PRG = @EDJE_CC_PRG@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_DECC_CFLAGS = @EDJE_DECC_CFLAGS@ +EDJE_DECC_LIBS = @EDJE_DECC_LIBS@ +EDJE_DECC_PRG = @EDJE_DECC_PRG@ +EDJE_EXTERNAL_INSPECTOR_CFLAGS = @EDJE_EXTERNAL_INSPECTOR_CFLAGS@ +EDJE_EXTERNAL_INSPECTOR_LIBS = @EDJE_EXTERNAL_INSPECTOR_LIBS@ +EDJE_EXTERNAL_INSPECTOR_PRG = @EDJE_EXTERNAL_INSPECTOR_PRG@ +EDJE_INSPECTOR_CFLAGS = @EDJE_INSPECTOR_CFLAGS@ +EDJE_INSPECTOR_LIBS = @EDJE_INSPECTOR_LIBS@ +EDJE_INSPECTOR_PRG = @EDJE_INSPECTOR_PRG@ +EDJE_LIBS = @EDJE_LIBS@ +EDJE_PLAYER_CFLAGS = @EDJE_PLAYER_CFLAGS@ +EDJE_PLAYER_LIBS = @EDJE_PLAYER_LIBS@ +EDJE_PLAYER_PRG = @EDJE_PLAYER_PRG@ +EDJE_RECC_PRG = @EDJE_RECC_PRG@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_EDJE_BUILD = @EFL_EDJE_BUILD@ +EGREP = @EGREP@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FLAC_CFLAGS = @FLAC_CFLAGS@ +FLAC_LIBS = @FLAC_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MINIMAL_CFLAGS = @MINIMAL_CFLAGS@ +MINIMAL_LIBS = @MINIMAL_LIBS@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +REMIX_CFLAGS = @REMIX_CFLAGS@ +REMIX_LIBS = @REMIX_LIBS@ +REMIX_PLUGIN_DIR = @REMIX_PLUGIN_DIR@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +STRIP = @STRIP@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +VORBISENC_CFLAGS = @VORBISENC_CFLAGS@ +VORBISENC_LIBS = @VORBISENC_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +exec_prefix = @exec_prefix@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +lua_libs = @lua_libs@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +release_info = @release_info@ +requirement_edje = @requirement_edje@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +vimdir = @vimdir@ +MAINTAINERCLEANFILES = Makefile.in +@HAVE_PYTHON_TRUE@bin_SCRIPTS = inkscape2edc +EXTRA_DIST = gimp-edje-export.py inkscape2edc +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu utils/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-binSCRIPTS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/edje/utils/gimp-edje-export.py b/libraries/edje/utils/gimp-edje-export.py new file mode 100755 index 0000000..88e1cb6 --- /dev/null +++ b/libraries/edje/utils/gimp-edje-export.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python + +# Gimp-Python - allows the writing of Gimp plugins in Python. +# Copyright (C) 2007 Renato Chencarek +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# INSTALL: +# +# cp gimp-edje-export.py ~/.gimp/plug-ins/ +# chmod +x ~/.gimp/plug-ins/gimp-edje-export.py +# +# Notes: +# - ~/.gimp may change depending on gimp version, ie: ~/.gimp-2.4. +# - Make sure this file is marked as executable! +# +# USAGE: +# Load an image and go to "Python-Fu > Edje Save" that will +# appear on the image's window. +# + +from gimpfu import * +import os.path +import re, gettext + + +def save_layer(layer, filename): + temp_image = pdb.gimp_image_new (layer.width, layer.height, layer.image.base_type) + temp_drawable = pdb.gimp_layer_new_from_drawable (layer, temp_image) + temp_image.add_layer (temp_drawable, -1) + pdb.gimp_file_save(temp_image, temp_drawable, filename, filename) + gimp.delete(temp_image) + return + +def write_image_section(layers, edje_file, filenames): + edje_file.write("images {\n") + for layer in layers: + edje_file.write(' image: "%s" COMP;\n' % filenames[layer.name]) + edje_file.write("\n}\n") + +def write_layer_data(layer, edje_file, filename): + expr = re.compile('\W') + name = expr.sub("_", layer.name) + data = {'name':name, 'width':layer.width, 'height':layer.height, + 'x0':layer.offsets[0], 'y0':layer.offsets[1], + 'x1':layer.offsets[0] + layer.width, 'y1':layer.offsets[1] + layer.height, + 'path':filename, 'visible':int(layer.visible) + } + text = """\ + part { + name: "%(name)s"; + type: IMAGE; + mouse_events: 0; + description { + state: "default" 0.0; + min: %(width)d %(height)d; + max: %(width)d %(height)d; + rel1 { + relative: 0.0 0.0; + offset: %(x0)d %(y0)d; + } + rel2 { + relative: 0.0 0.0; + offset: %(x1)d %(y1)d; + } + image { + normal: "%(path)s"; + } + visible: %(visible)d; + } + }\n""" % data + edje_file.write(text) + +def fix_layers_name(img, save_path): + filenames = {} + for layer in img.layers: + expr = re.compile('\W') + name = expr.sub("_", layer.name) + if not name: + name = "unnamed" + layer.name = name + if name in filenames.keys(): + continue + filename = os.path.join(save_path, name + ".png") + filenames[name] = filename + + return filenames + +def edje_save(img, drawable, save_path, save_layers, edje_filename, invisible): + layers = [] + filenames = {} + for layer in img.layers: + if layer.visible or invisible: + expr = re.compile('\W') + name = expr.sub("_", layer.name) + layer.name = name + if name in filenames.keys(): + continue + filename = os.path.join(save_path, name + ".png") + filenames[name] = filename + layers.append(layer) + + edje_file = open(os.path.join(save_path, edje_filename), 'w') + write_image_section(layers, edje_file, filenames) + + edje_file.write('collections {\n group {\n name: "%s";\n' % img.name) + edje_file.write(' min: %d %d;\n max: %d %d;\n parts {\n' % (img.width, img.height,img.width, img.height)) + layers.reverse() + for l in layers: + if save_layers: + save_layer(l, filenames[l.name]) + write_layer_data(l, edje_file,filenames[l.name]) + edje_file.write(' }\n }\n}\n') + edje_file.close() + +register( + "python_fu_edje_save", + "Export the Image as Edje file", + "Export the Image as Edje file", + "Renato Chencarek", + "Renato Chencarek", + "2007", + "/Python-Fu/_Edje Save", + "RGBA, GRAYA", + [ + (PF_STRING, "save_path", "Path", "/tmp/"), + (PF_TOGGLE, "save_layers", "Save Layers ?", True), + (PF_STRING, "edje_filename", "Filename for edje", "edje.edc"), + (PF_TOGGLE, "export_invisible_layers", "Export invisible layers", False) + ], + [], + edje_save) + +main() diff --git a/libraries/edje/utils/inkscape2edc b/libraries/edje/utils/inkscape2edc new file mode 100755 index 0000000..25a1a8c --- /dev/null +++ b/libraries/edje/utils/inkscape2edc @@ -0,0 +1,309 @@ +#!/usr/bin/env python + +import os +import os.path +import subprocess +import logging as log +import re + + +class Inkscape2Edc(object): + cmd = "inkscape --without-gui" + def __init__(self, infile, outfile, group, + relative1_x=None, relative2_x=None, + relative1_y=None, relative2_y=None, + images_dir="", + show_max=True, show_min=True, show_mouse_events=True): + self.infile = infile + self.outfile = outfile + self.group = group + self.relative1_x = relative1_x + self.relative2_x = relative2_x + self.relative1_y = relative1_y + self.relative2_y = relative2_y + self.images_dir = images_dir + self.show_max = show_max + self.show_min = show_min + self.show_mouse_events = show_mouse_events + + self.images = {} + self.sizes = {} + self.known_ids = tuple() + self.w = 0 + self.h = 0 + + self.out = open(self.outfile, "wb") + self.basedir = os.path.dirname(self.outfile) + + def _exec_cmd(self, *args): + s = " ".join(args) + cmd = "%s --file=%r %s" % (self.cmd, self.infile, s) + try: + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, shell=True) + except Exception, e: + log.error("cmd=%r exception: %s", cmd, e) + return "" + + out, err = p.communicate() + if err: + log.error("cmd=%r error: %s", cmd, err) + + return out + + def load_sizes(self): + sizes = self._exec_cmd("--query-all").split('\n') + + self.sizes = {} + order = [] + for line in sizes: + if not line: + continue + try: + oid, x, y, w, h = line.split(',') + except ValueError: + log.warn("could not parse size line: %r", line) + continue + x = float(x) + y = float(y) + w = float(w) + h = float(h) + self.sizes[oid] = (x, y, w, h) + order.append(oid) + + self.known_ids = tuple(order) + + self.w = float(self._exec_cmd("--query-width")) + self.h = float(self._exec_cmd("--query-height")) + + def output_file_header(self): + self.out.write("""\ +collections { + group { + name: "%(group)s"; +""" % self.__dict__) + + if self.show_min: + self.out.write(" min: %(w)d %(h)d;\n" % self.__dict__) + + if self.show_max: + self.out.write(" max: %(w)d %(h)d;\n" % self.__dict__) + + def output_file_section_parts_begin(self): + self.out.write(" parts {\n") + + def output_file_section_parts_end(self): + self.out.write(" }\n") + + def output_file_section_images_begin(self): + self.out.write(" images {\n") + + def output_file_section_images_end(self): + self.out.write(" }\n") + + def output_file_foot(self): + self.out.write("""\ + } +} +""") + + def output_image(self, oid): + img = os.path.join(self.images_dir, oid) + img += ".png" + + self._exec_cmd("--export-id='%s'" % oid, + "--export-id-only", + "--export-png='%s'" % os.path.join(self.basedir, img)) + + self.out.write(' image: "%s" COMP;\n' % img) + self.images[oid] = img + + def output_part_desc_rel(self, x, y, w, h): + def choose_rel(relative, value, value_max): + if relative is not None: + return relative + elif value <= abs(value_max - value): + return 0.0 + else: + return 1.0 + + x2 = x + w - 1 + y2 = y + h - 1 + + rx1 = choose_rel(self.relative1_x, x, w) + rx2 = choose_rel(self.relative2_x, x2, w) + ry1 = choose_rel(self.relative1_y, y, h) + ry2 = choose_rel(self.relative2_y, y2, h) + + ox1 = x - self.w * rx1 + ox2 = x2 - self.w * rx2 + + oy1 = y - self.h * ry1 + oy2 = y2 - self.h * ry2 + + self.out.write("""\ + rel1 { + relative: %03.1f %03.1f; + offset: %d %d; + } + rel2 { + relative: %03.1f %03.1f; + offset: %d %d; + } +""" % (rx1, ry1, ox1, oy1, rx2, ry2, ox2, oy2)) + + + def output_part(self, oid): + try: + x, y, w, h = self.sizes[oid] + except KeyError: + log.error("no such object id: %s", oid) + return + + info = { + "name": oid, + "x": x, + "y": y, + "w": w, + "h": h, + } + + self.out.write(""" + part { + name: "%(name)s"; + type: IMAGE; +""" % info) + + if self.show_mouse_events: + self.out.write(" mouse_events: 0;\n") + + self.out.write("""\ + description { + state: "default" 0.0; +""") + + if self.show_min: + self.out.write(" min: %(w)d %(h)d;\n" % info) + + if self.show_max: + self.out.write(" max: %(w)d %(h)d;\n" % info) + + self.output_part_desc_rel(x, y, w, h) + self.out.write("""\ + image.normal: "%s"; + } + } +""" % (self.images[oid],)) + + +def foreach_id(inkscape2edc, ids=None, re_exclude=None): + if ids: + for oid in inkscape2edc.known_ids: + if oid in ids: + yield oid + else: + for oid in inkscape2edc.known_ids: + if re_exclude is not None and re_exclude.match(oid): + continue + yield oid + + +if __name__ == "__main__": + import optparse + + usage = "usage: %prog [options] " + parser = optparse.OptionParser(usage=usage) + + parser.add_option("-i", "--id", action="append", default=[], + help=("Object ID to use, it will be the part name. " + "Multiple usage to use more object ids.")) + parser.add_option("-e", "--exclude", action="store", default=None, + help=("Exclude regular expression." + "Matching IDs will be ignored.")) + parser.add_option("-o", "--output", action="store", default=None, + help="Output file to use") + parser.add_option("-g", "--group", action="store", default=None, + help="Group name") + parser.add_option("-d", "--images-dir", action="store", default="", + help="Directory where to output images.") + parser.add_option("--no-min", action="store_true", + help="Do not output min values") + parser.add_option("--no-max", action="store_true", + help="Do not output max values") + parser.add_option("--no-mouse_events", action="store_true", + help="Do not output mouse_events lines") + parser.add_option("--relative1-y", action="store", + choices=("top", "bottom", "auto"), + default="auto", + help=("Choose what to use as base for rel1 y values, " + "top=0.0, bottom=1.0, auto=nearest")) + parser.add_option("--relative2-y", action="store", + choices=("top", "bottom", "auto"), + default="auto", + help=("Choose what to use as base for rel2 y values, " + "top=0.0, bottom=1.0, auto=nearest")) + parser.add_option("--relative1-x", action="store", + choices=("left", "right", "auto"), + default="auto", + help=("Choose what to use as base for rel1 x values, " + "left=0.0, right=1.0, auto=nearest")) + parser.add_option("--relative2-x", action="store", + choices=("left", "right", "auto"), + default="auto", + help=("Choose what to use as base for rel2 x values, " + "left=0.0, right=1.0, auto=nearest")) + + + options, args = parser.parse_args() + + try: + infile = args[0] + except IndexError: + parser.print_help() + raise SystemExit("missing input file name") + + fname = os.path.splitext(infile)[0] + if not options.output: + options.output = fname + ".edc" + + if not options.group: + options.group = fname + + rx_map = {"left": 0.0, "right": 1.0} + options.relative1_x = rx_map.get(options.relative1_x, None) + options.relative2_x = rx_map.get(options.relative2_x, None) + + ry_map = {"top": 0.0, "bottom": 1.0} + options.relative1_y = ry_map.get(options.relative1_y, None) + options.relative2_y = ry_map.get(options.relative2_y, None) + + o = Inkscape2Edc(infile, options.output, options.group, + relative1_x=options.relative1_x, + relative2_x=options.relative2_x, + relative1_y=options.relative1_y, + relative2_y=options.relative2_y, + images_dir=options.images_dir, + show_max=not options.no_max, show_min=not options.no_min, + show_mouse_events=not options.no_mouse_events) + + re_exclude = None + if options.exclude: + re_exclude = re.compile(options.exclude) + + if options.images_dir: + os.makedirs(options.images_dir) + + o.load_sizes() + o.output_file_header() + + o.output_file_section_images_begin() + for oid in foreach_id(o, options.id, re_exclude): + o.output_image(oid) + o.output_file_section_images_end() + + o.output_file_section_parts_begin() + for oid in foreach_id(o, options.id, re_exclude): + o.output_part(oid) + o.output_file_section_parts_end() + + o.output_file_foot() -- cgit v1.1