Skip to content

Commit

Permalink
Remove git submodule for ohif (#808)
Browse files Browse the repository at this point in the history
Signed-off-by: Sachidanand Alle <[email protected]>
  • Loading branch information
SachidanandAlle authored May 27, 2022
1 parent b94ac7b commit ad2e081
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "plugins/ohif/Viewers"]
path = plugins/ohif/Viewers
url = https://github.com/OHIF/Viewers.git
1 change: 0 additions & 1 deletion plugins/ohif/Viewers
Submodule Viewers deleted from 460fde
20 changes: 11 additions & 9 deletions plugins/ohif/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ echo "My Dir: ${my_dir}"
echo "Installing OHIF at: ${install_dir}"

cd ${my_dir}
git submodule update --init

rm -rf Viewers
git clone https://github.com/OHIF/Viewers.git
cd Viewers
git checkout 460fdeb534cd94bff55892c8e3d7100ccf8957de

# Viewers/platform/viewer/public/config/default.js
git checkout -- ./platform/viewer/public/config/default.js
#git checkout -- ./platform/viewer/public/config/default.js
sed -i "s|routerBasename: '/'|routerBasename: '/ohif/'|g" ./platform/viewer/public/config/default.js
sed -i "s|name: 'DCM4CHEE'|name: 'Orthanc'|g" ./platform/viewer/public/config/default.js
sed -i "s|https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado|/proxy/dicom/wado|g" ./platform/viewer/public/config/default.js
sed -i "s|https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs|/proxy/dicom|g" ./platform/viewer/public/config/default.js

# Viewers/platform/viewer/.env
git checkout -- ./platform/viewer/.env
#git checkout -- ./platform/viewer/.env
sed -i "s|PUBLIC_URL=/|PUBLIC_URL=/ohif/|g" ./platform/viewer/.env

# monailabel plugin
Expand All @@ -45,7 +46,7 @@ rm monai-label
ln -s ../../monai-label monai-label
cd ..

git checkout -- ./platform/viewer/src/index.js
#git checkout -- ./platform/viewer/src/index.js
sed -i "s|let config = {};|import OHIFMONAILabelExtension from '@ohif/extension-monai-label';\nlet config = {};|g" ./platform/viewer/src/index.js
sed -i "s|defaultExtensions: \[|defaultExtensions: \[OHIFMONAILabelExtension,|g" ./platform/viewer/src/index.js

Expand All @@ -55,16 +56,17 @@ rm -rf ./Viewers/platform/viewer/dist
QUICK_BUILD=true yarn run build

# Reset if you want to run directly from yarn run dev:orthanc (without monailabel server)
git checkout -- platform/viewer/.env
git checkout -- platform/viewer/public/config/default.js
git checkout -- yarn.lock
#git checkout -- platform/viewer/.env
#git checkout -- platform/viewer/public/config/default.js
#git checkout -- yarn.lock

cd ..

rm -rf ${install_dir}
mv ./Viewers/platform/viewer/dist ${install_dir}
echo "Copied OHIF to ${install_dir}"

rm -rf Viewers
git restore Viewers
#git restore Viewers

cd ${curr_dir}

0 comments on commit ad2e081

Please sign in to comment.