Project

General

Profile

Task #3545

Updated by Jan-Marek Glogowski about 3 years ago

The goal is to have a tinderbox, which builds the feature/wasm branch, deploys a package to the "daily builds" directory and serves the latest WASM build statically. This webserver can easily be separate from the TB. 

 Now that LODE is patched to setup the WASM build environment, a few steps are needed for an automated setup via Salt: 

 Lode changes for WASM 

 * lode/init.sls 
 ** lode-pkg eventually needs wget 
 ** No libreoffice build dependencies are needed 
 ** Default branch is feature/wasm 
 ** setup needs the additional option --wasm-local 

 Static webserver setup 

 * nginx/* 
 ** See https://doc.qt.io/qt-6/wasm.html ; search Multithreading 
 ** Two additional headers must be served for thread support: 
 *** add_header Cross-Origin-Opener-Policy same-origin 
 *** add_header Cross-Origin-Embedder-Policy require-corp 
 ** https is needed for the browser clipboard API 

 For the actual build we need to: 

 * source ${LODE_HOME}/emsdk/emsdk_env.sh 
 * export QT5DIR=${LODE_HOME}/qt5/qtbase 
 * Run autogen.sh --with-distro LibreOfficeWASM32 (AKA --host=wasm64-local-emscripten) 
 * Run make 

 All the required files can be bundled via: 
 <pre> 
 tar -chf wasm.tar --xform 's/.*program/lo-wasm/' instdir/program/soffice.* instdir/program/qt* 
 </pre> 

 For a debug build xz saves ~1/3 compared to gzip. 

 Eventually one might rename qt_soffice.html to index.html

Back