comparison Resources/Builders/MinGW32-Python3.8/docker-internal.sh @ 33:ce5b6116e6cd

New builders for Windows: Supporting 32 / 64bit with Python 2.7 / 3.7 / 3.8
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 May 2020 18:05:18 +0200
parents
children fd58eb5749ed
comparison
equal deleted inserted replaced
32:30161a429a91 33:ce5b6116e6cd
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 http://orthanc.osimis.io/ThirdPartyDownloads/Python/python-3.8.3-win32.zip
14 unzip python-3.8.3-win32.zip
15
16 if [ "$1" == "Release" ]; then
17 LIBRARY_NAME=python38.lib
18 else
19 LIBRARY_NAME=python38_d.lib
20 fi
21
22 cmake /tmp/source-writeable/ \
23 -DCMAKE_BUILD_TYPE=$1 \
24 -DSTATIC_BUILD=ON \
25 -DPYTHON_VERSION=3.8 \
26 -DPYTHON_LIBRARY_NAME=${LIBRARY_NAME} \
27 -DPYTHON_WINDOWS_ROOT=/tmp/build/Python-3.8.3-win32/ \
28 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Resources/MinGW-W64-Toolchain32.cmake \
29 -DCMAKE_INSTALL_PREFIX=/target
30
31 make -j`nproc`
32
33 if [ "$1" == "Release" ]; then
34 i686-w64-mingw32-strip ./libOrthancPython.dll
35 fi
36
37 make install