-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build-x64
50 lines (43 loc) · 3.49 KB
/
Dockerfile.build-x64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update --fix-missing
RUN apt update && apt -y install wine git git-lfs vim make autoconf libtool cmake libxinerama-dev libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxkbcommon-dev libxcb-xv0-dev x11-xserver-utils perl rsync zip unzip libwayland-dev libxext-dev libxcb-xinput-dev libpulse-dev libasound2-dev valgrind gdb gcc g++ g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 python3 pip python3-dev python3-wheel python3-requests
RUN apt update && apt -y install libwayland-egl-backend-dev tzdata libwayland-cursor0 wayland-scanner++ waylandpp-dev libwayland-cursor0 wayland-scanner++ mlocate libudev-dev libdecor-0-dev
RUN python3 -m pip install -U Cython pywildcard
RUN apt update && apt install -y ca-certificates
RUN updatedb
RUN mkdir -p /home && mkdir -p /tmp/
ADD . /home/hvm.horse64.org/
RUN cd /home/hvm.horse64.org && rm -f ./horserun
RUN cd /home && git clone https://codeberg.org/Horse64/core.horse64.org && cd /home/core.horse64.org && python3 translator/make_cython.py
RUN echo "#!/bin/bash\n\
make veryclean\n\
echo ''\n\
echo 'Starting windows-x64-mingw builds...'\n\
echo '===================================='\n\
RELEASE_BUILD=yes DONT_MARK_AS_DEV_VERSION="$DONT_MARK_AS_DEV_VERSION" HORSERUN="../core.horse64.org/translator/horsec_run.py" make build-windows-x64 || { echo 'Failed windows build.'; exit 1; }\n\
echo 'Copying Windows x64 build result...'\n\
cp ./output/HVM.exe '../volume-output/HVM (windows-x64-mingw).exe' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/HVM-headless.exe '../volume-output/HVM-headless (windows-x64-mingw).exe' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/hasm.exe '../volume-output/hasm (windows-x64-mingw).exe' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/HVM.dll '../volume-output/HVM (windows-x64-mingw).dll' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/HVM-headless.dll '../volume-output/HVM-headless (windows-x64-mingw).dll' || { echo "Failed to copy result."; exit 1; }\n\
echo ''\n\
echo 'Cleaning up...'\n\
echo '=============='\n\
make depsclean\n\
echo ''\n\
echo 'Starting linux-x64-glibc build...'\n\
echo '================================='\n\
RELEASE_BUILD=yes DONT_MARK_AS_DEV_VERSION="$DONT_MARK_AS_DEV_VERSION" HORSERUN="../core.horse64.org/translator/horsec_run.py" make build-deps-graphical || { echo 'Failed to rebuild deps for Linux build.'; exit 1; }\n\
RELEASE_BUILD=yes DONT_MARK_AS_DEV_VERSION="$DONT_MARK_AS_DEV_VERSION" HORSERUN="../core.horse64.org/translator/horsec_run.py" make || { echo 'Failed Linux build.'; exit 1; }\n\
echo 'Copying linux-x64-glibc build result...'\n\
cp ./output/HVM.bin '../volume-output/HVM (linux-x64-glibc)'.bin || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/HVM-headless.bin '../volume-output/HVM-headless (linux-x64-glibc).bin' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/hasm.bin '../volume-output/hasm (linux-x64-glibc).exe' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/HVM.so '../volume-output/HVM (linux-x64-glibc).so' || { echo "Failed to copy result."; exit 1; }\n\
cp ./output/HVM-headless.so '../volume-output/HVM-headless (linux-x64-glibc).so || { echo "Failed to copy result."; exit 1; }'\n\
echo 'Done!'" > /home/hvm.horse64.org/docker-build.sh
VOLUME /home/hvm.horse64.org/build/
WORKDIR /home/hvm.horse64.org/
CMD [ "bash", "/home/hvm.horse64.org/docker-build.sh" ]