-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SAPP-develop' of https://github.com/decenomy/DSW
- Loading branch information
Showing
34 changed files
with
3,594 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Use a base image (Ubuntu 18.04) | ||
# FROM ubuntu:18.04 | ||
FROM ubuntu@sha256:dca176c9663a7ba4c1f0e710986f5a25e672842963d95b960191e2d9f7185ebe | ||
|
||
# Set arguments | ||
ARG CPU_CORES=1 | ||
ARG TARGET=develop | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=UTC | ||
ENV QT_RCC_TEST=1 | ||
ENV QT_RCC_SOURCE_DATE_OVERRIDE=1 | ||
ENV ZERO_AR_DATE=1 | ||
ENV WRAP_DIR=/wrapped | ||
ENV HOSTS="x86_64-linux-gnu aarch64-linux-gnu x86_64-apple-darwin14 x86_64-w64-mingw32" | ||
ENV FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy gcc g++" | ||
ENV FAKETIME_PROGS="ar ranlib nm strip objcopy gcc g++ date zip wine wine64 dmg genisoimage tar" | ||
|
||
|
||
# Update and install necessary packages | ||
RUN dpkg --add-architecture i386 && \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
curl=7.58.0-2ubuntu3.24 \ | ||
git=1:2.17.1-1ubuntu0.18 \ | ||
zip=3.0-11build1 \ | ||
faketime=0.9.7-2 \ | ||
build-essential=12.4ubuntu1 \ | ||
libtool=2.4.6-2 \ | ||
bsdmainutils=11.1.2ubuntu1 \ | ||
autotools-dev=20180224.1 \ | ||
autoconf=2.69-11 \ | ||
pkg-config=0.29.1-0ubuntu2 \ | ||
automake=1:1.15.1-3ubuntu2 \ | ||
python3=3.6.7-1~18.04 \ | ||
g++-aarch64-linux-gnu=4:7.4.0-1ubuntu2.3 \ | ||
g++-8-aarch64-linux-gnu=8.4.0-1ubuntu1~18.04cross2 \ | ||
gcc-8-aarch64-linux-gnu=8.4.0-1ubuntu1~18.04cross2 \ | ||
binutils-aarch64-linux-gnu=2.30-21ubuntu1~18.04.9 \ | ||
g++-8-multilib=8.4.0-1ubuntu1~18.04 \ | ||
gcc-8-multilib=8.4.0-1ubuntu1~18.04 \ | ||
python3-dev=3.6.7-1~18.04 \ | ||
python3-setuptools=39.0.1-2ubuntu0.1 \ | ||
fonts-tuffy=20120614-2 \ | ||
libcap-dev=1:2.25-1.2 \ | ||
libz-dev \ | ||
libbz2-dev=1.0.6-8.1ubuntu0.2 \ | ||
imagemagick=8:6.9.7.4+dfsg-16ubuntu6.15 \ | ||
cmake=3.10.2-1ubuntu2.18.04.2 \ | ||
librsvg2-bin=2.40.20-2ubuntu0.2 \ | ||
libtiff-tools=4.0.9-5ubuntu0.10 \ | ||
mingw-w64=5.0.3-1 \ | ||
xvfb=2:1.19.6-1ubuntu4.15 \ | ||
wine32=3.0-1ubuntu1 \ | ||
wine64=3.0-1ubuntu1 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set POSIX for x86_64-w64-mingw32-g++ alternatives config | ||
RUN echo "1" | update-alternatives --config x86_64-w64-mingw32-g++ | ||
|
||
# use a fixed date | ||
RUN echo -n "2000-01-01 12:00:00" > /git_timestamp | ||
RUN echo -n "200001011200.00" > /git_timestamp_touch | ||
|
||
# Compile the depends folder using a deterministic timestamp | ||
|
||
RUN mkdir -p ${WRAP_DIR} | ||
|
||
RUN for prog in ${FAKETIME_PROGS}; \ | ||
do \ | ||
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}; \ | ||
echo -n "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 " >> ${WRAP_DIR}/${prog}; \ | ||
echo -n "FAKETIME=\"\$(cat /git_timestamp)\" " >> ${WRAP_DIR}/${prog}; \ | ||
echo "\$(which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -n 1) \"\$@\"" >> ${WRAP_DIR}/${prog}; \ | ||
chmod +x ${WRAP_DIR}/${prog}; \ | ||
done | ||
|
||
RUN for host in $HOSTS; \ | ||
do \ | ||
for prog in ${FAKETIME_HOST_PROGS}; \ | ||
do \ | ||
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${host}-${prog}; \ | ||
echo -n "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 " >> ${WRAP_DIR}/${host}-${prog}; \ | ||
echo -n "FAKETIME=\"\$(cat /git_timestamp)\" " >> ${WRAP_DIR}/${host}-${prog}; \ | ||
echo "\$(which -a ${host}-${prog} | grep -v ${WRAP_DIR}/${host}-${prog} | head -n 1) \"\$@\"" >> ${WRAP_DIR}/${host}-${prog}; \ | ||
chmod +x ${WRAP_DIR}/${host}-${prog}; \ | ||
done \ | ||
done | ||
|
||
# Clone the repository | ||
RUN git clone https://github.com/decenomy/DSW.git | ||
|
||
WORKDIR /DSW | ||
|
||
# Check out a specific version if needed | ||
RUN git checkout -B $TARGET | ||
RUN git pull origin $TARGET | ||
|
||
# --- macos --- | ||
# Install the MacOS SDK | ||
RUN mkdir -p /DSW/depends/SDKs | ||
WORKDIR /DSW/depends/SDKs | ||
|
||
RUN curl -LO https://github.com/decenomy/depends/raw/main/SDKs/MacOSX10.11.sdk.tar.xz | ||
RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz | ||
RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz | ||
RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz | ||
# --- --- --- | ||
|
||
# --- windows --- | ||
# Set the Inno Setup compiler | ||
WORKDIR /DSW/contrib/innosetup | ||
|
||
ENV DISPLAY=:99 | ||
RUN Xvfb :99 -screen 0 1024x768x16 -nolisten tcp & | ||
|
||
RUN Xvfb :99 -screen 0 1024x768x16 -nolisten tcp & \ | ||
wine innosetup-6.1.2.exe /VERYSILENT /NORESTART /ALLUSERS /SUPPRESSMSGBOXES /SP /LOG=setup.log && \ | ||
wine idpsetup-1.5.1.exe /VERYSILENT /NORESTART /ALLUSERS /SUPPRESSMSGBOXES /SP /LOG=setup.log | ||
|
||
RUN rm /tmp/.X99-lock | ||
# --- --- --- | ||
|
||
# Switch to the repository directory | ||
WORKDIR /DSW/depends | ||
|
||
# Builds the dependencies in the depends folder | ||
RUN for host in $HOSTS; \ | ||
do \ | ||
PATH=${WRAP_DIR}:${PATH} make -j$(echo $CPU_CORES) HOST=${host}; \ | ||
done | ||
|
||
# Set the work dir to the root folder | ||
WORKDIR / | ||
|
||
# Set the entry point if you want to interact within the container | ||
ENTRYPOINT ["bash"] | ||
|
||
# Build it with: | ||
# docker build --build-arg CPU_CORES=<num_cores> --build-arg TARGET=<branch> -t decenomy/dsw-develop-builder -f Dockerfile.dsw-develop-builder . | ||
# Publish with: | ||
# docker login | ||
# docker push decenomy/dsw-develop-builder:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.