Mercurial > hg > orthanc-stone
comparison Applications/StoneWebViewer/BuildInstructions.txt @ 1859:58681a5c727b
overlay: display ContentDate/ContentTime instead of StudyDate if available + new 'TimeFormat' option
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 20 Sep 2021 17:08:23 +0200 |
parents | |
children | b8f54ab47b3b |
comparison
equal
deleted
inserted
replaced
1858:be88206f8d78 | 1859:58681a5c727b |
---|---|
1 Build & develop instructions | |
2 ============================ | |
3 | |
4 Prerequisites: | |
5 ------------- | |
6 | |
7 - Install the usual build tools to build an Orthanc plugin (a good reference is the orthanc base image Dockerfile): https://github.com/jodogne/OrthancDocker/blob/master/base/Dockerfile | |
8 - Install EMSDK (a good reference is the wasm-builder image Dockerfile): https://github.com/jodogne/OrthancDocker/tree/master/wasm-builder | |
9 | |
10 Create your build environment: | |
11 ----------------------------- | |
12 | |
13 mkdir ~/dev | |
14 cd ~/dev | |
15 hg clone https://hg.orthanc-server.com/orthanc/ | |
16 hg clone https://hg.orthanc-server.com/orthanc-stone/ | |
17 hg clone https://hg.orthanc-server.com/orthanc-dicomweb/ | |
18 mkdir -p ~/dev/build/orthanc | |
19 mkdir -p ~/dev/build/orthanc-dicomweb | |
20 mkdir -p ~/dev/build/wasm-stone-viewer | |
21 mkdir -p ~/dev/build/stone-viewer-plugin | |
22 | |
23 # build orthanc | |
24 cd ~/dev/build/orthanc | |
25 cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_CIVETWEB=OFF -DALLOW_DOWNLOADS=ON ../../orthanc/OrthancServer | |
26 make -j 6 | |
27 | |
28 # build orthanc-dicomweb | |
29 cd ~/dev/build/orthanc-dicomweb | |
30 cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD -DALLOW_DOWNLOADS=ON ../../orthanc-dicomweb | |
31 make -j 6 | |
32 | |
33 # build the StoneViewer WASM code | |
34 cd ~/dev/build/wasm-stone-viewer | |
35 cmake ../../orthanc-stone/Applications/StoneWebViewer/WebAssembly -DLIBCLANG=/usr/lib/x86_64-linux-gnu/libclang-10.so -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DALLOW_DOWNLOADS=ON -G Ninja | |
36 ninja install | |
37 | |
38 # build the StoneViewer Plugin | |
39 cd ~/dev/build/stone-viewer-plugin | |
40 cmake ../../orthanc-stone/Applications/StoneWebViewer/Plugin -DUSE -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON | |
41 make -j 6 | |
42 | |
43 | |
44 Updating the code: | |
45 ----------------- | |
46 | |
47 To avoid rebuilding the plugin everytime you update the HTML/CSS/JS or C++ code from the WebAssembly, you can use the ServeFolders plugin | |
48 to host this part of the code. Here's a sample configuration file that works well for StoneViewer development: | |
49 | |
50 { | |
51 "AuthenticationEnabled": false, | |
52 "HttpPort": 8043, | |
53 "Plugins": [ | |
54 "/home/alain/dev/build/stone-viewer-plugin/libStoneWebViewer.so", | |
55 "/home/alain/dev/build/orthanc-dicomweb/libOrthancDicomWeb.so", | |
56 "/home/alain/dev/build/orthanc/libServeFolders.so" | |
57 ], | |
58 | |
59 "ServeFolders": { | |
60 "/stone-webviewer-live" : "/home/alain/o/orthanc-stone/wasm-binaries/StoneWebViewer/" | |
61 } | |
62 } | |
63 | |
64 Everytime you modify the HTML/CSS/JS or C++ code from the WebAssembly, you don't need to restart Orthanc and can simply run | |
65 cd ~/dev/build/wasm-stone-viewer && ninja install | |
66 Then, the viewer is available on http://localhost:8043/stone-webviewer-live/index.html?study=1.2.3.4.5 | |
67 | |
68 If you modify the plugin code, you must of course rebuild the plugin and restart Orthanc |