annotate Resources/CreateJavaScriptLibraries/build-o3dv.sh @ 38:970994058acd

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