annotate Resources/Builders/MinGW32-Python2.7/docker-internal.sh @ 227:9574f06d8588 default tip

todo
author Alain Mazy <am@orthanc.team>
date Tue, 24 Sep 2024 08:54:11 +0200
parents 3678a028f1f6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
219
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
2
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
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: 163
diff changeset
4 # SPDX-License-Identifier: AGPL-3.0-or-later
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
5
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
6 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
7 ## Python plugin for Orthanc
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
8 ## Copyright (C) 2020-2023 Osimis S.A., Belgium
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
9 ## Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
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: 163
diff changeset
11 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
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: 163
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: 163
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: 163
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: 163
diff changeset
16 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
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: 163
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: 163
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: 163
diff changeset
20 ## Affero General Public License for more details.
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
21 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
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: 163
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: 163
diff changeset
24 ##
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
25
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 163
diff changeset
26
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set -ex
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
29 mkdir /tmp/source-writeable
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
30
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
31 cp -r /source/CMakeLists.txt /tmp/source-writeable/
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
32 cp -r /source/Sources /tmp/source-writeable/
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
33 cp -r /source/Resources /tmp/source-writeable/
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
34
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 mkdir /tmp/build
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 cd /tmp/build
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
148
8335b42be9fc migration to UCLouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 111
diff changeset
38 wget https://orthanc.uclouvain.be/downloads/third-party-downloads/Python/python-2.7.17-win32.tar.bz2
18
2ec8e4cb93d3 fix missing python in mingw32 builder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 9
diff changeset
39 tar xfj python-2.7.17-win32.tar.bz2
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
41 cmake /tmp/source-writeable/ \
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 -DCMAKE_BUILD_TYPE=$1 \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 -DSTATIC_BUILD=ON \
163
54991a36af1d fix mingw builds that are not compatible with boost 1.85.0 in the Docker image
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 148
diff changeset
44 -DUSE_LEGACY_BOOST=ON \
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DPYTHON_VERSION=2.7 \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-2.7.17-win32/ \
36
fd58eb5749ed CMake simplification using DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 18
diff changeset
47 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake \
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 -DCMAKE_INSTALL_PREFIX=/target
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
50 make -j`nproc`
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 if [ "$1" == "Release" ]; then
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 i686-w64-mingw32-strip ./libOrthancPython.dll
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 fi
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 make install