diff --git a/bin/config_wasm b/bin/config_wasm index 2995cd24fa..8c37cabe3c 100755 --- a/bin/config_wasm +++ b/bin/config_wasm @@ -6,4 +6,4 @@ xrepo install -y $emsdk_pkg var pkg_info = (xrepo fetch --json $emsdk_pkg | from-json) var emsdk_path = $pkg_info[0][artifacts][installdir] -xmake config -p wasm --emsdk=$emsdk_path --yes -vD +xmake config -p wasm --emsdk=$emsdk_path --yes -vD --qt=$E:HOME/6.5.3/wasm_singlethread/ diff --git a/src/Scheme/Plugins/glue_html.lua b/src/Scheme/Plugins/glue_html.lua new file mode 100644 index 0000000000..543eac18ca --- /dev/null +++ b/src/Scheme/Plugins/glue_html.lua @@ -0,0 +1,61 @@ +------------------------------------------------------------------------------- +-- +-- MODULE : glue_html.lua +-- DESCRIPTION : Generating glue on HTML/MathML +-- COPYRIGHT : (C) 1999-2023 Joris van der Hoeven +-- 2023 jingkaimori +-- 2023 Darcy Shen +-- +-- This software falls under the GNU general public license version 3 or later. +-- It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE +-- in the root directory or . + +function main() + return { + binding_object = "", + initializer_name = "initialize_glue_xml", + glues = { + { + scm_name = "parse-html", + cpp_name = "parse_html", + ret_type = "scheme_tree", + arg_list = { + "string" + } + }, + { + scm_name = "clean-html", + cpp_name = "clean_html", + ret_type = "tree", + arg_list = { + "content" + } + }, + { + scm_name = "upgrade-tmml", + cpp_name = "tmml_upgrade", + ret_type = "tree", + arg_list = { + "scheme_tree" + } + }, + { + scm_name = "upgrade-mathml", + cpp_name = "upgrade_mathml", + ret_type = "tree", + arg_list = { + "content" + } + }, + { + scm_name = "retrieve-mathjax", + cpp_name = "retrieve_mathjax", + ret_type = "tree", + arg_list = { + "int" + } + }, + } + } +end + diff --git a/src/Scheme/Plugins/glue_xml.lua b/src/Scheme/Plugins/glue_xml.lua index f189cdc44f..f5582d2909 100644 --- a/src/Scheme/Plugins/glue_xml.lua +++ b/src/Scheme/Plugins/glue_xml.lua @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------- -- -- MODULE : glue_xml.lua --- DESCRIPTION : Generating glue on XML/HTML/MathML +-- DESCRIPTION : Generating glue on XML -- COPYRIGHT : (C) 1999-2023 Joris van der Hoeven -- 2023 jingkaimori -- 2023 Darcy Shen @@ -73,46 +73,6 @@ function main() "string" } }, - { - scm_name = "parse-html", - cpp_name = "parse_html", - ret_type = "scheme_tree", - arg_list = { - "string" - } - }, - { - scm_name = "clean-html", - cpp_name = "clean_html", - ret_type = "tree", - arg_list = { - "content" - } - }, - { - scm_name = "upgrade-tmml", - cpp_name = "tmml_upgrade", - ret_type = "tree", - arg_list = { - "scheme_tree" - } - }, - { - scm_name = "upgrade-mathml", - cpp_name = "upgrade_mathml", - ret_type = "tree", - arg_list = { - "content" - } - }, - { - scm_name = "retrieve-mathjax", - cpp_name = "retrieve_mathjax", - ret_type = "tree", - arg_list = { - "int" - } - }, } } end diff --git a/src/Scheme/Plugins/init_glue_plugins.cpp b/src/Scheme/Plugins/init_glue_plugins.cpp index 3b9b7b6587..63ee62327b 100644 --- a/src/Scheme/Plugins/init_glue_plugins.cpp +++ b/src/Scheme/Plugins/init_glue_plugins.cpp @@ -20,10 +20,14 @@ #include "Database/database.hpp" #include "glue_tmdb.cpp" -#include "Html/html.hpp" #include "Xml/xml.hpp" #include "glue_xml.cpp" +#ifdef USE_PLUGIN_HTML +#include "Html/html.hpp" +#include "glue_html.cpp" +#endif + bool use_plugin_updater () { #ifdef USE_PLUGIN_SPARKLE @@ -108,6 +112,10 @@ initialize_glue_plugins () { initialize_glue_tmdb (); initialize_glue_xml (); +#ifdef USE_PLUGIN_HTML + initialize_glue_html (); +#endif + #ifdef USE_PLUGIN_SPARKLE initialize_glue_updater (); #endif diff --git a/xmake.lua b/xmake.lua index c4231d7993..2be75a2043 100644 --- a/xmake.lua +++ b/xmake.lua @@ -228,6 +228,7 @@ set_configvar("USE_PLUGIN_LATEX_PREVIEW", true) set_configvar("USE_PLUGIN_TEX", true) set_configvar("USE_PLUGIN_ISPELL", true) set_configvar("USE_PLUGIN_SPARKLE", false) +set_configvar("USE_PLUGIN_HTML", true) set_configvar("TM_DYNAMIC_LINKING", false) if is_plat("mingw", "windows") then diff --git a/xmake/code.lua b/xmake/code.lua index 7b10429789..22773e30ae 100644 --- a/xmake/code.lua +++ b/xmake/code.lua @@ -21,6 +21,7 @@ function add_target_code() USE_PLUGIN_LATEX_PREVIEW = false, USE_PLUGIN_TEX = false, USE_PLUGIN_ISPELL = false, + USE_PLUGIN_HTML = false, QTPIPES = is_plat("linux"), USE_QT_PRINTER = is_plat("linux"), NOMINMAX = is_plat("windows"), diff --git a/xmake/draw.lua b/xmake/draw.lua index fdac71280f..dc5bc42c5b 100644 --- a/xmake/draw.lua +++ b/xmake/draw.lua @@ -22,6 +22,7 @@ function add_target_draw() USE_PLUGIN_TEX = false, USE_PLUGIN_ISPELL = false, USE_PLUGIN_SPARKLE = false, + USE_PLUGIN_HTML = false, QTPIPES = is_plat("linux"), USE_QT_PRINTER = is_plat("linux"), NOMINMAX = is_plat("windows"),