okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=48e39bc41b110dbcc88f0f84b180317f59a9cd6b

commit 48e39bc41b110dbcc88f0f84b180317f59a9cd6b
Author: Vincent Torri <[email protected]>
Date:   Tue May 31 14:55:38 2016 -0500

    Ephoto: Make Ephoto's thumbnailer build on Windows.
---
 configure.ac                 | 15 +++++++++++++++
 src/bin/Makefile.am          |  8 ++++++++
 src/bin/ephoto_slideshow.c   |  2 +-
 src/bin/ephoto_thumbnailer.c |  6 ++++++
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 866b6e1..04a4e8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,17 @@ AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS(src/bin/config.h)
 
+AC_CANONICAL_HOST
+
+have_win32="no"
+case "$host_os" in
+   mingw*)
+      have_win32="yes"
+   ;;
+esac
+
+AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
+
 AM_INIT_AUTOMAKE(1.6 dist-xz)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
@@ -55,6 +66,8 @@ PKG_CHECK_MODULES([EFL], [
  efreet-mime >= 1.7.0
 ])
 
+AC_CHECK_FUNCS([nice])
+
 AC_ARG_WITH([tests],
    [AC_HELP_STRING([--with-tests=none|regular|coverage],
                    [choose testing method: regular, coverage, or none.
@@ -91,6 +104,8 @@ echo
 echo "------------------------------------------------------------------------"
 echo "$PACKAGE_NAME $PACKAGE_VERSION"
 echo "------------------------------------------------------------------------"
+echo
+echo "Host.....................: ${host_os}"
 echo 
 echo "Compilation..............: make (or gmake)"
 echo "  CPPFLAGS...............: $CPPFLAGS"
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 14fe19b..e500760 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -51,6 +51,14 @@ ephoto_thumbnail_CPPFLAGS = \
 
 ephoto_thumbnail_LDADD = @EFL_LIBS@
 
+if HAVE_WIN32
+ephoto_thumbnail_LDADD += -lws2_32
+endif
+
+if HAVE_PO
+ephoto_thumbnail_LDADD += @LTLIBINTL@
+endif
+
 ephoto_thumbnail_SOURCES = \
        ephoto_thumbnailer.c \
         ephoto_ipc.c \
diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c
index 460ec0b..24bf870 100644
--- a/src/bin/ephoto_slideshow.c
+++ b/src/bin/ephoto_slideshow.c
@@ -306,7 +306,7 @@ ephoto_slideshow_show_controls(Ephoto *ephoto)
        _add_icon(ss->notify, "view-fullscreen", _("Fullscreen"), NULL);
    evas_object_smart_callback_add(ss->fullscreen, "clicked", _fullscreen, ss);
    ss->fullscreen_after =
-       _add_icon(ss->notify, "preferences-system", _("Settings"), NULL);
+       _add_icon(ss->notify, "preferences-other", _("Settings"), NULL);
    evas_object_smart_callback_add(ss->fullscreen_after, "clicked", _settings, 
ss);
 
    elm_layout_content_set(ephoto->layout, "ephoto.swallow.controls", 
ss->notify);
diff --git a/src/bin/ephoto_thumbnailer.c b/src/bin/ephoto_thumbnailer.c
index 417c332..0fe190e 100644
--- a/src/bin/ephoto_thumbnailer.c
+++ b/src/bin/ephoto_thumbnailer.c
@@ -7,6 +7,10 @@
 # include <netinet/in.h>
 #endif
 
+#ifdef _WIN32
+# include <winsock2.h>
+#endif
+
 #define SHSH(n, v) ((((v) << (n)) & 0xffffffff) | ((v) >> (32 - (n))))
 
 typedef struct _E_Thumb E_Thumb;
@@ -62,6 +66,7 @@ main(int argc,
           }
         else if (!strncmp(argv[i], "--nice=", 7))
           {
+#ifdef HAVE_NICE
              const char *val;
 
              val = argv[i] + 7;
@@ -69,6 +74,7 @@ main(int argc,
                {
                   if (nice(atoi(val)) < 0) perror("nice");
                }
+#endif
           }
      }
 

-- 


Reply via email to