changeset 68:fdf64d580096

updated OHIF to 3.10.1
author Alain Mazy <am@orthanc.team>
date Tue, 15 Apr 2025 15:32:44 +0200
parents 0c6e9ec27580
children 74603a3f3ec5
files NEWS Resources/CreateOHIFDist.sh Resources/CreateOHIFDist/Dockerfile Resources/CreateOHIFDist/build.sh
diffstat 4 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri Jan 17 18:29:04 2025 +0100
+++ b/NEWS	Tue Apr 15 15:32:44 2025 +0200
@@ -1,6 +1,8 @@
 Pending changes in the mainline
 ===============================
 
+* Updated OHIF to 3.10.1
+
 
 Version 1.5 (2025-01-17)
 ========================
--- a/Resources/CreateOHIFDist.sh	Fri Jan 17 18:29:04 2025 +0100
+++ b/Resources/CreateOHIFDist.sh	Tue Apr 15 15:32:44 2025 +0200
@@ -21,14 +21,14 @@
 
 
 
-# This command-line script uses the "yarn" tool to populate the "dist"
+# This command-line script uses the "bun" tool to populate the "dist"
 # folder of OHIF. It uses Docker to this end, in order to be usable on
 # our CIS.
 
 set -ex
 
 if [ "$1" = "" ]; then
-    PACKAGE=Viewers-3.9.2
+    PACKAGE=Viewers-3.10.1
 else
     PACKAGE=$1
 fi
--- a/Resources/CreateOHIFDist/Dockerfile	Fri Jan 17 18:29:04 2025 +0100
+++ b/Resources/CreateOHIFDist/Dockerfile	Tue Apr 15 15:32:44 2025 +0200
@@ -17,10 +17,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-FROM node:21.2-bullseye-slim
+FROM node:20.18.1-slim
 
 MAINTAINER Sebastien Jodogne <s.jodogne@gmail.com>
 LABEL Description="Orthanc, free DICOM server" Vendor="The Orthanc project"
 
-RUN apt-get -y clean && apt-get -y update && \
+RUN apt-get -y clean && apt-get -y update && apt-get install -y build-essential python3 && \
     apt-get clean && rm -rf /var/lib/apt/lists/*
+
+RUN npm install -g bun
\ No newline at end of file
--- a/Resources/CreateOHIFDist/build.sh	Fri Jan 17 18:29:04 2025 +0100
+++ b/Resources/CreateOHIFDist/build.sh	Tue Apr 15 15:32:44 2025 +0200
@@ -30,7 +30,14 @@
 tar xvf /source/$1.tar.gz
 
 cd /tmp/$1
-HOME=/tmp yarn install --frozen-lockfile
-HOME=/tmp QUICK_BUILD=true PUBLIC_URL=./ yarn run build
+bun pm cache rm
+bun install --frozen-lockfile
+
+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
+sed -i 's|/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js|./dicom-microscopy-viewer/dicomMicroscopyViewer.min.js|g' app.bundle.*.js
+sed -i 's|/assets/android-chrome-|./assets/android-chrome-|g' manifest.json
 
 cp -r /tmp/$1/platform/app/dist/* /target