forked from enlightenment/efl
evilize edje. Link against ecore_file only when needed. PATH_MAX and not MAX_PATH. Minor other fixes.
SVN revision: 34761
This commit is contained in:
parent
7dc315e9dc
commit
82fee3d58c
|
@ -31,14 +31,18 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
|
||||||
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
|
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
|
||||||
AC_SUBST(version_info)
|
AC_SUBST(version_info)
|
||||||
|
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
|
|
||||||
WIN32_CFLAGS=""
|
WIN32_CFLAGS=""
|
||||||
lt_no_undefined=""
|
lt_no_undefined=""
|
||||||
lt_enable_auto_import=""
|
lt_enable_auto_import=""
|
||||||
edje_decc_lib=""
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
mingw*|cegcc)
|
mingw*|cegcc)
|
||||||
|
PKG_CHECK_MODULES([EVIL], [evil])
|
||||||
|
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
|
||||||
|
AC_DEFINE(HAVE_REALPATH, 1, [Define to 1 if you have the `realpath' function.])
|
||||||
dnl needed for correct definition of EAPI
|
dnl needed for correct definition of EAPI
|
||||||
AC_DEFINE(EFL_EDJE_BUILD, 1, [Define to mention that embryo is built])
|
AC_DEFINE(EFL_EDJE_BUILD, 1, [Define to mention that embryo is built])
|
||||||
if test "x$host_os" = "xcegcc" ; then
|
if test "x$host_os" = "xcegcc" ; then
|
||||||
|
@ -46,15 +50,14 @@ case "$host_os" in
|
||||||
lt_enable_auto_import="-Wl,--enable-auto-import"
|
lt_enable_auto_import="-Wl,--enable-auto-import"
|
||||||
fi
|
fi
|
||||||
lt_no_undefined="-no-undefined"
|
lt_no_undefined="-no-undefined"
|
||||||
edje_decc_lib="-lole32 -luuid"
|
;;
|
||||||
|
*)
|
||||||
|
AC_CHECK_FUNCS(realpath)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST(WIN32_CFLAGS)
|
AC_SUBST(WIN32_CFLAGS)
|
||||||
AC_SUBST(lt_no_undefined)
|
AC_SUBST(lt_no_undefined)
|
||||||
AC_SUBST(lt_enable_auto_import)
|
AC_SUBST(lt_enable_auto_import)
|
||||||
AC_SUBST(edje_decc_lib)
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(realpath)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to build edje_cc)
|
AC_MSG_CHECKING(whether to build edje_cc)
|
||||||
have_edje_cc="yes"
|
have_edje_cc="yes"
|
||||||
|
@ -75,11 +78,14 @@ PKG_CHECK_MODULES(EDJE, [
|
||||||
evas >= 0.9.9
|
evas >= 0.9.9
|
||||||
ecore-evas >= 0.9.9
|
ecore-evas >= 0.9.9
|
||||||
ecore-job >= 0.9.9
|
ecore-job >= 0.9.9
|
||||||
ecore-file >= 0.9.9
|
|
||||||
eet >= 1.0.1
|
eet >= 1.0.1
|
||||||
embryo >= 0.9.1
|
embryo >= 0.9.1
|
||||||
])
|
])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(ECORE_FILE, [
|
||||||
|
ecore-file >= 0.9.9
|
||||||
|
])
|
||||||
|
|
||||||
AC_MSG_CHECKING([for location of Vim data files])
|
AC_MSG_CHECKING([for location of Vim data files])
|
||||||
install_vim="yes";
|
install_vim="yes";
|
||||||
AC_ARG_WITH(vim,
|
AC_ARG_WITH(vim,
|
||||||
|
@ -113,11 +119,9 @@ AC_SUBST(vimdir)
|
||||||
EDJE_CC_PRG=""
|
EDJE_CC_PRG=""
|
||||||
EDJE_DECC_PRG=""
|
EDJE_DECC_PRG=""
|
||||||
EDJE_RECC_PRG=""
|
EDJE_RECC_PRG=""
|
||||||
EDJE_THUMB_PRG=""
|
|
||||||
if test "x$have_edje_cc" = "xyes"; then
|
if test "x$have_edje_cc" = "xyes"; then
|
||||||
AM_CONDITIONAL(BUILD_EDJE_CC, true)
|
AM_CONDITIONAL(BUILD_EDJE_CC, true)
|
||||||
AM_CONDITIONAL(BUILD_EDJE_DECC, true)
|
AM_CONDITIONAL(BUILD_EDJE_DECC, true)
|
||||||
AM_CONDITIONAL(BUILD_EDJE_THUMB, true)
|
|
||||||
EDJE_CC_PRG="edje_cc"
|
EDJE_CC_PRG="edje_cc"
|
||||||
EDJE_DECC_PRG="edje_decc"
|
EDJE_DECC_PRG="edje_decc"
|
||||||
EDJE_RECC_PRG="edje_recc"
|
EDJE_RECC_PRG="edje_recc"
|
||||||
|
@ -153,6 +157,8 @@ echo "------------------------------------------------------------------------"
|
||||||
echo
|
echo
|
||||||
echo "Configuration Options Summary:"
|
echo "Configuration Options Summary:"
|
||||||
echo
|
echo
|
||||||
|
echo " Build binaries.......: $have_edje_cc"
|
||||||
|
echo
|
||||||
echo " Compilation..........: make"
|
echo " Compilation..........: make"
|
||||||
echo
|
echo
|
||||||
echo " Installation.........: make install"
|
echo " Installation.........: make install"
|
||||||
|
|
|
@ -8,7 +8,21 @@ AM_CPPFLAGS = \
|
||||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||||
@EDJE_CFLAGS@
|
@EDJE_CFLAGS@ \
|
||||||
|
@ECORE_FILE_CFLAGS@ \
|
||||||
|
@EVIL_CFLAGS@
|
||||||
|
|
||||||
|
if BUILD_EDJE_CC
|
||||||
|
EDJE_CC = edje_cc
|
||||||
|
else
|
||||||
|
EDJE_CC =
|
||||||
|
endif
|
||||||
|
|
||||||
|
if BUILD_EDJE_DECC
|
||||||
|
EDJE_DECC = edje_decc
|
||||||
|
else
|
||||||
|
EDJE_DECC =
|
||||||
|
endif
|
||||||
|
|
||||||
bin_SCRIPTS = \
|
bin_SCRIPTS = \
|
||||||
@EDJE_RECC_PRG@
|
@EDJE_RECC_PRG@
|
||||||
|
@ -16,9 +30,7 @@ bin_SCRIPTS = \
|
||||||
EXTRA_DIST = @EDJE_RECC_PRG@
|
EXTRA_DIST = @EDJE_RECC_PRG@
|
||||||
EXTRA_SCRIPTS = edje_recc
|
EXTRA_SCRIPTS = edje_recc
|
||||||
|
|
||||||
bin_PROGRAMS = \
|
bin_PROGRAMS = $(EDJE_CC) $(EDJE_DECC)
|
||||||
edje_cc \
|
|
||||||
edje_decc
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS = \
|
EXTRA_PROGRAMS = \
|
||||||
edje_cc \
|
edje_cc \
|
||||||
|
@ -37,7 +49,7 @@ edje_prefix.h \
|
||||||
edje_main.h
|
edje_main.h
|
||||||
|
|
||||||
edje_cc_CFLAGS = @WIN32_CFLAGS@
|
edje_cc_CFLAGS = @WIN32_CFLAGS@
|
||||||
edje_cc_LDADD = $(top_builddir)/src/lib/libedje.la $(EDJE_LIBS)
|
edje_cc_LDADD = $(top_builddir)/src/lib/libedje.la $(EDJE_LIBS) $(EVIL_LIBS)
|
||||||
edje_cc_LDFLAGS = @lt_enable_auto_import@
|
edje_cc_LDFLAGS = @lt_enable_auto_import@
|
||||||
edje_cc_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
edje_cc_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
||||||
|
|
||||||
|
@ -49,6 +61,6 @@ edje_cc_mem.c \
|
||||||
edje_cc_sources.c
|
edje_cc_sources.c
|
||||||
|
|
||||||
edje_decc_CFLAGS = @WIN32_CFLAGS@
|
edje_decc_CFLAGS = @WIN32_CFLAGS@
|
||||||
edje_decc_LDADD = $(top_builddir)/src/lib/libedje.la @edje_decc_lib@ $(EDJE_LIBS)
|
edje_decc_LDADD = $(top_builddir)/src/lib/libedje.la $(EDJE_LIBS) $(ECORE_FILE_LIBS) $(EVIL_LIBS)
|
||||||
edje_decc_LDFLAGS = @lt_enable_auto_import@
|
edje_decc_LDFLAGS = @lt_enable_auto_import@
|
||||||
edje_decc_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
edje_decc_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
||||||
|
|
|
@ -125,11 +125,7 @@ main(int argc, char **argv)
|
||||||
#ifdef HAVE_REALPATH
|
#ifdef HAVE_REALPATH
|
||||||
if (!realpath(file_in, rpath) || stat(rpath, &st) || !S_ISREG(st.st_mode))
|
if (!realpath(file_in, rpath) || stat(rpath, &st) || !S_ISREG(st.st_mode))
|
||||||
#else
|
#else
|
||||||
# ifdef _WIN32
|
|
||||||
if (!_fullpath(rpath, file_in, _MAX_PATH) || stat(rpath, &st) || !S_ISREG(st.st_mode))
|
|
||||||
# else
|
|
||||||
if (stat(file_in, &st) || !S_ISREG(st.st_mode))
|
if (stat(file_in, &st) || !S_ISREG(st.st_mode))
|
||||||
# endif /* _WIN32 */
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error: file not found: %s.\n", progname, file_in);
|
fprintf(stderr, "%s: Error: file not found: %s.\n", progname, file_in);
|
||||||
|
@ -161,11 +157,7 @@ main(int argc, char **argv)
|
||||||
#ifdef HAVE_REALPATH
|
#ifdef HAVE_REALPATH
|
||||||
if (realpath(file_out, rpath2) && !strcmp (rpath, rpath2))
|
if (realpath(file_out, rpath2) && !strcmp (rpath, rpath2))
|
||||||
#else
|
#else
|
||||||
# ifdef _WIN32
|
|
||||||
if (_fullpath(rpath2, file_out, _MAX_PATH) && !strcmp (rpath, rpath2))
|
|
||||||
# else
|
|
||||||
if (!strcmp (file_in, file_out))
|
if (!strcmp (file_in, file_out))
|
||||||
# endif /* _WIN32 */
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error: input file equals output file.\n", progname);
|
fprintf(stderr, "%s: Error: input file equals output file.\n", progname);
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <share.h>
|
|
||||||
# include <sys/stat.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
|
|
||||||
#include "edje_cc.h"
|
#include "edje_cc.h"
|
||||||
|
|
||||||
typedef struct _Part_Lookup Part_Lookup;
|
typedef struct _Part_Lookup Part_Lookup;
|
||||||
|
@ -600,34 +594,16 @@ data_write(void)
|
||||||
{
|
{
|
||||||
char tmpn[4096];
|
char tmpn[4096];
|
||||||
int fd;
|
int fd;
|
||||||
#ifdef _WIN32
|
|
||||||
char *tmpdir;
|
char *tmpdir;
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef HAVE_EVIL
|
||||||
tmpdir = getenv("TMP");
|
tmpdir = evil_tmpdir_get();
|
||||||
if (!tmpdir) tmpdir = getenv("TEMP");
|
|
||||||
if (!tmpdir) tmpdir = getenv("USERPROFILE");
|
|
||||||
if (!tmpdir) tmpdir = getenv("WINDIR");
|
|
||||||
if (tmpdir)
|
|
||||||
{
|
|
||||||
snprintf(tmpn, _MAX_PATH, "%s/edje_cc.sma-tmp-XXXXXX", tmpdir);
|
|
||||||
# ifdef __MINGW32__
|
|
||||||
if (_mktemp(tmpn))
|
|
||||||
fd = _sopen(tmpn, _O_RDWR | _O_BINARY | _O_CREAT, _SH_DENYNO, _S_IREAD | _S_IWRITE);
|
|
||||||
# else
|
|
||||||
if (!_mktemp_s(tmpn, _MAX_PATH))
|
|
||||||
_sopen_s(&fd, tmpn, _O_RDWR | _O_BINARY | _O_CREAT, _SH_DENYNO, _S_IREAD | _S_IWRITE);
|
|
||||||
# endif /* __MINGW32__ */
|
|
||||||
else
|
|
||||||
fd = -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fd= -1;
|
|
||||||
#else
|
#else
|
||||||
|
tmpdir = "/tmp";
|
||||||
|
#endif
|
||||||
|
snprintf(tmpn, PATH_MAX, "%s/edje_cc.sma-tmp-XXXXXX", tmpdir);
|
||||||
strcpy(tmpn, "/tmp/edje_cc.sma-tmp-XXXXXX");
|
strcpy(tmpn, "/tmp/edje_cc.sma-tmp-XXXXXX");
|
||||||
fd = mkstemp(tmpn);
|
fd = mkstemp(tmpn);
|
||||||
#endif /* _WIN32 */
|
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
@ -708,30 +684,9 @@ data_write(void)
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
#ifdef _WIN32
|
snprintf(tmpo, PATH_MAX, "%s/edje_cc.amx-tmp-XXXXXX", tmpdir);
|
||||||
tmpdir = getenv("TMP");
|
|
||||||
if (!tmpdir) tmpdir = getenv("TEMP");
|
|
||||||
if (!tmpdir) tmpdir = getenv("USERPROFILE");
|
|
||||||
if (!tmpdir) tmpdir = getenv("WINDIR");
|
|
||||||
if (tmpdir)
|
|
||||||
{
|
|
||||||
snprintf(tmpo, _MAX_PATH, "%s/edje_cc.amx-tmp-XXXXXX", tmpdir);
|
|
||||||
# ifdef __MINGW32__
|
|
||||||
if (_mktemp(tmpo))
|
|
||||||
fd = _sopen(tmpo, _O_RDWR | _O_BINARY | _O_CREAT, _SH_DENYNO, _S_IREAD | _S_IWRITE);
|
|
||||||
# else
|
|
||||||
if (!_mktemp_s(tmpo, _MAX_PATH))
|
|
||||||
_sopen_s(&fd, tmpo, _O_RDWR | _O_BINARY | _O_CREAT, _SH_DENYNO, _S_IREAD | _S_IWRITE);
|
|
||||||
# endif /* __MINGW32__ */
|
|
||||||
else
|
|
||||||
fd = -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fd= -1;
|
|
||||||
#else
|
|
||||||
strcpy(tmpo, "/tmp/edje_cc.amx-tmp-XXXXXX");
|
strcpy(tmpo, "/tmp/edje_cc.amx-tmp-XXXXXX");
|
||||||
fd = mkstemp(tmpo);
|
fd = mkstemp(tmpo);
|
||||||
#endif /* _WIN32 */
|
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <windows.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#include "edje_cc.h"
|
#include "edje_cc.h"
|
||||||
|
|
||||||
static void new_object(void);
|
static void new_object(void);
|
||||||
|
@ -609,36 +605,27 @@ get_verbatim_line2(void)
|
||||||
void
|
void
|
||||||
compile(void)
|
compile(void)
|
||||||
{
|
{
|
||||||
int fd;
|
|
||||||
off_t size;
|
|
||||||
char *data, *p;
|
|
||||||
#ifdef _WIN32
|
|
||||||
int ret;
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
char inc[4096];
|
char inc[4096];
|
||||||
static char tmpn[4096];
|
static char tmpn[4096];
|
||||||
|
int fd;
|
||||||
|
off_t size;
|
||||||
|
char *data, *p;
|
||||||
|
char *tmpdir;
|
||||||
|
|
||||||
|
#ifdef HAVE_EVIL
|
||||||
|
tmpdir = evil_tmpdir_get();
|
||||||
|
#else
|
||||||
|
tmpdir = "/tmp";
|
||||||
|
#endif
|
||||||
|
|
||||||
strncpy(inc, file_in, 4000);
|
strncpy(inc, file_in, 4000);
|
||||||
inc[4001] = 0;
|
inc[4001] = 0;
|
||||||
p = strrchr(inc, '/');
|
p = strrchr(inc, '/');
|
||||||
if (!p) strcpy(inc, "./");
|
if (!p) strcpy(inc, "./");
|
||||||
else *p = 0;
|
else *p = 0;
|
||||||
#ifdef _WIN32
|
snprintf (tmpn, PATH_MAX, "%s/edje_cc.edc-tmp-XXXXXX", tmpdir);
|
||||||
ret = GetTempPath(4096, buf);
|
|
||||||
if ((ret > 4096) || (ret == 0))
|
|
||||||
fd = -1;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!GetTempFileName(buf, "edj", 0, tmpn))
|
|
||||||
fd = -1;
|
|
||||||
else
|
|
||||||
fd = open(tmpn, _O_RDWR | _O_BINARY | _O_CREAT, 0444);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
strcpy(tmpn, "/tmp/edje_cc.edc-tmp-XXXXXX");
|
|
||||||
fd = mkstemp(tmpn);
|
fd = mkstemp(tmpn);
|
||||||
#endif /* _WIN32 */
|
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -706,11 +693,7 @@ compile(void)
|
||||||
free(def);
|
free(def);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
|
||||||
fd = open(file_in, _O_RDONLY | _O_BINARY);
|
|
||||||
#else
|
|
||||||
fd = open(file_in, O_RDONLY);
|
fd = open(file_in, O_RDONLY);
|
||||||
#endif /* _WIN32 */
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. cannot open file \"%s\" for input. %s\n",
|
fprintf(stderr, "%s: Error. cannot open file \"%s\" for input. %s\n",
|
||||||
|
|
|
@ -3,17 +3,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ugly ugly. avert your eyes. */
|
/* ugly ugly. avert your eyes. */
|
||||||
#include "edje_decc.h"
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <Ecore_File.h>
|
#include <Ecore_File.h>
|
||||||
#ifdef _WIN32
|
|
||||||
# include <windows.h>
|
#include "edje_decc.h"
|
||||||
# include <shlobj.h>
|
|
||||||
# include <objidl.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
char *progname = NULL;
|
char *progname = NULL;
|
||||||
char *file_in = NULL;
|
char *file_in = NULL;
|
||||||
|
@ -40,49 +37,6 @@ main_help(void)
|
||||||
,progname);
|
,progname);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
int
|
|
||||||
symlink (const char *oldpath, const char *newpath)
|
|
||||||
{
|
|
||||||
IShellLink *pISL;
|
|
||||||
IPersistFile *pIPF;
|
|
||||||
|
|
||||||
if (FAILED(CoInitialize(NULL)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (FAILED(CoCreateInstance(&CLSID_ShellLink,
|
|
||||||
NULL,
|
|
||||||
CLSCTX_INPROC_SERVER,
|
|
||||||
&IID_IShellLink,
|
|
||||||
(PVOID *)&pISL)))
|
|
||||||
goto no_instance;
|
|
||||||
|
|
||||||
if (FAILED(pISL->lpVtbl->SetPath(pISL, oldpath)))
|
|
||||||
goto no_setpath;
|
|
||||||
|
|
||||||
if (FAILED(pISL->lpVtbl->QueryInterface(pISL, &IID_IPersistFile, (PVOID *) &pIPF)))
|
|
||||||
goto no_queryinterface;
|
|
||||||
|
|
||||||
if (FAILED(pIPF->lpVtbl->Save(pIPF, newpath, FALSE)))
|
|
||||||
goto no_save;
|
|
||||||
|
|
||||||
pIPF->lpVtbl->Release(pIPF);
|
|
||||||
pISL->lpVtbl->Release(pISL);
|
|
||||||
CoUninitialize();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
no_save:
|
|
||||||
pIPF->lpVtbl->Release(pIPF);
|
|
||||||
no_queryinterface:
|
|
||||||
no_setpath:
|
|
||||||
pISL->lpVtbl->Release(pISL);
|
|
||||||
no_instance:
|
|
||||||
CoUninitialize();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
Eet_Dictionary *ed;
|
Eet_Dictionary *ed;
|
||||||
|
|
||||||
|
@ -349,9 +303,7 @@ output(void)
|
||||||
symlink(sf->name, out);
|
symlink(sf->name, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
chmod(out, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP);
|
chmod(out, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP);
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
printf("\n*** CAUTION ***\n"
|
printf("\n*** CAUTION ***\n"
|
||||||
"Please check the build script for anything malicious "
|
"Please check the build script for anything malicious "
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
#ifndef EDJE_MAIN_H
|
#ifndef EDJE_MAIN_H
|
||||||
#define EDJE_MAIN_H
|
#define EDJE_MAIN_H
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <Evas.h>
|
|
||||||
#include <Ecore.h>
|
|
||||||
#include <Ecore_Evas.h>
|
|
||||||
#include <Eet.h>
|
|
||||||
#include "Edje.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -22,6 +14,20 @@
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_EVIL
|
||||||
|
# include <Evil.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <Evas.h>
|
||||||
|
#include <Ecore.h>
|
||||||
|
#include <Ecore_Evas.h>
|
||||||
|
#include <Eet.h>
|
||||||
|
#include "Edje.h"
|
||||||
|
|
||||||
#ifdef HAVE_ALLOCA_H
|
#ifdef HAVE_ALLOCA_H
|
||||||
# include <alloca.h>
|
# include <alloca.h>
|
||||||
#elif defined __GNUC__
|
#elif defined __GNUC__
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -385,11 +389,7 @@ _e_prefix_try_argv(char *argv0)
|
||||||
if (getcwd(buf3, sizeof(buf3)))
|
if (getcwd(buf3, sizeof(buf3)))
|
||||||
{
|
{
|
||||||
snprintf(buf2, sizeof(buf2), "%s/%s", buf3, argv0);
|
snprintf(buf2, sizeof(buf2), "%s/%s", buf3, argv0);
|
||||||
#ifdef _WIN32
|
|
||||||
if (_fullpath(buf, buf2, _MAX_PATH))
|
|
||||||
#else
|
|
||||||
if (realpath(buf2, buf))
|
if (realpath(buf2, buf))
|
||||||
#endif /* _WIN32 */
|
|
||||||
{
|
{
|
||||||
_exe_path = strdup(buf);
|
_exe_path = strdup(buf);
|
||||||
if (access(_exe_path, X_OK) == 0) return 1;
|
if (access(_exe_path, X_OK) == 0) return 1;
|
||||||
|
@ -413,11 +413,7 @@ _e_prefix_try_argv(char *argv0)
|
||||||
strncpy(s, cp, len);
|
strncpy(s, cp, len);
|
||||||
s[len] = '/';
|
s[len] = '/';
|
||||||
strcpy(s + len + 1, argv0);
|
strcpy(s + len + 1, argv0);
|
||||||
#ifdef _WIN32
|
|
||||||
if (_fullpath(buf, s, _MAX_PATH))
|
|
||||||
#else
|
|
||||||
if (realpath(s, buf))
|
if (realpath(s, buf))
|
||||||
#endif /* _WIN32 */
|
|
||||||
{
|
{
|
||||||
if (access(buf, X_OK) == 0)
|
if (access(buf, X_OK) == 0)
|
||||||
{
|
{
|
||||||
|
@ -437,11 +433,7 @@ _e_prefix_try_argv(char *argv0)
|
||||||
strncpy(s, cp, len);
|
strncpy(s, cp, len);
|
||||||
s[len] = '/';
|
s[len] = '/';
|
||||||
strcpy(s + len + 1, argv0);
|
strcpy(s + len + 1, argv0);
|
||||||
#ifdef _WIN32
|
|
||||||
if (_fullpath(buf, s, _MAX_PATH))
|
|
||||||
#else
|
|
||||||
if (realpath(s, buf))
|
if (realpath(s, buf))
|
||||||
#endif /* _WIN32 */
|
|
||||||
{
|
{
|
||||||
if (access(buf, X_OK) == 0)
|
if (access(buf, X_OK) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,8 @@ AM_CPPFLAGS = \
|
||||||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||||
@EDJE_CFLAGS@
|
@EDJE_CFLAGS@ \
|
||||||
|
@EVIL_CFLAGS@
|
||||||
|
|
||||||
lib_LTLIBRARIES = \
|
lib_LTLIBRARIES = \
|
||||||
libedje.la
|
libedje.la
|
||||||
|
|
|
@ -15,13 +15,17 @@
|
||||||
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_EVIL
|
||||||
|
# include <Evil.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Edje.h"
|
#include "Edje.h"
|
||||||
#include "edje_private.h"
|
#include "edje_private.h"
|
||||||
#include "edje_cc.h"
|
#include "edje_cc.h"
|
||||||
#include "Edje_Edit.h"
|
#include "Edje_Edit.h"
|
||||||
|
|
||||||
#define MAX_PATH 4096
|
|
||||||
|
|
||||||
/* Get ed(Edje*) from obj(Evas_Object*) */
|
/* Get ed(Edje*) from obj(Evas_Object*) */
|
||||||
#define GET_ED_OR_RETURN(RET) \
|
#define GET_ED_OR_RETURN(RET) \
|
||||||
Edje *ed; \
|
Edje *ed; \
|
||||||
|
@ -1181,14 +1185,14 @@ edje_edit_part_type_get(Evas_Object *obj, const char *part)
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
edje_edit_part_selected_state_get(Evas_Object *obj, const char *part)
|
edje_edit_part_selected_state_get(Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
char name[MAX_PATH];
|
char name[PATH_MAX];
|
||||||
|
|
||||||
GET_RP_OR_RETURN(NULL);
|
GET_RP_OR_RETURN(NULL);
|
||||||
|
|
||||||
if (!rp->chosen_description)
|
if (!rp->chosen_description)
|
||||||
return "default 0.00";
|
return "default 0.00";
|
||||||
|
|
||||||
snprintf(name, MAX_PATH, "%s %.2f",
|
snprintf(name, PATH_MAX, "%s %.2f",
|
||||||
rp->chosen_description->state.name,
|
rp->chosen_description->state.name,
|
||||||
rp->chosen_description->state.value);
|
rp->chosen_description->state.value);
|
||||||
|
|
||||||
|
@ -1384,7 +1388,7 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source
|
||||||
EAPI Evas_List *
|
EAPI Evas_List *
|
||||||
edje_edit_part_states_list_get(Evas_Object *obj, const char *part)
|
edje_edit_part_states_list_get(Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
char state_name[MAX_PATH];
|
char state_name[PATH_MAX];
|
||||||
Evas_List *states;
|
Evas_List *states;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
Edje_Part_Description *state;
|
Edje_Part_Description *state;
|
||||||
|
@ -1398,7 +1402,7 @@ edje_edit_part_states_list_get(Evas_Object *obj, const char *part)
|
||||||
|
|
||||||
//append default state
|
//append default state
|
||||||
state = rp->part->default_desc;
|
state = rp->part->default_desc;
|
||||||
snprintf(state_name, MAX_PATH,
|
snprintf(state_name, PATH_MAX,
|
||||||
"%s %.2f", state->state.name, state->state.value);
|
"%s %.2f", state->state.name, state->state.value);
|
||||||
states = evas_list_append(states, evas_stringshare_add(state_name));
|
states = evas_list_append(states, evas_stringshare_add(state_name));
|
||||||
//printf("NEW STATE def: %s\n", state->state.name);
|
//printf("NEW STATE def: %s\n", state->state.name);
|
||||||
|
@ -2261,7 +2265,7 @@ edje_edit_fonts_list_get(Evas_Object *obj)
|
||||||
EAPI unsigned char
|
EAPI unsigned char
|
||||||
edje_edit_font_add(Evas_Object *obj, const char* path)
|
edje_edit_font_add(Evas_Object *obj, const char* path)
|
||||||
{
|
{
|
||||||
char buf[MAX_PATH];
|
char buf[PATH_MAX];
|
||||||
Font *fn;
|
Font *fn;
|
||||||
Edje_Font_Directory_Entry *fnt;
|
Edje_Font_Directory_Entry *fnt;
|
||||||
Eet_File *eetf;
|
Eet_File *eetf;
|
||||||
|
@ -3327,7 +3331,7 @@ static void
|
||||||
_edje_generate_source(Edje *ed)
|
_edje_generate_source(Edje *ed)
|
||||||
{
|
{
|
||||||
printf("\n****** GENERATE SOURCE *********\n");
|
printf("\n****** GENERATE SOURCE *********\n");
|
||||||
char tmpn[MAX_PATH];
|
char tmpn[PATH_MAX];
|
||||||
int fd;
|
int fd;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
long sz;
|
long sz;
|
||||||
|
|
Loading…
Reference in New Issue