Mercurial > hg > orthanc-python
annotate Resources/Builders/MinGW32-Python3.12/docker-internal.sh @ 162:471811c64e48
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 May 2024 23:01:33 +0200 |
parents | bf43db559950 |
children | 5bfe975e5c24 |
rev | line source |
---|---|
160
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 set -ex |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 mkdir /tmp/source-writeable |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 cp -r /source/CMakeLists.txt /tmp/source-writeable/ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 cp -r /source/Sources /tmp/source-writeable/ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 cp -r /source/Resources /tmp/source-writeable/ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 mkdir /tmp/build |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 cd /tmp/build |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 |
a5162d8bd2d4
Added Windows builder 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 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 unzip python-3.12.3-win32.zip |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 if [ "$1" == "Release" ]; then |
162 | 17 LIBRARY_NAME=python312.lib |
160
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 else |
162 | 19 LIBRARY_NAME=python312_d.lib |
160
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 fi |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 cmake /tmp/source-writeable/ \ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 -DCMAKE_BUILD_TYPE=$1 \ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 -DSTATIC_BUILD=ON \ |
161 | 25 -DUSE_LEGACY_BOOST=ON \ |
26 -DPYTHON_VERSION=3.12 \ | |
160
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 -DPYTHON_LIBRARY_NAME=${LIBRARY_NAME} \ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-3.12.3-win32/ \ |
a5162d8bd2d4
Added Windows builder 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 \ |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 -DCMAKE_INSTALL_PREFIX=/target |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 make -j`nproc` |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 if [ "$1" == "Release" ]; then |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 i686-w64-mingw32-strip ./libOrthancPython.dll |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 fi |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
a5162d8bd2d4
Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 make install |