# This file is a part of the UMSKT Project # # Copyleft (C) 2019-2024 UMSKT Contributors (et.al.) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # # @FileCreated by Neo on 06/19/2023 # @Maintainer Neo # Stage 1: Install Prerequisites #FROM ubuntu:latest as prerequisites # Stage 1: Install build dependencies #RUN apt-get update && apt-get -y install \ # build-essential \ # cmake \ # wget \ # 7zip \ # git \ # flex \ # libfl-dev \ # nasm \ # libslang2-dev \ # pkg-config \ # libslang2-modules \ # gcc-multilib \ # && rm -rf /var/lib/apt/lists/* FROM djgpp-prerequisites:latest as djgpp-watt32 SHELL ["/bin/bash", "-c"] WORKDIR / ENV CC=/djgpp/bin/i586-pc-msdosdjgpp-gcc CXX=/djgpp/bin/i586-pc-msdosdjgpp-g++ CMAKE_FIND_ROOT_PATH=/djgpp WATT_ROOT=/djgpp/watt32 # Stage 2: compile WATT32 for D RUN wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2 \ && tar xjf djgpp-linux64-gcc1220.tar.bz2 \ && rm -rf djgpp-linux64-gcc1220.tar.bz2 \ && cd djgpp \ && git clone https://github.com/UMSKT/Watt-32.git watt32 \ && cd watt32/util \ && make clean && make linux \ && cd ../src \ && source /djgpp/setenv \ && ./configur.sh djgpp \ && make -f djgpp.mak \ && ln -s ${WATT_ROOT}/lib/libwatt.a ${CMAKE_FIND_ROOT_PATH}/lib # Stage 3: compile UMSKT FROM djgpp-watt32 as build SHELL ["/bin/bash", "-c"] WORKDIR /src COPY . /src ENV PKG_CONFIG_PATH=/djgpp/lib/pkgconfig VERBOSE=1 # Build UMSKT from the local directory RUN mkdir /src/build \ && cd /src/build \ && source /djgpp/setenv \ && cmake -DDJGPP_WATT32=${WATT_ROOT}/lib/libwatt.a .. \ && make CMD ["bash"] # Stage 6: Output FROM scratch as output COPY --from=build /src/build/umskt.exe /umskt.exe # invoke via # docker build -f Dockerfile.djgpp -o type=tar,dest=build-djgpp/umskt-dos.tar .