From e61b1df5fe0a7d830c50f2aa4a566c2f556cccc3 Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Fri, 5 Apr 2024 15:10:03 +0200 Subject: [PATCH] - export exceptions --- CMakeLists.txt | 5 +++-- dev/em-web.sh | 21 +++++++++++++++++++ examples/vue-copasi-ts/src/views/HomeView.vue | 6 ++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 dev/em-web.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c58669..c8eb6b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,8 +56,9 @@ add_executable(copasijs src/copasijs.cpp src/copasijs.h src/) target_link_libraries(copasijs PUBLIC embind) set(CMAKE_EXECUTABLE_SUFFIX ".js") -set(COPASIJS_OPT_FLAGS "-Os") -# set(COPASIJS_OPT_FLAGS "-O3") +set(COPASIJS_OPT_FLAGS "-Os -sNO_DISABLE_EXCEPTION_CATCHING -fexceptions") +# set(COPASIJS_OPT_FLAGS "-O3 -g -sASSERTIONS=2 -sNO_DISABLE_EXCEPTION_CATCHING -fexceptions") + set (WASM_FILE) if (COPASIJS_SINGLE_FILE) diff --git a/dev/em-web.sh b/dev/em-web.sh new file mode 100755 index 0000000..b9c9e33 --- /dev/null +++ b/dev/em-web.sh @@ -0,0 +1,21 @@ + +INSTALL_PREFIX=dist-web +export export ENVIRONMENT="web" +rm -rf $INSTALL_PREFIX + + +# execute the build script +./dev/em-build.sh + + +# copy the example files +cp examples/node/*.js $INSTALL_PREFIX + +# copy test files +cp test/*.js $INSTALL_PREFIX + +# run tests +cd $INSTALL_PREFIX +node test_node.js ../example_files/oscli.xml + +ls -l . \ No newline at end of file diff --git a/examples/vue-copasi-ts/src/views/HomeView.vue b/examples/vue-copasi-ts/src/views/HomeView.vue index 3e59982..0228a14 100644 --- a/examples/vue-copasi-ts/src/views/HomeView.vue +++ b/examples/vue-copasi-ts/src/views/HomeView.vue @@ -57,11 +57,17 @@ onMounted(async () => {