Update litehtml_viewer to build on Windows
authorAndrej Kacian <ticho@claws-mail.org>
Mon, 26 Aug 2019 20:05:23 +0000 (22:05 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Mon, 26 Aug 2019 20:05:23 +0000 (22:05 +0200)
src/plugins/litehtml_viewer/Makefile.am
src/plugins/litehtml_viewer/claws.def
src/plugins/litehtml_viewer/litehtml/os_types.h

index 27179744331fb5d76f2fba8bf6ab28f9f5fbf7e3..f91ea5926b9e2394a5d7c088c4064a460766a8fd 100644 (file)
@@ -11,17 +11,44 @@ IFLAGS = \
         -I$(top_srcdir)/src/common \
         -I$(top_builddir)/src \
         -I$(top_srcdir)/src/gtk \
         -I$(top_srcdir)/src/common \
         -I$(top_builddir)/src \
         -I$(top_srcdir)/src/gtk \
-       -I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
+        -I$(top_srcdir)/src/plugins/litehtml_viewer/litehtml
 
 
+if OS_WIN32
+
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
+               `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
+               sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
+
+%.lo: %.rc
+       $(LTRCCOMPILE) -i $< -o $@
+
+plugin_res = version.lo
+plugin_res_ldflag = -Wl,.libs/version.o
+export_symbols = -export-symbols $(srcdir)/plugin.def
+plugin_deps = libclaws.a $(plugin_res) plugin.def
+plugin_ldadd = -L. -lclaws
+
+libclaws.a: claws.def
+       $(DLLTOOL) --output-lib $@ --def $<
+else
 plugin_res =
 plugin_res_ldflag =
 export_symbols =
 plugin_deps =
 plugin_ldadd =
 plugin_res =
 plugin_res_ldflag =
 export_symbols =
 plugin_deps =
 plugin_ldadd =
+endif
 
 
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+else
 no_undefined =
 no_undefined =
+endif
 
 
+if CYGWIN
+cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
+else
 cygwin_export_lib =
 cygwin_export_lib =
+endif
 
 plugindir = $(pkglibdir)/plugins
 
 
 plugindir = $(pkglibdir)/plugins
 
@@ -29,7 +56,7 @@ if BUILD_LITEHTML_VIEWER_PLUGIN
 plugin_LTLIBRARIES = litehtml_viewer.la
 endif
 
 plugin_LTLIBRARIES = litehtml_viewer.la
 endif
 
-litehtml_viewer_la_DEPENDENCIES = $(plugin_deps)
+litehtml_viewer_la_DEPENDENCIES = $(plugin_deps) litehtml/liblitehtml.la
 
 litehtml_viewer_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
        $(top_builddir)/src/plugins/litehtml_viewer/litehtml/liblitehtml.la \
 
 litehtml_viewer_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
        $(top_builddir)/src/plugins/litehtml_viewer/litehtml/liblitehtml.la \
index 9a6ff503a13fb7fc75ddbc01ea48e4597541cacd..90b9af38330707d05a59670b3f5d66ace6133cb3 100644 (file)
@@ -1,72 +1,15 @@
 LIBRARY CLAWS-MAIL.EXE
 EXPORTS
 LIBRARY CLAWS-MAIL.EXE
 EXPORTS
-addressbook_folder_selection
-alertpanel
-alertpanel_error
-check_plugin_version
-claws_do_idle
-claws_fopen
-claws_fdopen
-claws_fclose
-claws_safe_fclose
-combobox_get_active_data
-combobox_select_by_data
-combobox_text_new
-complete_address
-compose_new
-conv_codeset_strdup
-conv_get_locale_charset_str
-conv_get_locale_charset_str_no_utf8
 debug_print_real
 debug_srcname
 debug_print_real
 debug_srcname
-end_address_completion
-extract_address
-file_exist
-file_read_to_str_no_recode
-filesel_select_file_open
-filesel_select_file_save
-folder_find_item_from_identifier
-folder_get_default_trash
-folder_item_get_identifier
-folder_item_get_path
-folder_item_remove_msg
-foldersel_folder_sel
-folder_subscribe
-get_complete_address
-get_locale_dir
 get_rc_dir
 get_rc_dir
-gtkut_get_browse_directory_btn
-gtkut_get_browse_file_btn
 gtkut_get_options_frame
 gtkut_get_options_frame
-gtkutils_scroll_one_line
-gtkutils_scroll_page
-gtkut_sc_combobox_create
-hooks_register_hook
-hooks_unregister_hook
-is_dir_exist
-line_has_quote_char
-log_error
-make_dir
-matcherlist_free
-matcherlist_match
-matcherlist_new
-matcherprop_new
+gtkut_widget_draw_now
+mainwindow_get_mainwindow
 mimeview_register_viewer_factory
 mimeview_unregister_viewer_factory
 mimeview_register_viewer_factory
 mimeview_unregister_viewer_factory
-noticeview_hide
-open_txt_editor
 open_uri
 open_uri
-plugin_get_loaded_by_name
-pref_get_escaped_pref
-pref_get_pref_from_entry
-pref_get_unescaped_pref
-prefs_button_toggled
-prefs_button_toggled follow
-prefs_common
-prefs_common_get_ext_editor_cmd
-prefs_common_get_prefs
 prefs_common_get_uri_cmd
 prefs_common_get_uri_cmd
-pref_set_entry_from_pref
 prefs_file_close
 prefs_file_close_revert
 prefs_gtk_register_page
 prefs_file_close
 prefs_file_close_revert
 prefs_gtk_register_page
@@ -76,23 +19,7 @@ prefs_set_block_label
 prefs_set_default
 prefs_write_open
 prefs_write_param
 prefs_set_default
 prefs_write_open
 prefs_write_param
-printing_get_page_setup
-printing_get_settings
-printing_store_settings
-procmime_get_part
-procmime_get_tmp_file_name
+procmime_get_part_as_pixbuf
+procmime_get_part_as_string
 procmime_mimeinfo_get_parameter
 procmime_mimeinfo_next
 procmime_mimeinfo_get_parameter
 procmime_mimeinfo_next
-procmsg_get_message_file
-procmsg_msginfo_set_flags
-procmsg_msginfo_unset_flags
-procmsg_register_spam_learner
-procmsg_spam_set_folder
-procmsg_unregister_spam_learner
-settings
-start_address_completion
-statusbar_pop_all
-statusbar_print_all
-statusbar_progress_all
-str_write_to_file
-subst_char
index 39b027085d4ad3ce9dfd985fd02983a585ea99d1..d0aa9f9e91177889f3a506867a4bda8d1cde7b8b 100644 (file)
@@ -49,11 +49,12 @@ namespace litehtml
 
 #endif
 
 
 #endif
 
-       #ifdef _WIN64
-               typedef unsigned __int64 uint_ptr;
-       #else
-               typedef unsigned int    uint_ptr;
-       #endif
+//     #ifdef _WIN64
+//             typedef unsigned __int64 uint_ptr;
+//     #else
+//             typedef unsigned int    uint_ptr;
+//     #endif
+       typedef void*                           uint_ptr;
 
 #else
        #define LITEHTML_UTF8
 
 #else
        #define LITEHTML_UTF8