Mercurial > hg > orthanc-ohif
changeset 85:51635d3ae75b
fix for microscopy viewer: path to workers
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Fri, 20 Feb 2026 16:16:38 +0100 |
| parents | 61dfe0cb629b |
| children | cf6c6f330e6f b82f12c20a5d |
| files | Resources/CreateOHIFDist/build.sh |
| diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
