Skip to content

Commit

Permalink
Fix windows build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
martinber committed Oct 14, 2020
1 parent 40620bb commit 6181a66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 9 additions & 4 deletions build/windows-gnu-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use fedora or Arch because mingw64-gtk3 is not available on Debian.
FROM fedora:27
FROM fedora:latest

RUN set -x

Expand All @@ -25,17 +25,22 @@ RUN dnf -y update \
RUN useradd --create-home --shell /bin/bash rustacean
USER rustacean

RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

RUN . ~/.cargo/env && \
rustup install nightly && \
rustup default nightly && \
rustup target add x86_64-pc-windows-gnu

RUN /home/rustacean/.cargo/bin/rustup target add x86_64-pc-windows-gnu
ADD .cargo/config /home/rustacean/.cargo/config

# Build as user rustacean

VOLUME /home/rustacean/src
WORKDIR /home/rustacean/src
ENV PKG_CONFIG_ALLOW_CROSS=1
ENV GTK_INSTALL_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/
ENV PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/

COPY ./entrypoint.sh /home/rustacean/entrypoint.sh
CMD ["/home/rustacean/entrypoint.sh"]
2 changes: 0 additions & 2 deletions build/windows-gnu-docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ NOAA_APT_VERSION=$(awk '/^version =/{print substr($NF, 2, length($NF)-2)}' Cargo
PACKAGES_FOLDER=/home/rustacean/src/target/docker_builds
GUI_PACKAGE_NAME="noaa-apt-$NOAA_APT_VERSION-x86_64-windows-gnu"
GUI_PACKAGE_FOLDER="$PACKAGES_FOLDER/$GUI_PACKAGE_NAME"
# GTK_INSTALL_PATH=/usr/i686-w64-mingw32
GTK_INSTALL_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/

rm -r "$GUI_PACKAGE_FOLDER" || true
mkdir -p "$GUI_PACKAGE_FOLDER"
Expand Down

0 comments on commit 6181a66

Please sign in to comment.