Mercurial > hg > orthanc-python
annotate Resources/Builders/MinGW32-Python3.10/docker-internal.sh @ 140:b6835b7a7c0a
code generation on Ubuntu 22.04
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 Sep 2023 09:01:26 +0200 |
parents | 6ad5da29f260 |
children | 8335b42be9fc |
rev | line source |
---|---|
111
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 set -ex |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 mkdir /tmp/source-writeable |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 cp -r /source/CMakeLists.txt /tmp/source-writeable/ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 cp -r /source/Sources /tmp/source-writeable/ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 cp -r /source/Resources /tmp/source-writeable/ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 mkdir /tmp/build |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 cd /tmp/build |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 wget https://orthanc.uclouvain.be/third-party-downloads/Python/python-3.10.10-win32.zip |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 unzip python-3.10.10-win32.zip |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 if [ "$1" == "Release" ]; then |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 LIBRARY_NAME=python310.lib |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 else |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 LIBRARY_NAME=python310_d.lib |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 fi |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 cmake /tmp/source-writeable/ \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 -DCMAKE_BUILD_TYPE=$1 \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 -DSTATIC_BUILD=ON \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 -DPYTHON_VERSION=3.10 \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 -DPYTHON_LIBRARY_NAME=${LIBRARY_NAME} \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-3.10.10-win32/ \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 -DCMAKE_INSTALL_PREFIX=/target |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 make -j`nproc` |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 if [ "$1" == "Release" ]; then |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 i686-w64-mingw32-strip ./libOrthancPython.dll |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 fi |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 make install |