annotate Resources/Builders/MinGW32-Python3.7/docker-internal.sh @ 111:6ad5da29f260 OrthancPython-4.0

added Windows builders for Python 3.9, 3.10 and 3.11
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Mar 2023 17:27:06 +0200
parents c17cdaf687e3
children 8335b42be9fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 set -ex
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 mkdir /tmp/source-writeable
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 cp -r /source/CMakeLists.txt /tmp/source-writeable/
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 cp -r /source/Sources /tmp/source-writeable/
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 cp -r /source/Resources /tmp/source-writeable/
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 mkdir /tmp/build
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 cd /tmp/build
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
111
6ad5da29f260 added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
13 wget https://orthanc.uclouvain.be/third-party-downloads/Python/python-3.7.7-win32.zip
33
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 unzip python-3.7.7-win32.zip
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 cmake /tmp/source-writeable/ \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 -DCMAKE_BUILD_TYPE=$1 \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 -DSTATIC_BUILD=ON \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 -DPYTHON_VERSION=3.7 \
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-3.7.7-win32/ \
36
fd58eb5749ed CMake simplification using DownloadOrthancFramework.cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 33
diff changeset
21 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake \
33
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 -DCMAKE_INSTALL_PREFIX=/target
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 make -j`nproc`
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 if [ "$1" == "Release" ]; then
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 i686-w64-mingw32-strip ./libOrthancPython.dll
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 fi
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
ce5b6116e6cd New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 make install