annotate Resources/CreateJavaScriptLibraries/build-three.sh @ 71:f3bbafc067d0

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