From 2594dd3ddae3eb2e7a965a2b91709d061a53acb1 Mon Sep 17 00:00:00 2001 From: Tristan Timmermans Date: Thu, 20 Feb 2020 10:20:03 +0100 Subject: [PATCH] Buildscripts for windows executables --- docker/Dockerfile-python3-x64 | 11 +++++++++++ docker/Dockerfile-python3-x86 | 11 +++++++++++ docker/build.sh | 5 +++++ docker/docker-compose.yml | 18 ++++++++++++++++++ docker/run.sh | 3 +++ 5 files changed, 48 insertions(+) create mode 100644 docker/Dockerfile-python3-x64 create mode 100644 docker/Dockerfile-python3-x86 create mode 100644 docker/build.sh create mode 100644 docker/docker-compose.yml create mode 100644 docker/run.sh diff --git a/docker/Dockerfile-python3-x64 b/docker/Dockerfile-python3-x64 new file mode 100644 index 0000000..7a43264 --- /dev/null +++ b/docker/Dockerfile-python3-x64 @@ -0,0 +1,11 @@ +FROM cdrx/pyinstaller-windows:python3 + +RUN apt-get update -y +RUN pip install --upgrade PyQt5 +RUN pip install --upgrade sip +RUN mkdir /app +COPY run.sh /app + +WORKDIR /src +RUN chmod uga+x /app/run.sh +CMD ["/app/run.sh"] diff --git a/docker/Dockerfile-python3-x86 b/docker/Dockerfile-python3-x86 new file mode 100644 index 0000000..4011bd9 --- /dev/null +++ b/docker/Dockerfile-python3-x86 @@ -0,0 +1,11 @@ +FROM cdrx/pyinstaller-windows:python3-32bit + +RUN apt-get update -y +RUN pip install --upgrade PyQt5 +RUN pip install --upgrade sip +RUN mkdir /app +COPY run.sh /app + +WORKDIR /src +RUN chmod uga+x /app/run.sh +CMD ["/app/run.sh"] diff --git a/docker/build.sh b/docker/build.sh new file mode 100644 index 0000000..025f051 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,5 @@ +docker-compose build +docker-compose run python3-x64 +mv ../bin/apim.exe ../bin/apim-python3-Qt5-x64.exe +docker-compose run python3-x86 +mv ../bin/apim.exe ../bin/apim-python3-Qt5-x86-32bit.exe diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..ddf9621 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" +services: + python3-x64: + build: + context: . + dockerfile: Dockerfile-python3-x64 + volumes: + - ../src/:/src/ + - ../bin/:/dist/ + - ../build/:/build/ + python3-x86: + build: + context: . + dockerfile: Dockerfile-python3-x86 + volumes: + - ../src/:/src/ + - ../bin/:/dist/ + - ../build/:/build/ diff --git a/docker/run.sh b/docker/run.sh new file mode 100644 index 0000000..1e229db --- /dev/null +++ b/docker/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd /src/ +pyinstaller --onefile --distpath /dist/ --workpath /build/ apim.py