Mercurial > hg > orthanc-stone
annotate Applications/Samples/WebAssembly/docker-internal.sh @ 1896:b3c08e607d9f
simplified signature of DicomStructureSet::ProjectStructure()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Jan 2022 17:19:37 +0100 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
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 |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 # Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
7 # Copyright (C) 2021-2022 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 |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 set -ex |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 source /opt/emsdk/emsdk_env.sh |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 # 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
|
28 export EM_CACHE=/tmp/emscripten-cache |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 # Get the Orthanc framework |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 cd /tmp/ |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 hg clone https://hg.orthanc-server.com/orthanc/ |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
1494
5a3ef478deb6
reverted useless change
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
34 # 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
|
35 # a writeable folder, because of "DownloadPackage.cmake" that writes |
5a3ef478deb6
reverted useless change
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1493
diff
changeset
|
36 # 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
|
37 cd /source |
1493
c9bdf73a8817
fix docker-internal.sh for CIS
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1492
diff
changeset
|
38 hg clone /source /tmp/source-writeable |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 mkdir /tmp/build |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 cd /tmp/build |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 |
1542 | 43 cmake /tmp/source-writeable/Applications/Samples/WebAssembly \ |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 -DCMAKE_BUILD_TYPE=$1 \ |
1548
65eccce95882
unifying the default install prefix for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1542
diff
changeset
|
45 -DORTHANC_STONE_INSTALL_PREFIX=/target \ |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ |
1530 | 47 -DORTHANC_FRAMEWORK_ROOT=/tmp/orthanc/OrthancFramework/Sources \ |
1492
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 -DSTATIC_BUILD=ON \ |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 -G Ninja |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 |
4b5ec9ea268e
Building WebAssembly samples using Docker
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 ninja -j2 install |