mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2024-11-25 15:20:59 +02:00
74 lines
2.1 KiB
Docker
74 lines
2.1 KiB
Docker
# 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 <http://www.gnu.org/licenses/>.
|
|
#
|
|
# @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 prerequisites as djgpp
|
|
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
|
|
|
|
# Stage 2: setup djgpp
|
|
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
|
|
|
|
# Stage 3: compile UMSKT
|
|
FROM djgpp as build
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
WORKDIR /src
|
|
COPY . /src
|
|
|
|
# Build UMSKT from the local directory
|
|
RUN mkdir /src/build \
|
|
&& source /djgpp/setenv \
|
|
&& cmake -DUMSKT_DJGPP_COMPILE=On -DCMAKE_BUILD_TYPE=Release -DCPM_SOURCE_CACHE=`pwd`/.cpm-cache -B build \
|
|
&& cmake --build build -j 10 --verbose
|
|
|
|
CMD ["bash"]
|
|
|
|
# Stage 6: Output
|
|
FROM scratch as output
|
|
|
|
COPY --from=build /src/build/umskt.exe /
|
|
|
|
# invoke via
|
|
# docker build -f Dockerfile.djgpp -o type=tar,dest=build-djgpp/umskt-dos.tar .
|