This repository was archived by the owner on Sep 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1- FROM ubuntu:16 .04
1+ FROM ubuntu:18 .04
22LABEL Description="Rust compile env for Linux + Windows (cross)"
33
44RUN apt update
5- RUN apt install -y build-essential mingw-w64 gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf curl vim wget
5+ RUN apt install -y build-essential mingw-w64 gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf curl vim wget git
66
77# Get Rust
88RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain none -y
@@ -33,13 +33,12 @@ ENV CC_armv7_unknown_linux_gnueabhihf="arm-linux-gnueabihf-gcc"
3333RUN cd /opt && wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.17-mingw.tar.gz && \
3434 tar xvf libsodium-1.0.17-mingw.tar.gz
3535
36- RUN apt install -y git
37-
3836# Cargo fetch the dependencies so we don't download them over and over again
3937RUN cd /tmp && git clone --depth=1 https://github.com/adityapk00/zecwallet-light-cli.git && \
4038 cd zecwallet-light-cli && \
4139 cargo fetch && \
4240 cd /tmp && rm -rf zecwallet-light-cli
4341
4442# This is a bug fix for the windows cross compiler for Rust.
45- RUN cp /usr/x86_64-w64-mingw32/lib/crt2.o /root/.rustup/toolchains/1.46.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/crt2.o
43+ # RUN cp /usr/x86_64-w64-mingw32/lib/crt2.o /root/.rustup/toolchains/1.49.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/crt2.o
44+
Original file line number Diff line number Diff line change @@ -45,9 +45,6 @@ rm -rf target/macOS-zecwallet-cli-v$APP_VERSION
4545mkdir -p target/macOS-zecwallet-cli-v$APP_VERSION
4646cp target/release/zecwallet-cli target/macOS-zecwallet-cli-v$APP_VERSION /
4747
48- # For Windows and Linux, build via docker
49- docker run --rm -v $( pwd) /:/opt/zecwallet-light-cli rustbuild:latest bash -c " cd /opt/zecwallet-light-cli && cargo build --release && cargo build --release --target armv7-unknown-linux-gnueabihf && cargo build --release --target aarch64-unknown-linux-gnu && SODIUM_LIB_DIR='/opt/libsodium-win64/lib/' cargo build --release --target x86_64-pc-windows-gnu"
50-
5148# Now sign and zip the binaries
5249# macOS
5350gpg --batch --output target/macOS-zecwallet-cli-v$APP_VERSION /zecwallet-cli.sig --detach-sig target/macOS-zecwallet-cli-v$APP_VERSION /zecwallet-cli
5855zip -r macOS-zecwallet-cli-v$APP_VERSION .zip macOS-zecwallet-cli-v$APP_VERSION
5956cd ..
6057
58+ # For Windows and Linux, build via docker
59+ docker run --rm -v $( pwd) /:/opt/zecwallet-light-cli rustbuild:latest bash -c " cd /opt/zecwallet-light-cli && cargo build --release && cargo build --release --target armv7-unknown-linux-gnueabihf && cargo build --release --target aarch64-unknown-linux-gnu && SODIUM_LIB_DIR='/opt/libsodium-win64/lib/' cargo build --release --target x86_64-pc-windows-gnu"
6160
6261# Linux
6362rm -rf target/linux-zecwallet-cli-v$APP_VERSION
You can’t perform that action at this time.
0 commit comments