comparison Resources/Builders/MinGW64-Python3.12/docker-internal.sh @ 164:519e285ce627 OrthancPython-4.2

hotfix to add Windows builders for Python 3.12
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 May 2024 23:09:09 +0200
parents
children 5bfe975e5c24
comparison
equal deleted inserted replaced
158:5adf2e1186ab 164:519e285ce627
1 #!/bin/bash
2 set -ex
3
4 mkdir /tmp/source-writeable
5
6 cp -r /source/CMakeLists.txt /tmp/source-writeable/
7 cp -r /source/Sources /tmp/source-writeable/
8 cp -r /source/Resources /tmp/source-writeable/
9
10 mkdir /tmp/build
11 cd /tmp/build
12
13 wget https://orthanc.uclouvain.be/downloads/third-party-downloads/Python/python-3.12.3-win64.zip
14 unzip python-3.12.3-win64.zip
15
16 if [ "$1" == "Release" ]; then
17 LIBRARY_NAME=python312.lib
18 else
19 LIBRARY_NAME=python312_d.lib
20 fi
21
22 cmake /tmp/source-writeable/ \
23 -DCMAKE_BUILD_TYPE=$1 \
24 -DSTATIC_BUILD=ON \
25 -DUSE_LEGACY_BOOST=ON \
26 -DPYTHON_VERSION=3.12 \
27 -DPYTHON_LIBRARY_NAME=${LIBRARY_NAME} \
28 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-3.12.3-win64 \
29 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake \
30 -DCMAKE_INSTALL_PREFIX=/target
31
32 make -j`nproc`
33
34 if [ "$1" == "Release" ]; then
35 x86_64-w64-mingw32-strip ./libOrthancPython.dll
36 fi
37
38 make install