# HG changeset patch # User Alain Mazy # Date 1771600598 -3600 # Node ID 51635d3ae75babebe037428fefa12f27f025a0db # Parent 61dfe0cb629b1dcff85fb7e9a31e08cd592fe7e0 fix for microscopy viewer: path to workers diff -r 61dfe0cb629b -r 51635d3ae75b Resources/CreateOHIFDist/build.sh --- a/Resources/CreateOHIFDist/build.sh Fri Feb 20 11:06:19 2026 +0100 +++ b/Resources/CreateOHIFDist/build.sh Fri Feb 20 16:16:38 2026 +0100 @@ -49,7 +49,8 @@ APP_CONFIG=config/default.js QUICK_BUILD=true PUBLIC_URL=./ bun run show:config APP_CONFIG=config/default.js QUICK_BUILD=true PUBLIC_URL=./ bun run build -# # patch files where the PUBLIC_URL was not taken into account +# patch files where the PUBLIC_URL was not taken into account +sed -i "s|var worker = new Worker(workerUrl|var worker = new Worker(new URL(window.location.protocol + '//' + window.location.host + window.location.pathname.replace('microscopy', 'dicom-microscopy-viewer') + '/dataLoader.worker.min.js')|g" /tmp/$1/platform/app/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js sed -i 's|"/assets/android-chrome-|"./assets/android-chrome-|g' /tmp/$1/platform/app/dist/manifest.json cp -r /tmp/$1/platform/app/dist/* /target