annotate Resources/Builders/MinGW64-Python3.12/docker-compile.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 3678a028f1f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
164
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 if [ "$1" != "Debug" -a "$1" != "Release" ]; then
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 echo "Please provide build type: Debug or Release"
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 exit -1
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 fi
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 if [ -t 1 ]; then
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # TTY is available => use interactive mode
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 DOCKER_FLAGS='-i'
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 fi
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 ROOT_DIR=`dirname $(readlink -f $0)`/../../..
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 mkdir -p ${ROOT_DIR}/docker-build/
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 ( cd ${ROOT_DIR}/Resources/Builders/ && \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 docker build \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 -f ./Dockerfile-MinGW-BuildEnvironment \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 -t mingw-python-build . )
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 docker run -t ${DOCKER_FLAGS} --rm \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 --user $(id -u):$(id -g) \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 -v ${ROOT_DIR}:/source:ro \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 -v ${ROOT_DIR}/docker-build:/target:rw \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 mingw-python-build \
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 bash /source/Resources/Builders/MinGW64-Python3.12/docker-internal.sh $1
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
519e285ce627 hotfix to add Windows builders for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 ls -lR ${ROOT_DIR}/docker-build/