Mercurial > hg > orthanc-python
annotate Resources/Builders/MinGW32-Python3.12/docker-internal.sh @ 174:e9be3c9294d4 java-code-model
[IMPORTANT] replaced old auto-generated code with Java code model
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Jun 2024 18:02:06 +0200 |
parents | 5bfe975e5c24 |
children | 3678a028f1f6 |
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 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 set -ex |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 mkdir /tmp/source-writeable |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 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
|
7 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
|
8 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
|
9 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 mkdir /tmp/build |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 cd /tmp/build |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 wget https://orthanc.uclouvain.be/downloads/third-party-downloads/Python/python-3.12.3-win32.zip |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 unzip python-3.12.3-win32.zip |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 if [ "$1" == "Release" ]; then |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 LIBRARY_NAME=python312.lib |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 else |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 LIBRARY_NAME=python312_d.lib |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 fi |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 cmake /tmp/source-writeable/ \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 -DCMAKE_BUILD_TYPE=$1 \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 -DSTATIC_BUILD=ON \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 -DUSE_LEGACY_BOOST=ON \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 -DPYTHON_VERSION=3.12 \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 -DPYTHON_LIBRARY_NAME=${LIBRARY_NAME} \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-3.12.3-win32/ \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake \ |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 -DCMAKE_INSTALL_PREFIX=/target |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 make -j`nproc` |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 if [ "$1" == "Release" ]; then |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 i686-w64-mingw32-strip ./libOrthancPython.dll |
519e285ce627
hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 fi |
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 make install |