annotate Resources/Builders/MinGW32-Python2.7/docker-internal.sh @ 14:13589c36243d OrthancPython-1.0

OrthancPython-1.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Apr 2020 09:45:03 +0200
parents 8ec973ae8d6c
children 2ec8e4cb93d3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 set -ex
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
4 mkdir /tmp/source-writeable
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
5
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
6 cp -r /source/CMakeLists.txt /tmp/source-writeable/
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
7 cp -r /source/Sources /tmp/source-writeable/
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
8 cp -r /source/Resources /tmp/source-writeable/
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
9
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 mkdir /tmp/build
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 cd /tmp/build
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 wget http://orthanc.osimis.io/ThirdPartyDownloads/Python/python-2.7.17-win32.tar.bz2
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 tar xvfj python-2.7.17-win32.tar.bz2
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
16 cmake /tmp/source-writeable/ \
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 -DCMAKE_BUILD_TYPE=$1 \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 -DSTATIC_BUILD=ON \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 -DPYTHON_VERSION=2.7 \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 -DPYTHON_WINDOWS_ROOT=/tmp/build/python-2.7.17-win32/ \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 -DCMAKE_TOOLCHAIN_FILE=/source/Resources/Orthanc/Resources/MinGW-W64-Toolchain32.cmake \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 -DCMAKE_INSTALL_PREFIX=/target
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
24 make -j`nproc`
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 if [ "$1" == "Release" ]; then
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 i686-w64-mingw32-strip ./libOrthancPython.dll
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 fi
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 make install