Project

General

Profile

Actions

Task #3545

closed

Automate and finish the setup of the Jenkins WASM tinderbox

Added by Jan-Marek Glogowski 10 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Team - Q1/2022
Start date:
Due date:
% Done:

0%

Tags:

Description

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
    • mime.types should contain an entry for application/wasm wasm; to enable browser caching.

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:

tar -chf wasm.tar --xform 's/.*program/lo-wasm/' instdir/program/soffice.* instdir/program/qt*

FYI: this includes the file `qtlogo.svg`, which is shown while downloading the data before running the WASM app. Obviously this can be easily be replaced with whatever "branding" we want to display on load ;-)

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

Eventually one might rename qt_soffice.html to index.html

Actions

Also available in: Atom PDF