Mercurial > hg > orthanc-python
annotate Resources/Builders/MinGW64-Python3.12/docker-internal.sh @ 221:8e127a46128e OrthancPython-4.3
OrthancPython-4.3
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Jul 2024 09:37:44 +0200 |
parents | 3678a028f1f6 |
children |
rev | line source |
---|---|
164
519e285ce627
hotfix to add Windows builders for Python 3.12
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:
165
diff
changeset
|
2 |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
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:
165
diff
changeset
|
4 # SPDX-License-Identifier: AGPL-3.0-or-later |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
5 |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
6 ## |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
7 ## Python plugin for Orthanc |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
8 ## Copyright (C) 2020-2023 Osimis S.A., Belgium |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
9 ## Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
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:
165
diff
changeset
|
11 ## |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
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:
165
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:
165
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:
165
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:
165
diff
changeset
|
16 ## |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
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:
165
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:
165
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:
165
diff
changeset
|
20 ## Affero General Public License for more details. |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
21 ## |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
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:
165
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:
165
diff
changeset
|
24 ## |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
25 |
3678a028f1f6
making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
165
diff
changeset
|
26 |
164
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 set -ex |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 mkdir /tmp/source-writeable |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 cp -r /source/CMakeLists.txt /tmp/source-writeable/ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 cp -r /source/Sources /tmp/source-writeable/ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 cp -r /source/Resources /tmp/source-writeable/ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 mkdir /tmp/build |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 cd /tmp/build |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 wget https://orthanc.uclouvain.be/downloads/third-party-downloads/Python/python-3.12.3-win64.zip |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 unzip python-3.12.3-win64.zip |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 if [ "$1" == "Release" ]; then |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 LIBRARY_NAME=python312.lib |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 else |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 LIBRARY_NAME=python312_d.lib |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 fi |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 cmake /tmp/source-writeable/ \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 -DCMAKE_BUILD_TYPE=$1 \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 -DSTATIC_BUILD=ON \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 -DUSE_LEGACY_BOOST=ON \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 -DPYTHON_VERSION=3.12 \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 -DPYTHON_LIBRARY_NAME=${LIBRARY_NAME} \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-3.12.3-win64 \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 -DCMAKE_INSTALL_PREFIX=/target |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 make -j`nproc` |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 if [ "$1" == "Release" ]; then |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 x86_64-w64-mingw32-strip ./libOrthancPython.dll |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 fi |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 make install |