Commit b5dd9d4a authored by nanahira's avatar nanahira

update wasm build

parent 3df667a9
Pipeline #37131 passed with stages
in 2 minutes and 3 seconds
...@@ -16,11 +16,16 @@ ...@@ -16,11 +16,16 @@
#define EXTERN_C #define EXTERN_C
#endif #endif
#ifdef _WIN32 #ifndef OCGCORE_API
#if defined(__EMSCRIPTEN__)
#include <emscripten/emscripten.h>
#define OCGCORE_API EXTERN_C EMSCRIPTEN_KEEPALIVE
#elif defined(_WIN32)
#define OCGCORE_API EXTERN_C __declspec(dllexport) #define OCGCORE_API EXTERN_C __declspec(dllexport)
#else #else
#define OCGCORE_API EXTERN_C __attribute__ ((visibility ("default"))) #define OCGCORE_API EXTERN_C __attribute__ ((visibility ("default")))
#endif #endif
#endif
#define LEN_FAIL 0 #define LEN_FAIL 0
#define LEN_EMPTY 4 #define LEN_EMPTY 4
......
...@@ -93,7 +93,7 @@ project "ocgcore" ...@@ -93,7 +93,7 @@ project "ocgcore"
filter "system:emscripten" filter "system:emscripten"
targetextension ".wasm" targetextension ".wasm"
linkoptions { "-s MODULARIZE=1", "-s EXPORT_NAME=\"createOcgcore\"", "--no-entry", "-s EXPORTED_FUNCTIONS=[\"_set_script_reader\",\"_set_card_reader\",\"_set_message_handler\",\"_create_duel\",\"_start_duel\",\"_end_duel\",\"_set_player_info\",\"_get_log_message\",\"_get_message\",\"_process\",\"_new_card\",\"_new_tag_card\",\"_query_card\",\"_query_field_count\",\"_query_field_card\",\"_query_field_info\",\"_set_responsei\",\"_set_responseb\",\"_preload_script\"]", "-s ENVIRONMENT=web,node", "-s EXPORTED_RUNTIME_METHODS=[\"ccall\",\"cwrap\",\"addFunction\",\"removeFunction\"]", "-s ALLOW_TABLE_GROWTH=1", "-s ALLOW_MEMORY_GROWTH=1", "-o ../wasm/libocgcore.js" } linkoptions { "-s MODULARIZE=1", "-s EXPORT_NAME=\"createOcgcore\"", "--no-entry", "-s ENVIRONMENT=web,node", "-s EXPORTED_RUNTIME_METHODS=[\"ccall\",\"cwrap\",\"addFunction\",\"removeFunction\"]", "-s ALLOW_TABLE_GROWTH=1", "-s ALLOW_MEMORY_GROWTH=1", "-o ../wasm/libocgcore.js" }
if not WASM and SQLITE3_DIR and os.isdir(SQLITE3_DIR) then if not WASM and SQLITE3_DIR and os.isdir(SQLITE3_DIR) then
project "sqlite3" project "sqlite3"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment