annotate Resources/Builders/MinGW32-Python3.7/docker-compile.sh @ 222:850b56948b9c default tip

back to mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Jul 2024 09:40:21 +0200
parents 3678a028f1f6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
219
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
3 # SPDX-FileCopyrightText: 2020-2023 Osimis S.A., 2024-2024 Orthanc Team SRL, 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
4 # SPDX-License-Identifier: AGPL-3.0-or-later
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
5
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
6 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
7 ## Python plugin for Orthanc
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
8 ## Copyright (C) 2020-2023 Osimis S.A., Belgium
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
9 ## Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
10 ## Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
11 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
12 ## This program is free software: you can redistribute it and/or
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
13 ## modify it under the terms of the GNU Affero General Public License
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
14 ## as published by the Free Software Foundation, either version 3 of
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
15 ## the License, or (at your option) any later version.
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
16 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
17 ## This program is distributed in the hope that it will be useful, but
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
18 ## WITHOUT ANY WARRANTY; without even the implied warranty of
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
20 ## Affero General Public License for more details.
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
21 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
22 ## You should have received a copy of the GNU Affero General Public License
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
23 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
24 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
25
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
26
33
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set -ex
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 if [ "$1" != "Debug" -a "$1" != "Release" ]; then
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 echo "Please provide build type: Debug or Release"
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 exit -1
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 fi
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 if [ -t 1 ]; then
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 # TTY is available => use interactive mode
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 DOCKER_FLAGS='-i'
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 fi
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 ROOT_DIR=`dirname $(readlink -f $0)`/../../..
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 mkdir -p ${ROOT_DIR}/docker-build/
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 ( cd ${ROOT_DIR}/Resources/Builders/ && \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 docker build \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -f ./Dockerfile-MinGW-BuildEnvironment \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -t mingw-python-build . )
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 docker run -t ${DOCKER_FLAGS} --rm \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 --user $(id -u):$(id -g) \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 -v ${ROOT_DIR}:/source:ro \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 -v ${ROOT_DIR}/docker-build:/target:rw \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 mingw-python-build \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 bash /source/Resources/Builders/MinGW32-Python3.7/docker-internal.sh $1
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 ls -lR ${ROOT_DIR}/docker-build/