WASM rename executable and copy missing data files from core

* add dependency on soffice.html.linkdeps to rebuild if core was rebuilt
* copy needed data files as-is from core build
* rename executable by setting automake EXEEXT var - appears to work

Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I458b49290dae9d621a8043b1b3103d8b8fd606b8
pull/5711/head
Michael Stahl 2022-12-12 17:40:15 +01:00 committed by Andras Timar
parent b248787bfa
commit db532e12d0
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,6 @@
EXEEXT = .js
noinst_LIBRARIES = libonline.a
libonline_a_SOURCES = \
@ -49,9 +51,12 @@ bin_PROGRAMS = online
online_SOURCES = wasmapp.cpp
online_DEPENDENCIES = \
@LOBUILDDIR@/instdir/program/soffice.html.linkdeps \
online.data \
online.data.js.metadata \
libonline.a
# note cannot add .linkdeps to DEPENDENCIES because it contains -lFoo
# note cannot add content of .linkdeps to DEPENDENCIES because it contains -lFoo
online_LDADD = \
libonline.a \
${POCOLIB}/libPocoEncodings@POCODEBUG@.a \
@ -68,3 +73,7 @@ online_LDADD = \
online_LDFLAGS = \
-pthread -s USE_PTHREADS=1 -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4 --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap","FS"] -pthread -s USE_PTHREADS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s EXPORTED_FUNCTIONS=["_main","_libreofficekit_hook","_libreofficekit_hook_2","_lok_preinit","_lok_preinit_2"] \
--pre-js @LOBUILDDIR@/workdir/CustomTarget/static/emscripten_fs_image/soffice.data.js.link
online.dat%: @LOBUILDDIR@/instdir/program/soffice.dat%
cp $< $@