diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/edje/utils | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | libraries/edje/utils/Makefile.am | 7 | ||||
-rw-r--r-- | libraries/edje/utils/Makefile.in | 497 | ||||
-rwxr-xr-x | libraries/edje/utils/gimp-edje-export.py | 146 | ||||
-rwxr-xr-x | libraries/edje/utils/inkscape2edc | 309 |
4 files changed, 959 insertions, 0 deletions
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 @@ | |||
1 | MAINTAINERCLEANFILES = Makefile.in | ||
2 | |||
3 | if HAVE_PYTHON | ||
4 | bin_SCRIPTS = inkscape2edc | ||
5 | endif | ||
6 | |||
7 | 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 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | VPATH = @srcdir@ | ||
19 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | pkglibdir = $(libdir)/@PACKAGE@ | ||
22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
24 | install_sh_DATA = $(install_sh) -c -m 644 | ||
25 | install_sh_PROGRAM = $(install_sh) -c | ||
26 | install_sh_SCRIPT = $(install_sh) -c | ||
27 | INSTALL_HEADER = $(INSTALL_DATA) | ||
28 | transform = $(program_transform_name) | ||
29 | NORMAL_INSTALL = : | ||
30 | PRE_INSTALL = : | ||
31 | POST_INSTALL = : | ||
32 | NORMAL_UNINSTALL = : | ||
33 | PRE_UNINSTALL = : | ||
34 | POST_UNINSTALL = : | ||
35 | build_triplet = @build@ | ||
36 | host_triplet = @host@ | ||
37 | subdir = utils | ||
38 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
40 | am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | ||
41 | $(top_srcdir)/m4/efl_binary.m4 \ | ||
42 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
43 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
44 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
45 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | ||
46 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | ||
47 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac | ||
48 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
49 | $(ACLOCAL_M4) | ||
50 | mkinstalldirs = $(install_sh) -d | ||
51 | CONFIG_HEADER = $(top_builddir)/config.h | ||
52 | CONFIG_CLEAN_FILES = | ||
53 | CONFIG_CLEAN_VPATH_FILES = | ||
54 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
55 | am__vpath_adj = case $$p in \ | ||
56 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
57 | *) f=$$p;; \ | ||
58 | esac; | ||
59 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
60 | am__install_max = 40 | ||
61 | am__nobase_strip_setup = \ | ||
62 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
63 | am__nobase_strip = \ | ||
64 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
65 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
66 | for p in $$list; do echo "$$p $$p"; done | \ | ||
67 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
68 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
69 | if (++n[$$2] == $(am__install_max)) \ | ||
70 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
71 | END { for (dir in files) print dir, files[dir] }' | ||
72 | am__base_list = \ | ||
73 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
74 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
75 | am__installdirs = "$(DESTDIR)$(bindir)" | ||
76 | SCRIPTS = $(bin_SCRIPTS) | ||
77 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
78 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
79 | am__v_GEN_0 = @echo " GEN " $@; | ||
80 | AM_V_at = $(am__v_at_$(V)) | ||
81 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
82 | am__v_at_0 = @ | ||
83 | SOURCES = | ||
84 | DIST_SOURCES = | ||
85 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
86 | ACLOCAL = @ACLOCAL@ | ||
87 | ALLOCA = @ALLOCA@ | ||
88 | ALSA_CFLAGS = @ALSA_CFLAGS@ | ||
89 | ALSA_LIBS = @ALSA_LIBS@ | ||
90 | AMTAR = @AMTAR@ | ||
91 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
92 | AR = @AR@ | ||
93 | AS = @AS@ | ||
94 | AUTOCONF = @AUTOCONF@ | ||
95 | AUTOHEADER = @AUTOHEADER@ | ||
96 | AUTOMAKE = @AUTOMAKE@ | ||
97 | AWK = @AWK@ | ||
98 | CC = @CC@ | ||
99 | CCDEPMODE = @CCDEPMODE@ | ||
100 | CFLAGS = @CFLAGS@ | ||
101 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
102 | CHECK_LIBS = @CHECK_LIBS@ | ||
103 | CPP = @CPP@ | ||
104 | CPPFLAGS = @CPPFLAGS@ | ||
105 | CYGPATH_W = @CYGPATH_W@ | ||
106 | DEFS = @DEFS@ | ||
107 | DEPDIR = @DEPDIR@ | ||
108 | DLLTOOL = @DLLTOOL@ | ||
109 | DSYMUTIL = @DSYMUTIL@ | ||
110 | DUMPBIN = @DUMPBIN@ | ||
111 | ECHO_C = @ECHO_C@ | ||
112 | ECHO_N = @ECHO_N@ | ||
113 | ECHO_T = @ECHO_T@ | ||
114 | ECORE_IMF_CFLAGS = @ECORE_IMF_CFLAGS@ | ||
115 | ECORE_IMF_LIBS = @ECORE_IMF_LIBS@ | ||
116 | EDJE_CC_CFLAGS = @EDJE_CC_CFLAGS@ | ||
117 | EDJE_CC_LIBS = @EDJE_CC_LIBS@ | ||
118 | EDJE_CC_PRG = @EDJE_CC_PRG@ | ||
119 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
120 | EDJE_DECC_CFLAGS = @EDJE_DECC_CFLAGS@ | ||
121 | EDJE_DECC_LIBS = @EDJE_DECC_LIBS@ | ||
122 | EDJE_DECC_PRG = @EDJE_DECC_PRG@ | ||
123 | EDJE_EXTERNAL_INSPECTOR_CFLAGS = @EDJE_EXTERNAL_INSPECTOR_CFLAGS@ | ||
124 | EDJE_EXTERNAL_INSPECTOR_LIBS = @EDJE_EXTERNAL_INSPECTOR_LIBS@ | ||
125 | EDJE_EXTERNAL_INSPECTOR_PRG = @EDJE_EXTERNAL_INSPECTOR_PRG@ | ||
126 | EDJE_INSPECTOR_CFLAGS = @EDJE_INSPECTOR_CFLAGS@ | ||
127 | EDJE_INSPECTOR_LIBS = @EDJE_INSPECTOR_LIBS@ | ||
128 | EDJE_INSPECTOR_PRG = @EDJE_INSPECTOR_PRG@ | ||
129 | EDJE_LIBS = @EDJE_LIBS@ | ||
130 | EDJE_PLAYER_CFLAGS = @EDJE_PLAYER_CFLAGS@ | ||
131 | EDJE_PLAYER_LIBS = @EDJE_PLAYER_LIBS@ | ||
132 | EDJE_PLAYER_PRG = @EDJE_PLAYER_PRG@ | ||
133 | EDJE_RECC_PRG = @EDJE_RECC_PRG@ | ||
134 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
135 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
136 | EFL_EDJE_BUILD = @EFL_EDJE_BUILD@ | ||
137 | EGREP = @EGREP@ | ||
138 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
139 | EVIL_LIBS = @EVIL_LIBS@ | ||
140 | EXEEXT = @EXEEXT@ | ||
141 | FGREP = @FGREP@ | ||
142 | FLAC_CFLAGS = @FLAC_CFLAGS@ | ||
143 | FLAC_LIBS = @FLAC_LIBS@ | ||
144 | GREP = @GREP@ | ||
145 | INSTALL = @INSTALL@ | ||
146 | INSTALL_DATA = @INSTALL_DATA@ | ||
147 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
148 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
149 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
150 | LD = @LD@ | ||
151 | LDFLAGS = @LDFLAGS@ | ||
152 | LIBOBJS = @LIBOBJS@ | ||
153 | LIBS = @LIBS@ | ||
154 | LIBTOOL = @LIBTOOL@ | ||
155 | LIPO = @LIPO@ | ||
156 | LN_S = @LN_S@ | ||
157 | LTLIBOBJS = @LTLIBOBJS@ | ||
158 | LUA_CFLAGS = @LUA_CFLAGS@ | ||
159 | LUA_LIBS = @LUA_LIBS@ | ||
160 | MAKEINFO = @MAKEINFO@ | ||
161 | MINIMAL_CFLAGS = @MINIMAL_CFLAGS@ | ||
162 | MINIMAL_LIBS = @MINIMAL_LIBS@ | ||
163 | MKDIR_P = @MKDIR_P@ | ||
164 | MODULE_ARCH = @MODULE_ARCH@ | ||
165 | NM = @NM@ | ||
166 | NMEDIT = @NMEDIT@ | ||
167 | OBJDUMP = @OBJDUMP@ | ||
168 | OBJEXT = @OBJEXT@ | ||
169 | OTOOL = @OTOOL@ | ||
170 | OTOOL64 = @OTOOL64@ | ||
171 | PACKAGE = @PACKAGE@ | ||
172 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
173 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
174 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
175 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
176 | PACKAGE_URL = @PACKAGE_URL@ | ||
177 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
178 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
179 | PKG_CONFIG = @PKG_CONFIG@ | ||
180 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
181 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
182 | PYTHON = @PYTHON@ | ||
183 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | ||
184 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | ||
185 | PYTHON_PREFIX = @PYTHON_PREFIX@ | ||
186 | PYTHON_VERSION = @PYTHON_VERSION@ | ||
187 | RANLIB = @RANLIB@ | ||
188 | REMIX_CFLAGS = @REMIX_CFLAGS@ | ||
189 | REMIX_LIBS = @REMIX_LIBS@ | ||
190 | REMIX_PLUGIN_DIR = @REMIX_PLUGIN_DIR@ | ||
191 | SED = @SED@ | ||
192 | SET_MAKE = @SET_MAKE@ | ||
193 | SHELL = @SHELL@ | ||
194 | SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ | ||
195 | SNDFILE_LIBS = @SNDFILE_LIBS@ | ||
196 | STRIP = @STRIP@ | ||
197 | VERSION = @VERSION@ | ||
198 | VMAJ = @VMAJ@ | ||
199 | VORBISENC_CFLAGS = @VORBISENC_CFLAGS@ | ||
200 | VORBISENC_LIBS = @VORBISENC_LIBS@ | ||
201 | abs_builddir = @abs_builddir@ | ||
202 | abs_srcdir = @abs_srcdir@ | ||
203 | abs_top_builddir = @abs_top_builddir@ | ||
204 | abs_top_srcdir = @abs_top_srcdir@ | ||
205 | ac_ct_CC = @ac_ct_CC@ | ||
206 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
207 | am__include = @am__include@ | ||
208 | am__leading_dot = @am__leading_dot@ | ||
209 | am__quote = @am__quote@ | ||
210 | am__tar = @am__tar@ | ||
211 | am__untar = @am__untar@ | ||
212 | bindir = @bindir@ | ||
213 | build = @build@ | ||
214 | build_alias = @build_alias@ | ||
215 | build_cpu = @build_cpu@ | ||
216 | build_os = @build_os@ | ||
217 | build_vendor = @build_vendor@ | ||
218 | builddir = @builddir@ | ||
219 | datadir = @datadir@ | ||
220 | datarootdir = @datarootdir@ | ||
221 | docdir = @docdir@ | ||
222 | dvidir = @dvidir@ | ||
223 | edje_cc = @edje_cc@ | ||
224 | efl_doxygen = @efl_doxygen@ | ||
225 | efl_have_doxygen = @efl_have_doxygen@ | ||
226 | exec_prefix = @exec_prefix@ | ||
227 | have_lcov = @have_lcov@ | ||
228 | host = @host@ | ||
229 | host_alias = @host_alias@ | ||
230 | host_cpu = @host_cpu@ | ||
231 | host_os = @host_os@ | ||
232 | host_vendor = @host_vendor@ | ||
233 | htmldir = @htmldir@ | ||
234 | includedir = @includedir@ | ||
235 | infodir = @infodir@ | ||
236 | install_sh = @install_sh@ | ||
237 | libdir = @libdir@ | ||
238 | libexecdir = @libexecdir@ | ||
239 | localedir = @localedir@ | ||
240 | localstatedir = @localstatedir@ | ||
241 | lt_ECHO = @lt_ECHO@ | ||
242 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
243 | lua_libs = @lua_libs@ | ||
244 | mandir = @mandir@ | ||
245 | mkdir_p = @mkdir_p@ | ||
246 | oldincludedir = @oldincludedir@ | ||
247 | pdfdir = @pdfdir@ | ||
248 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
249 | pkgpyexecdir = @pkgpyexecdir@ | ||
250 | pkgpythondir = @pkgpythondir@ | ||
251 | prefix = @prefix@ | ||
252 | program_transform_name = @program_transform_name@ | ||
253 | psdir = @psdir@ | ||
254 | pyexecdir = @pyexecdir@ | ||
255 | pythondir = @pythondir@ | ||
256 | release_info = @release_info@ | ||
257 | requirement_edje = @requirement_edje@ | ||
258 | sbindir = @sbindir@ | ||
259 | sharedstatedir = @sharedstatedir@ | ||
260 | srcdir = @srcdir@ | ||
261 | sysconfdir = @sysconfdir@ | ||
262 | target_alias = @target_alias@ | ||
263 | top_build_prefix = @top_build_prefix@ | ||
264 | top_builddir = @top_builddir@ | ||
265 | top_srcdir = @top_srcdir@ | ||
266 | version_info = @version_info@ | ||
267 | vimdir = @vimdir@ | ||
268 | MAINTAINERCLEANFILES = Makefile.in | ||
269 | @HAVE_PYTHON_TRUE@bin_SCRIPTS = inkscape2edc | ||
270 | EXTRA_DIST = gimp-edje-export.py inkscape2edc | ||
271 | all: all-am | ||
272 | |||
273 | .SUFFIXES: | ||
274 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
275 | @for dep in $?; do \ | ||
276 | case '$(am__configure_deps)' in \ | ||
277 | *$$dep*) \ | ||
278 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
279 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
280 | exit 1;; \ | ||
281 | esac; \ | ||
282 | done; \ | ||
283 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \ | ||
284 | $(am__cd) $(top_srcdir) && \ | ||
285 | $(AUTOMAKE) --gnu utils/Makefile | ||
286 | .PRECIOUS: Makefile | ||
287 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
288 | @case '$?' in \ | ||
289 | *config.status*) \ | ||
290 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
291 | *) \ | ||
292 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
293 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
294 | esac; | ||
295 | |||
296 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
297 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
298 | |||
299 | $(top_srcdir)/configure: $(am__configure_deps) | ||
300 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
301 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
302 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
303 | $(am__aclocal_m4_deps): | ||
304 | install-binSCRIPTS: $(bin_SCRIPTS) | ||
305 | @$(NORMAL_INSTALL) | ||
306 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" | ||
307 | @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ | ||
308 | for p in $$list; do \ | ||
309 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
310 | if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ | ||
311 | done | \ | ||
312 | sed -e 'p;s,.*/,,;n' \ | ||
313 | -e 'h;s|.*|.|' \ | ||
314 | -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ | ||
315 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ | ||
316 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | ||
317 | if ($$2 == $$4) { files[d] = files[d] " " $$1; \ | ||
318 | if (++n[d] == $(am__install_max)) { \ | ||
319 | print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ | ||
320 | else { print "f", d "/" $$4, $$1 } } \ | ||
321 | END { for (d in files) print "f", d, files[d] }' | \ | ||
322 | while read type dir files; do \ | ||
323 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | ||
324 | test -z "$$files" || { \ | ||
325 | echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ | ||
326 | $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ | ||
327 | } \ | ||
328 | ; done | ||
329 | |||
330 | uninstall-binSCRIPTS: | ||
331 | @$(NORMAL_UNINSTALL) | ||
332 | @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ | ||
333 | files=`for p in $$list; do echo "$$p"; done | \ | ||
334 | sed -e 's,.*/,,;$(transform)'`; \ | ||
335 | test -n "$$list" || exit 0; \ | ||
336 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ | ||
337 | cd "$(DESTDIR)$(bindir)" && rm -f $$files | ||
338 | |||
339 | mostlyclean-libtool: | ||
340 | -rm -f *.lo | ||
341 | |||
342 | clean-libtool: | ||
343 | -rm -rf .libs _libs | ||
344 | tags: TAGS | ||
345 | TAGS: | ||
346 | |||
347 | ctags: CTAGS | ||
348 | CTAGS: | ||
349 | |||
350 | |||
351 | distdir: $(DISTFILES) | ||
352 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
353 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
354 | list='$(DISTFILES)'; \ | ||
355 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
356 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
357 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
358 | case $$dist_files in \ | ||
359 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
360 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
361 | sort -u` ;; \ | ||
362 | esac; \ | ||
363 | for file in $$dist_files; do \ | ||
364 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
365 | if test -d $$d/$$file; then \ | ||
366 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
367 | if test -d "$(distdir)/$$file"; then \ | ||
368 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
369 | fi; \ | ||
370 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
371 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
372 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
373 | fi; \ | ||
374 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
375 | else \ | ||
376 | test -f "$(distdir)/$$file" \ | ||
377 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
378 | || exit 1; \ | ||
379 | fi; \ | ||
380 | done | ||
381 | check-am: all-am | ||
382 | check: check-am | ||
383 | all-am: Makefile $(SCRIPTS) | ||
384 | installdirs: | ||
385 | for dir in "$(DESTDIR)$(bindir)"; do \ | ||
386 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
387 | done | ||
388 | install: install-am | ||
389 | install-exec: install-exec-am | ||
390 | install-data: install-data-am | ||
391 | uninstall: uninstall-am | ||
392 | |||
393 | install-am: all-am | ||
394 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
395 | |||
396 | installcheck: installcheck-am | ||
397 | install-strip: | ||
398 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
399 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
400 | `test -z '$(STRIP)' || \ | ||
401 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
402 | mostlyclean-generic: | ||
403 | |||
404 | clean-generic: | ||
405 | |||
406 | distclean-generic: | ||
407 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
408 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
409 | |||
410 | maintainer-clean-generic: | ||
411 | @echo "This command is intended for maintainers to use" | ||
412 | @echo "it deletes files that may require special tools to rebuild." | ||
413 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
414 | clean: clean-am | ||
415 | |||
416 | clean-am: clean-generic clean-libtool mostlyclean-am | ||
417 | |||
418 | distclean: distclean-am | ||
419 | -rm -f Makefile | ||
420 | distclean-am: clean-am distclean-generic | ||
421 | |||
422 | dvi: dvi-am | ||
423 | |||
424 | dvi-am: | ||
425 | |||
426 | html: html-am | ||
427 | |||
428 | html-am: | ||
429 | |||
430 | info: info-am | ||
431 | |||
432 | info-am: | ||
433 | |||
434 | install-data-am: | ||
435 | |||
436 | install-dvi: install-dvi-am | ||
437 | |||
438 | install-dvi-am: | ||
439 | |||
440 | install-exec-am: install-binSCRIPTS | ||
441 | |||
442 | install-html: install-html-am | ||
443 | |||
444 | install-html-am: | ||
445 | |||
446 | install-info: install-info-am | ||
447 | |||
448 | install-info-am: | ||
449 | |||
450 | install-man: | ||
451 | |||
452 | install-pdf: install-pdf-am | ||
453 | |||
454 | install-pdf-am: | ||
455 | |||
456 | install-ps: install-ps-am | ||
457 | |||
458 | install-ps-am: | ||
459 | |||
460 | installcheck-am: | ||
461 | |||
462 | maintainer-clean: maintainer-clean-am | ||
463 | -rm -f Makefile | ||
464 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
465 | |||
466 | mostlyclean: mostlyclean-am | ||
467 | |||
468 | mostlyclean-am: mostlyclean-generic mostlyclean-libtool | ||
469 | |||
470 | pdf: pdf-am | ||
471 | |||
472 | pdf-am: | ||
473 | |||
474 | ps: ps-am | ||
475 | |||
476 | ps-am: | ||
477 | |||
478 | uninstall-am: uninstall-binSCRIPTS | ||
479 | |||
480 | .MAKE: install-am install-strip | ||
481 | |||
482 | .PHONY: all all-am check check-am clean clean-generic clean-libtool \ | ||
483 | distclean distclean-generic distclean-libtool distdir dvi \ | ||
484 | dvi-am html html-am info info-am install install-am \ | ||
485 | install-binSCRIPTS install-data install-data-am install-dvi \ | ||
486 | install-dvi-am install-exec install-exec-am install-html \ | ||
487 | install-html-am install-info install-info-am install-man \ | ||
488 | install-pdf install-pdf-am install-ps install-ps-am \ | ||
489 | install-strip installcheck installcheck-am installdirs \ | ||
490 | maintainer-clean maintainer-clean-generic mostlyclean \ | ||
491 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
492 | uninstall uninstall-am uninstall-binSCRIPTS | ||
493 | |||
494 | |||
495 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
496 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
497 | .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 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Gimp-Python - allows the writing of Gimp plugins in Python. | ||
4 | # Copyright (C) 2007 Renato Chencarek <renato.chencarek@openbossa.org> | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | # | ||
20 | # INSTALL: | ||
21 | # | ||
22 | # cp gimp-edje-export.py ~/.gimp/plug-ins/ | ||
23 | # chmod +x ~/.gimp/plug-ins/gimp-edje-export.py | ||
24 | # | ||
25 | # Notes: | ||
26 | # - ~/.gimp may change depending on gimp version, ie: ~/.gimp-2.4. | ||
27 | # - Make sure this file is marked as executable! | ||
28 | # | ||
29 | # USAGE: | ||
30 | # Load an image and go to "Python-Fu > Edje Save" that will | ||
31 | # appear on the image's window. | ||
32 | # | ||
33 | |||
34 | from gimpfu import * | ||
35 | import os.path | ||
36 | import re, gettext | ||
37 | |||
38 | |||
39 | def save_layer(layer, filename): | ||
40 | temp_image = pdb.gimp_image_new (layer.width, layer.height, layer.image.base_type) | ||
41 | temp_drawable = pdb.gimp_layer_new_from_drawable (layer, temp_image) | ||
42 | temp_image.add_layer (temp_drawable, -1) | ||
43 | pdb.gimp_file_save(temp_image, temp_drawable, filename, filename) | ||
44 | gimp.delete(temp_image) | ||
45 | return | ||
46 | |||
47 | def write_image_section(layers, edje_file, filenames): | ||
48 | edje_file.write("images {\n") | ||
49 | for layer in layers: | ||
50 | edje_file.write(' image: "%s" COMP;\n' % filenames[layer.name]) | ||
51 | edje_file.write("\n}\n") | ||
52 | |||
53 | def write_layer_data(layer, edje_file, filename): | ||
54 | expr = re.compile('\W') | ||
55 | name = expr.sub("_", layer.name) | ||
56 | data = {'name':name, 'width':layer.width, 'height':layer.height, | ||
57 | 'x0':layer.offsets[0], 'y0':layer.offsets[1], | ||
58 | 'x1':layer.offsets[0] + layer.width, 'y1':layer.offsets[1] + layer.height, | ||
59 | 'path':filename, 'visible':int(layer.visible) | ||
60 | } | ||
61 | text = """\ | ||
62 | part { | ||
63 | name: "%(name)s"; | ||
64 | type: IMAGE; | ||
65 | mouse_events: 0; | ||
66 | description { | ||
67 | state: "default" 0.0; | ||
68 | min: %(width)d %(height)d; | ||
69 | max: %(width)d %(height)d; | ||
70 | rel1 { | ||
71 | relative: 0.0 0.0; | ||
72 | offset: %(x0)d %(y0)d; | ||
73 | } | ||
74 | rel2 { | ||
75 | relative: 0.0 0.0; | ||
76 | offset: %(x1)d %(y1)d; | ||
77 | } | ||
78 | image { | ||
79 | normal: "%(path)s"; | ||
80 | } | ||
81 | visible: %(visible)d; | ||
82 | } | ||
83 | }\n""" % data | ||
84 | edje_file.write(text) | ||
85 | |||
86 | def fix_layers_name(img, save_path): | ||
87 | filenames = {} | ||
88 | for layer in img.layers: | ||
89 | expr = re.compile('\W') | ||
90 | name = expr.sub("_", layer.name) | ||
91 | if not name: | ||
92 | name = "unnamed" | ||
93 | layer.name = name | ||
94 | if name in filenames.keys(): | ||
95 | continue | ||
96 | filename = os.path.join(save_path, name + ".png") | ||
97 | filenames[name] = filename | ||
98 | |||
99 | return filenames | ||
100 | |||
101 | def edje_save(img, drawable, save_path, save_layers, edje_filename, invisible): | ||
102 | layers = [] | ||
103 | filenames = {} | ||
104 | for layer in img.layers: | ||
105 | if layer.visible or invisible: | ||
106 | expr = re.compile('\W') | ||
107 | name = expr.sub("_", layer.name) | ||
108 | layer.name = name | ||
109 | if name in filenames.keys(): | ||
110 | continue | ||
111 | filename = os.path.join(save_path, name + ".png") | ||
112 | filenames[name] = filename | ||
113 | layers.append(layer) | ||
114 | |||
115 | edje_file = open(os.path.join(save_path, edje_filename), 'w') | ||
116 | write_image_section(layers, edje_file, filenames) | ||
117 | |||
118 | edje_file.write('collections {\n group {\n name: "%s";\n' % img.name) | ||
119 | edje_file.write(' min: %d %d;\n max: %d %d;\n parts {\n' % (img.width, img.height,img.width, img.height)) | ||
120 | layers.reverse() | ||
121 | for l in layers: | ||
122 | if save_layers: | ||
123 | save_layer(l, filenames[l.name]) | ||
124 | write_layer_data(l, edje_file,filenames[l.name]) | ||
125 | edje_file.write(' }\n }\n}\n') | ||
126 | edje_file.close() | ||
127 | |||
128 | register( | ||
129 | "python_fu_edje_save", | ||
130 | "Export the Image as Edje file", | ||
131 | "Export the Image as Edje file", | ||
132 | "Renato Chencarek", | ||
133 | "Renato Chencarek", | ||
134 | "2007", | ||
135 | "<Image>/Python-Fu/_Edje Save", | ||
136 | "RGBA, GRAYA", | ||
137 | [ | ||
138 | (PF_STRING, "save_path", "Path", "/tmp/"), | ||
139 | (PF_TOGGLE, "save_layers", "Save Layers ?", True), | ||
140 | (PF_STRING, "edje_filename", "Filename for edje", "edje.edc"), | ||
141 | (PF_TOGGLE, "export_invisible_layers", "Export invisible layers", False) | ||
142 | ], | ||
143 | [], | ||
144 | edje_save) | ||
145 | |||
146 | 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 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | import os | ||
4 | import os.path | ||
5 | import subprocess | ||
6 | import logging as log | ||
7 | import re | ||
8 | |||
9 | |||
10 | class Inkscape2Edc(object): | ||
11 | cmd = "inkscape --without-gui" | ||
12 | def __init__(self, infile, outfile, group, | ||
13 | relative1_x=None, relative2_x=None, | ||
14 | relative1_y=None, relative2_y=None, | ||
15 | images_dir="", | ||
16 | show_max=True, show_min=True, show_mouse_events=True): | ||
17 | self.infile = infile | ||
18 | self.outfile = outfile | ||
19 | self.group = group | ||
20 | self.relative1_x = relative1_x | ||
21 | self.relative2_x = relative2_x | ||
22 | self.relative1_y = relative1_y | ||
23 | self.relative2_y = relative2_y | ||
24 | self.images_dir = images_dir | ||
25 | self.show_max = show_max | ||
26 | self.show_min = show_min | ||
27 | self.show_mouse_events = show_mouse_events | ||
28 | |||
29 | self.images = {} | ||
30 | self.sizes = {} | ||
31 | self.known_ids = tuple() | ||
32 | self.w = 0 | ||
33 | self.h = 0 | ||
34 | |||
35 | self.out = open(self.outfile, "wb") | ||
36 | self.basedir = os.path.dirname(self.outfile) | ||
37 | |||
38 | def _exec_cmd(self, *args): | ||
39 | s = " ".join(args) | ||
40 | cmd = "%s --file=%r %s" % (self.cmd, self.infile, s) | ||
41 | try: | ||
42 | p = subprocess.Popen(cmd, stdout=subprocess.PIPE, | ||
43 | stderr=subprocess.PIPE, shell=True) | ||
44 | except Exception, e: | ||
45 | log.error("cmd=%r exception: %s", cmd, e) | ||
46 | return "" | ||
47 | |||
48 | out, err = p.communicate() | ||
49 | if err: | ||
50 | log.error("cmd=%r error: %s", cmd, err) | ||
51 | |||
52 | return out | ||
53 | |||
54 | def load_sizes(self): | ||
55 | sizes = self._exec_cmd("--query-all").split('\n') | ||
56 | |||
57 | self.sizes = {} | ||
58 | order = [] | ||
59 | for line in sizes: | ||
60 | if not line: | ||
61 | continue | ||
62 | try: | ||
63 | oid, x, y, w, h = line.split(',') | ||
64 | except ValueError: | ||
65 | log.warn("could not parse size line: %r", line) | ||
66 | continue | ||
67 | x = float(x) | ||
68 | y = float(y) | ||
69 | w = float(w) | ||
70 | h = float(h) | ||
71 | self.sizes[oid] = (x, y, w, h) | ||
72 | order.append(oid) | ||
73 | |||
74 | self.known_ids = tuple(order) | ||
75 | |||
76 | self.w = float(self._exec_cmd("--query-width")) | ||
77 | self.h = float(self._exec_cmd("--query-height")) | ||
78 | |||
79 | def output_file_header(self): | ||
80 | self.out.write("""\ | ||
81 | collections { | ||
82 | group { | ||
83 | name: "%(group)s"; | ||
84 | """ % self.__dict__) | ||
85 | |||
86 | if self.show_min: | ||
87 | self.out.write(" min: %(w)d %(h)d;\n" % self.__dict__) | ||
88 | |||
89 | if self.show_max: | ||
90 | self.out.write(" max: %(w)d %(h)d;\n" % self.__dict__) | ||
91 | |||
92 | def output_file_section_parts_begin(self): | ||
93 | self.out.write(" parts {\n") | ||
94 | |||
95 | def output_file_section_parts_end(self): | ||
96 | self.out.write(" }\n") | ||
97 | |||
98 | def output_file_section_images_begin(self): | ||
99 | self.out.write(" images {\n") | ||
100 | |||
101 | def output_file_section_images_end(self): | ||
102 | self.out.write(" }\n") | ||
103 | |||
104 | def output_file_foot(self): | ||
105 | self.out.write("""\ | ||
106 | } | ||
107 | } | ||
108 | """) | ||
109 | |||
110 | def output_image(self, oid): | ||
111 | img = os.path.join(self.images_dir, oid) | ||
112 | img += ".png" | ||
113 | |||
114 | self._exec_cmd("--export-id='%s'" % oid, | ||
115 | "--export-id-only", | ||
116 | "--export-png='%s'" % os.path.join(self.basedir, img)) | ||
117 | |||
118 | self.out.write(' image: "%s" COMP;\n' % img) | ||
119 | self.images[oid] = img | ||
120 | |||
121 | def output_part_desc_rel(self, x, y, w, h): | ||
122 | def choose_rel(relative, value, value_max): | ||
123 | if relative is not None: | ||
124 | return relative | ||
125 | elif value <= abs(value_max - value): | ||
126 | return 0.0 | ||
127 | else: | ||
128 | return 1.0 | ||
129 | |||
130 | x2 = x + w - 1 | ||
131 | y2 = y + h - 1 | ||
132 | |||
133 | rx1 = choose_rel(self.relative1_x, x, w) | ||
134 | rx2 = choose_rel(self.relative2_x, x2, w) | ||
135 | ry1 = choose_rel(self.relative1_y, y, h) | ||
136 | ry2 = choose_rel(self.relative2_y, y2, h) | ||
137 | |||
138 | ox1 = x - self.w * rx1 | ||
139 | ox2 = x2 - self.w * rx2 | ||
140 | |||
141 | oy1 = y - self.h * ry1 | ||
142 | oy2 = y2 - self.h * ry2 | ||
143 | |||
144 | self.out.write("""\ | ||
145 | rel1 { | ||
146 | relative: %03.1f %03.1f; | ||
147 | offset: %d %d; | ||
148 | } | ||
149 | rel2 { | ||
150 | relative: %03.1f %03.1f; | ||
151 | offset: %d %d; | ||
152 | } | ||
153 | """ % (rx1, ry1, ox1, oy1, rx2, ry2, ox2, oy2)) | ||
154 | |||
155 | |||
156 | def output_part(self, oid): | ||
157 | try: | ||
158 | x, y, w, h = self.sizes[oid] | ||
159 | except KeyError: | ||
160 | log.error("no such object id: %s", oid) | ||
161 | return | ||
162 | |||
163 | info = { | ||
164 | "name": oid, | ||
165 | "x": x, | ||
166 | "y": y, | ||
167 | "w": w, | ||
168 | "h": h, | ||
169 | } | ||
170 | |||
171 | self.out.write(""" | ||
172 | part { | ||
173 | name: "%(name)s"; | ||
174 | type: IMAGE; | ||
175 | """ % info) | ||
176 | |||
177 | if self.show_mouse_events: | ||
178 | self.out.write(" mouse_events: 0;\n") | ||
179 | |||
180 | self.out.write("""\ | ||
181 | description { | ||
182 | state: "default" 0.0; | ||
183 | """) | ||
184 | |||
185 | if self.show_min: | ||
186 | self.out.write(" min: %(w)d %(h)d;\n" % info) | ||
187 | |||
188 | if self.show_max: | ||
189 | self.out.write(" max: %(w)d %(h)d;\n" % info) | ||
190 | |||
191 | self.output_part_desc_rel(x, y, w, h) | ||
192 | self.out.write("""\ | ||
193 | image.normal: "%s"; | ||
194 | } | ||
195 | } | ||
196 | """ % (self.images[oid],)) | ||
197 | |||
198 | |||
199 | def foreach_id(inkscape2edc, ids=None, re_exclude=None): | ||
200 | if ids: | ||
201 | for oid in inkscape2edc.known_ids: | ||
202 | if oid in ids: | ||
203 | yield oid | ||
204 | else: | ||
205 | for oid in inkscape2edc.known_ids: | ||
206 | if re_exclude is not None and re_exclude.match(oid): | ||
207 | continue | ||
208 | yield oid | ||
209 | |||
210 | |||
211 | if __name__ == "__main__": | ||
212 | import optparse | ||
213 | |||
214 | usage = "usage: %prog [options] <input.svg>" | ||
215 | parser = optparse.OptionParser(usage=usage) | ||
216 | |||
217 | parser.add_option("-i", "--id", action="append", default=[], | ||
218 | help=("Object ID to use, it will be the part name. " | ||
219 | "Multiple usage to use more object ids.")) | ||
220 | parser.add_option("-e", "--exclude", action="store", default=None, | ||
221 | help=("Exclude regular expression." | ||
222 | "Matching IDs will be ignored.")) | ||
223 | parser.add_option("-o", "--output", action="store", default=None, | ||
224 | help="Output file to use") | ||
225 | parser.add_option("-g", "--group", action="store", default=None, | ||
226 | help="Group name") | ||
227 | parser.add_option("-d", "--images-dir", action="store", default="", | ||
228 | help="Directory where to output images.") | ||
229 | parser.add_option("--no-min", action="store_true", | ||
230 | help="Do not output min values") | ||
231 | parser.add_option("--no-max", action="store_true", | ||
232 | help="Do not output max values") | ||
233 | parser.add_option("--no-mouse_events", action="store_true", | ||
234 | help="Do not output mouse_events lines") | ||
235 | parser.add_option("--relative1-y", action="store", | ||
236 | choices=("top", "bottom", "auto"), | ||
237 | default="auto", | ||
238 | help=("Choose what to use as base for rel1 y values, " | ||
239 | "top=0.0, bottom=1.0, auto=nearest")) | ||
240 | parser.add_option("--relative2-y", action="store", | ||
241 | choices=("top", "bottom", "auto"), | ||
242 | default="auto", | ||
243 | help=("Choose what to use as base for rel2 y values, " | ||
244 | "top=0.0, bottom=1.0, auto=nearest")) | ||
245 | parser.add_option("--relative1-x", action="store", | ||
246 | choices=("left", "right", "auto"), | ||
247 | default="auto", | ||
248 | help=("Choose what to use as base for rel1 x values, " | ||
249 | "left=0.0, right=1.0, auto=nearest")) | ||
250 | parser.add_option("--relative2-x", action="store", | ||
251 | choices=("left", "right", "auto"), | ||
252 | default="auto", | ||
253 | help=("Choose what to use as base for rel2 x values, " | ||
254 | "left=0.0, right=1.0, auto=nearest")) | ||
255 | |||
256 | |||
257 | options, args = parser.parse_args() | ||
258 | |||
259 | try: | ||
260 | infile = args[0] | ||
261 | except IndexError: | ||
262 | parser.print_help() | ||
263 | raise SystemExit("missing input file name") | ||
264 | |||
265 | fname = os.path.splitext(infile)[0] | ||
266 | if not options.output: | ||
267 | options.output = fname + ".edc" | ||
268 | |||
269 | if not options.group: | ||
270 | options.group = fname | ||
271 | |||
272 | rx_map = {"left": 0.0, "right": 1.0} | ||
273 | options.relative1_x = rx_map.get(options.relative1_x, None) | ||
274 | options.relative2_x = rx_map.get(options.relative2_x, None) | ||
275 | |||
276 | ry_map = {"top": 0.0, "bottom": 1.0} | ||
277 | options.relative1_y = ry_map.get(options.relative1_y, None) | ||
278 | options.relative2_y = ry_map.get(options.relative2_y, None) | ||
279 | |||
280 | o = Inkscape2Edc(infile, options.output, options.group, | ||
281 | relative1_x=options.relative1_x, | ||
282 | relative2_x=options.relative2_x, | ||
283 | relative1_y=options.relative1_y, | ||
284 | relative2_y=options.relative2_y, | ||
285 | images_dir=options.images_dir, | ||
286 | show_max=not options.no_max, show_min=not options.no_min, | ||
287 | show_mouse_events=not options.no_mouse_events) | ||
288 | |||
289 | re_exclude = None | ||
290 | if options.exclude: | ||
291 | re_exclude = re.compile(options.exclude) | ||
292 | |||
293 | if options.images_dir: | ||
294 | os.makedirs(options.images_dir) | ||
295 | |||
296 | o.load_sizes() | ||
297 | o.output_file_header() | ||
298 | |||
299 | o.output_file_section_images_begin() | ||
300 | for oid in foreach_id(o, options.id, re_exclude): | ||
301 | o.output_image(oid) | ||
302 | o.output_file_section_images_end() | ||
303 | |||
304 | o.output_file_section_parts_begin() | ||
305 | for oid in foreach_id(o, options.id, re_exclude): | ||
306 | o.output_part(oid) | ||
307 | o.output_file_section_parts_end() | ||
308 | |||
309 | o.output_file_foot() | ||