Mercurial > hg > orthanc-stone
annotate Applications/Samples/WebAssembly/docker-internal.sh @ 1768:226718777702
fix DicomVolumeImageMPRSlicer::Slice::CreateSceneLayer() for opposite normals
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 May 2021 17:18:39 +0200 |
parents | 9ac2a65d4172 |
children | 3889ae96d2e9 |
rev | line source |
---|---|
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
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 |
1739
9ac2a65d4172
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
6 # Copyright (C) 2017-2021 Osimis S.A., Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
7 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
8 # 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
|
9 # 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
|
10 # 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
|
11 # the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
12 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
13 # 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
|
14 # WITHOUT ANY WARRANTY; without even the implied warranty of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
16 # Affero General Public License for more details. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
17 # |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
18 # 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
|
19 # 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
|
20 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
21 |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 set -ex |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 source /opt/emsdk/emsdk_env.sh |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 # Use a folder that is writeable by non-root users for the Emscripten cache |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 export EM_CACHE=/tmp/emscripten-cache |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 # Get the Orthanc framework |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 cd /tmp/ |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 hg clone https://hg.orthanc-server.com/orthanc/ |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
1494
5a3ef478deb6
reverted useless change
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
33 # Make a copy of the read-only folder containing the source code into |
5a3ef478deb6
reverted useless change
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
34 # a writeable folder, because of "DownloadPackage.cmake" that writes |
5a3ef478deb6
reverted useless change
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
35 # to the "ThirdPartyDownloads" folder next to the "CMakeLists.txt" |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 cd /source |
1493
c9bdf73a8817
fix docker-internal.sh for CIS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1492
diff
changeset
|
37 hg clone /source /tmp/source-writeable |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 mkdir /tmp/build |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 cd /tmp/build |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
1542 | 42 cmake /tmp/source-writeable/Applications/Samples/WebAssembly \ |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
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:
1542
diff
changeset
|
44 -DORTHANC_STONE_INSTALL_PREFIX=/target \ |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ |
1530 | 46 -DORTHANC_FRAMEWORK_ROOT=/tmp/orthanc/OrthancFramework/Sources \ |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 -DSTATIC_BUILD=ON \ |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 -G Ninja |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 ninja -j2 install |