Mercurial > hg > orthanc-stl
comparison Resources/CreateThreeDist/build.sh @ 0:4e889a8e8be2
initial commit of the viewer plugin
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Jul 2023 19:15:27 +0200 |
parents | |
children | dd0cd39e6259 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4e889a8e8be2 |
---|---|
1 #!/bin/bash | |
2 | |
3 # SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium | |
4 # SPDX-License-Identifier: GPL-3.0-or-later | |
5 | |
6 # STL plugin for Orthanc | |
7 # Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium | |
8 # | |
9 # This program is free software: you can redistribute it and/or | |
10 # modify it under the terms of the GNU General Public License as | |
11 # published by the Free Software Foundation, either version 3 of the | |
12 # License, or (at your option) any later version. | |
13 # | |
14 # This program is distributed in the hope that it will be useful, but | |
15 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 # General Public License for more details. | |
18 # | |
19 # You should have received a copy of the GNU General Public License | |
20 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | |
22 set -ex | |
23 | |
24 if [ "$1" = "" ]; then | |
25 echo "Please provide the source package of Three.js" | |
26 exit -1 | |
27 fi | |
28 | |
29 cd /tmp/ | |
30 tar xvf /source/$1.tar.gz | |
31 | |
32 cd /tmp/$1 | |
33 npm install --cache /tmp/npm-cache | |
34 npm run build --cache /tmp/npm-cache | |
35 | |
36 cp -r /tmp/$1/build/three.module.min.js /target/ | |
37 | |
38 cp /tmp/$1/editor/js/libs/es-module-shims.js /target/ | |
39 cp /tmp/$1/examples/jsm/controls/OrbitControls.js /target/ | |
40 cp /tmp/$1/examples/jsm/loaders/STLLoader.js /target/ |