-
Notifications
You must be signed in to change notification settings - Fork 70
[VS6] add Dockerfile and docker-compose to build the code #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
14c5400
2da991c
6e994bd
8ac2694
7140d2f
2b9a53e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
FROM debian:12.9-slim | ||
tintinhamans marked this conversation as resolved.
Show resolved
Hide resolved
PiecePaperCode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
WORKDIR /build | ||
|
||
# Install utils | ||
RUN apt update \ | ||
&& apt install wget gpg unzip git -y \ | ||
&& dpkg --add-architecture i386 | ||
|
||
# Install wine | ||
RUN mkdir -pm755 /etc/apt/keyrings \ | ||
&& (wget -O - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -) \ | ||
&& wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources \ | ||
&& apt update \ | ||
&& apt install --no-install-recommends winehq-stable -y | ||
|
||
# Clean up APT | ||
RUN apt clean \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't work as it is here, you need to run the cleanup as part of the other RUN commands that perform apt operations. The results of previous run operations become baked into the image as read only layers. |
||
&& rm -rf /var/lib/apt/lists/* \ | ||
PiecePaperCode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
WORKDIR /build/tools/ | ||
|
||
# Install cmake windows | ||
RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-windows-x86_64.zip \ | ||
&& unzip cmake-3.31.6-windows-x86_64.zip -d /build/tools/ \ | ||
&& mv /build/tools/cmake-3.31.6-windows-x86_64 /build/tools/cmake | ||
|
||
# Install git windows | ||
RUN wget https://github.com/git-for-windows/git/releases/download/v2.49.0-rc1.windows.1/MinGit-2.49.0-rc1-64-bit.zip \ | ||
&& unzip MinGit-2.49.0-rc1-64-bit.zip -d /build/tools/ \ | ||
tintinhamans marked this conversation as resolved.
Show resolved
Hide resolved
|
||
&& mv /build/tools/cmd /build/tools/git | ||
tintinhamans marked this conversation as resolved.
Show resolved
Hide resolved
PiecePaperCode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Install Visual Studio 6 Portable | ||
RUN wget https://github.com/itsmattkc/MSVC600/archive/refs/heads/master.zip \ | ||
&& unzip master.zip -d /build/tools \ | ||
&& mv /build/tools/MSVC600-master/ /build/tools/vs6 | ||
|
||
# Clean up downloads | ||
RUN find /build/tools/ -name "*.zip" -exec rm -f {} + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again this needs to be part of the previous runs (one for each that downloads a zip) if the idea is to save space in the image as the result of the previous run become read only. |
||
|
||
WORKDIR /build | ||
|
||
# Setup wine prefix | ||
ENV WINEDEBUG=-all | ||
ENV WINEARCH=win64 | ||
ENV WINEPREFIX=/build/prefix64 | ||
|
||
# Create empty TEMP folder for linking | ||
RUN mkdir /build/tmp | ||
ENV TMP="Z:\\build\\tmp" | ||
PiecePaperCode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ENV TEMP="Z:\\build\\tmp" | ||
ENV TEMPDIR="Z:\\build\\tmp" | ||
|
||
# Setup Visual Studio 6 Environment variables | ||
ENV VS="Z:\\build\\tools\\vs6" | ||
ENV MSVCDir="$VS\\vc98" | ||
ENV WINEPATH="C:\\windows\\system32;\ | ||
$VS\\vc98\\bin;\ | ||
$VS\\vc98\\lib;\ | ||
$VS\\vc98\\include;\ | ||
$VS\\common\\Tools;\ | ||
$VS\\common\\MSDev98\\bin" | ||
ENV LIB="$VS\\vc98\\Lib;$VS\\vc98\\MFC\\Lib;Z:\\build\\cnc\\build\\vc6" | ||
ENV INCLUDE="$VS\\vc98\\ATL\\INCLUDE;\ | ||
$VS\\vc98\\INCLUDE;\ | ||
$VS\\vc98\\MFC\\INCLUDE;\ | ||
$VS\\vc98\\Include" | ||
ENV CC="$VS\\vc98\\bin\\CL.exe" | ||
ENV CXX="$VS\\vc98\\bin\\CL.exe" | ||
|
||
WORKDIR /build/cnc | ||
|
||
# Copy Source code | ||
ENV GIT_VERSION_STRING="2.49.0" | ||
# Enable if you dont build with docker compose | ||
# COPY . . | ||
WORKDIR /build/cnc | ||
VOLUME /build/cnc | ||
|
||
# Compile | ||
CMD wineboot \ | ||
&& wine /build/tools/cmake/bin/cmake.exe \ | ||
--preset vc6 \ | ||
PiecePaperCode marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-DCMAKE_SYSTEM="Windows" \ | ||
-DCMAKE_SYSTEM_NAME="Windows" \ | ||
-DCMAKE_SIZEOF_VOID_P=4 \ | ||
-DCMAKE_MAKE_PROGRAM="Z:/build/tools/vs6/vc98/bin/nmake.exe" \ | ||
-DCMAKE_C_COMPILER="Z:/build/tools/vs6/vc98/bin/cl.exe" \ | ||
-DCMAKE_CXX_COMPILER="Z:/build/tools/vs6/vc98/bin/cl.exe" \ | ||
-DGIT_EXECUTABLE="Z:/build/tools/git/git.exe" \ | ||
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ | ||
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ | ||
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ | ||
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \ | ||
-DCMAKE_C_COMPILER_WORKS=1 \ | ||
-DCMAKE_CXX_COMPILER_WORKS=1 \ | ||
-B /build/cnc/build/docker \ | ||
&& cd /build/cnc/build/docker \ | ||
&& wine cmd /c "set TMP=Z:\build\tmp& set TEMP=Z:\build\tmp& Z:\build\tools\vs6\VC98\Bin\NMAKE.exe" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
services: | ||
builder: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- "./:/build/cnc" |
Uh oh!
There was an error while loading. Please reload this page.