hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=05a848fdddb660ddd4edb34f3793e4b3e1505ad3

commit 05a848fdddb660ddd4edb34f3793e4b3e1505ad3
Author: Michelle Legrand <[email protected]>
Date:   Sat Feb 28 14:33:17 2015 +0900

    lib: add export/import for libraries on Windows
    
    Summary: Exporting/Importing Enventor dll for Win32.
    
    Differential Revision: https://phab.enlightenment.org/D2040
---
 src/lib/Enventor_Eo.h     | 18 ++++++++++++++++++
 src/lib/Enventor_Legacy.h | 18 ++++++++++++++++++
 src/lib/auto_comp.c       |  1 +
 src/lib/ctxpopup.c        |  1 +
 src/lib/dummy_obj.c       |  1 +
 src/lib/edc_editor.c      |  1 +
 src/lib/edc_parser.c      |  1 +
 src/lib/edj_mgr.c         |  1 +
 src/lib/edj_viewer.c      |  1 +
 src/lib/enventor_main.c   |  1 +
 src/lib/enventor_smart.c  |  1 +
 src/lib/indent.c          |  1 +
 src/lib/redoundo.c        |  1 +
 src/lib/syntax_color.c    |  1 +
 src/lib/syntax_helper.c   |  1 +
 src/lib/template.c        |  1 +
 16 files changed, 50 insertions(+)

diff --git a/src/lib/Enventor_Eo.h b/src/lib/Enventor_Eo.h
index ced23ed..1a0d253 100644
--- a/src/lib/Enventor_Eo.h
+++ b/src/lib/Enventor_Eo.h
@@ -1 +1,19 @@
+/***
+ * Compatible ABI for Win32
+ ***/
+#ifdef _WIN32
+# ifdef EAPI
+#  undef EAPI
+# endif
+# ifdef EOAPI
+#  undef EOAPI
+# endif
+# ifdef ENVENTOR_BUILD
+#  define EAPI __declspec(dllexport)
+#  define EOAPI __declspec(dllexport)
+# else
+#  define EAPI __declspec(dllimport)
+#  define EOAPI __declspec(dllimport)
+# endif
+#endif
 #include "enventor_object.eo.h"
diff --git a/src/lib/Enventor_Legacy.h b/src/lib/Enventor_Legacy.h
index bd7743e..93fb349 100644
--- a/src/lib/Enventor_Legacy.h
+++ b/src/lib/Enventor_Legacy.h
@@ -1,3 +1,21 @@
+/***
+ * Compatible ABI for Win32
+ ***/
+#ifdef _WIN32
+# ifdef EAPI
+#  undef EAPI
+# endif
+# ifdef ENVENTOR_BUILD
+#  define EAPI __declspec(dllexport)
+# else
+#  define EAPI __declspec(dllimport)
+# endif
+# ifdef EOAPI
+#  undef EOAPI
+# endif
+#define EOAPI EAPI
+#endif
+
 typedef enum
 {
    ENVENTOR_OUT_EDJ = 0,
diff --git a/src/lib/auto_comp.c b/src/lib/auto_comp.c
index 849ee2a..9b66fc2 100644
--- a/src/lib/auto_comp.c
+++ b/src/lib/auto_comp.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c
index a93ad7d..1538c00 100644
--- a/src/lib/ctxpopup.c
+++ b/src/lib/ctxpopup.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/dummy_obj.c b/src/lib/dummy_obj.c
index af36417..864a51a 100644
--- a/src/lib/dummy_obj.c
+++ b/src/lib/dummy_obj.c
@@ -4,6 +4,7 @@
 
 #define ENVENTOR_BETA_API_SUPPORT 1
 #define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include <Edje_Edit.h>
diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 49523eb..867650e 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include <Eio.h>
diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index ff38e58..5017e76 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/edj_mgr.c b/src/lib/edj_mgr.c
index 9af98e1..eb8a996 100644
--- a/src/lib/edj_mgr.c
+++ b/src/lib/edj_mgr.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/edj_viewer.c b/src/lib/edj_viewer.c
index d54cb98..738f928 100644
--- a/src/lib/edj_viewer.c
+++ b/src/lib/edj_viewer.c
@@ -4,6 +4,7 @@
 
 #define ENVENTOR_BETA_API_SUPPORT 1
 #define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include <Edje_Edit.h>
diff --git a/src/lib/enventor_main.c b/src/lib/enventor_main.c
index 4012d83..1495946 100644
--- a/src/lib/enventor_main.c
+++ b/src/lib/enventor_main.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include <Eio.h>
diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 277d6c1..8e20b81 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -4,6 +4,7 @@
 
 #define ELM_INTERNAL_API_ARGESFSDFEFC 1
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include <Eio.h>
diff --git a/src/lib/indent.c b/src/lib/indent.c
index 8f5c94a..32870a5 100644
--- a/src/lib/indent.c
+++ b/src/lib/indent.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/redoundo.c b/src/lib/redoundo.c
index c420588..1605ba7 100644
--- a/src/lib/redoundo.c
+++ b/src/lib/redoundo.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/syntax_color.c b/src/lib/syntax_color.c
index bbb6b5d..fd04ad2 100644
--- a/src/lib/syntax_color.c
+++ b/src/lib/syntax_color.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/syntax_helper.c b/src/lib/syntax_helper.c
index 0a8382d..1446b8a 100644
--- a/src/lib/syntax_helper.c
+++ b/src/lib/syntax_helper.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"
diff --git a/src/lib/template.c b/src/lib/template.c
index c735826..1fda886 100644
--- a/src/lib/template.c
+++ b/src/lib/template.c
@@ -3,6 +3,7 @@
 #endif
 
 #define ENVENTOR_BETA_API_SUPPORT 1
+#define ENVENTOR_BUILD
 
 #include <Enventor.h>
 #include "enventor_private.h"

-- 


Reply via email to