Mercurial > hg > orthanc-stone
annotate Applications/StoneWebViewer/WebAssembly/docker-internal.sh @ 2115:de049fd88697 deep-learning
integration mainline->deep-learning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 Jan 2024 16:44:40 +0100 |
parents | c23eef785569 |
children | 16c01cc201e7 |
rev | line source |
---|---|
1495
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
3 # Stone of Orthanc |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
5 # Department, University Hospital of Liege, Belgium |
2114
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2084
diff
changeset
|
6 # Copyright (C) 2017-2024 Osimis S.A., Belgium |
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2084
diff
changeset
|
7 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
8 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
9 # This program is free software: you can redistribute it and/or |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
10 # modify it under the terms of the GNU Affero General Public License |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
11 # as published by the Free Software Foundation, either version 3 of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
12 # the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
13 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
14 # This program is distributed in the hope that it will be useful, but |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
15 # WITHOUT ANY WARRANTY; without even the implied warranty of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
17 # Affero General Public License for more details. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
18 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
19 # You should have received a copy of the GNU Affero General Public License |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
20 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
21 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
22 |
1495
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 set -ex |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 source /opt/emsdk/emsdk_env.sh |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 # Use a folder that is writeable by non-root users for the Emscripten cache |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 export EM_CACHE=/tmp/emscripten-cache |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 # Make a copy of the read-only folder containing the source code into |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 # a writeable folder, because of "DownloadPackage.cmake" that writes |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 # to the "ThirdPartyDownloads" folder next to the "CMakeLists.txt" |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 cd /source |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 hg clone /source /tmp/source-writeable |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
1827
21ccc00839f7
upgrade to Emscripten 2.0.23
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
36 cd /tmp/source-writeable |
21ccc00839f7
upgrade to Emscripten 2.0.23
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
37 hg up -c ${STONE_BRANCH} |
21ccc00839f7
upgrade to Emscripten 2.0.23
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
38 |
1495
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 mkdir /tmp/build |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 cd /tmp/build |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
1544 | 42 cmake /tmp/source-writeable/Applications/StoneWebViewer/WebAssembly \ |
1495
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 -DCMAKE_BUILD_TYPE=$1 \ |
1548
65eccce95882
unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1544
diff
changeset
|
44 -DORTHANC_STONE_INSTALL_PREFIX=/target/StoneWebViewer \ |
1495
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 -DSTATIC_BUILD=ON \ |
2084 | 47 -DLIBCLANG=/usr/lib/llvm-4.0/lib/libclang-4.0.so \ |
1495
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 -G Ninja |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 |
fb74ed5d8c22
initial commit of the Stone Web viewer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 ninja -j2 install |