mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-28 06:57:37 +00:00
feat(docker): Use parallel compilation
This commit is contained in:
parent
4c754b376c
commit
8acfe39e4c
@ -18,6 +18,10 @@ RUN unzip cmake-3.26.6-windows-i386.zip -d ~/.wine/drive_c
|
|||||||
RUN mv ~/.wine/drive_c/cmake-3.26.6-windows-i386 ~/.wine/drive_c/cmake
|
RUN mv ~/.wine/drive_c/cmake-3.26.6-windows-i386 ~/.wine/drive_c/cmake
|
||||||
RUN rm cmake-3.26.6-windows-i386.zip
|
RUN rm cmake-3.26.6-windows-i386.zip
|
||||||
|
|
||||||
|
RUN wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip
|
||||||
|
RUN unzip ninja-win.zip -d ~/.wine/drive_c
|
||||||
|
RUN rm ninja-win.zip
|
||||||
|
|
||||||
# Set up entrypoint script to perform the build
|
# Set up entrypoint script to perform the build
|
||||||
COPY entrypoint.sh entrypoint.sh
|
COPY entrypoint.sh entrypoint.sh
|
||||||
RUN chmod +x entrypoint.sh
|
RUN chmod +x entrypoint.sh
|
||||||
|
|||||||
@ -3,17 +3,20 @@
|
|||||||
# Populate the Windows path inside of the wineprefix
|
# Populate the Windows path inside of the wineprefix
|
||||||
# TODO: This is in here because writing to the registry seems
|
# TODO: This is in here because writing to the registry seems
|
||||||
# to fail when performed in the Dockerfile itself; investigate
|
# to fail when performed in the Dockerfile itself; investigate
|
||||||
wine reg ADD 'HKCU\Environment' /v PATH /d 'C:\msvc\bin;C:\msvc\bin\winnt;C:\cmake\bin;C:\windows\system32' /f
|
wine reg ADD 'HKCU\Environment' /v PATH /d 'C:\msvc\bin;C:\msvc\bin\winnt;C:\cmake\bin;C:\windows\system32;C:\' /f
|
||||||
wine reg ADD 'HKCU\Environment' /v INCLUDE /d 'C:\msvc\include;C:\msvc\mfc\include' /f
|
wine reg ADD 'HKCU\Environment' /v INCLUDE /d 'C:\msvc\include;C:\msvc\mfc\include' /f
|
||||||
wine reg ADD 'HKCU\Environment' /v LIB /d 'C:\msvc\lib;C:\msvc\mfc\lib' /f
|
wine reg ADD 'HKCU\Environment' /v LIB /d 'C:\msvc\lib;C:\msvc\mfc\lib' /f
|
||||||
wine reg ADD 'HKCU\Environment' /v TMP /d 'Z:\build' /f
|
wine reg ADD 'HKCU\Environment' /v TMP /d 'Z:\build' /f
|
||||||
wine reg ADD 'HKCU\Environment' /v TEMP /d 'Z:\build' /f
|
wine reg ADD 'HKCU\Environment' /v TEMP /d 'Z:\build' /f
|
||||||
|
|
||||||
# Configure build with CMake
|
# Configure build with CMake
|
||||||
wine cmake -B build isle -G "NMake Makefiles" $CMAKE_FLAGS
|
wine cmake -B build isle -G "Ninja" $CMAKE_FLAGS
|
||||||
|
|
||||||
# Start compiling LEGO Island
|
# Start compiling LEGO Island
|
||||||
wine cmake --build build
|
if [ "x$JOBS" = "x" ]; then
|
||||||
|
JOBS=$(nproc)
|
||||||
|
fi
|
||||||
|
wine cmake --build build --parallel $JOBS
|
||||||
|
|
||||||
# Unlock directories
|
# Unlock directories
|
||||||
chmod -R 777 isle build
|
chmod -R 777 isle build
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user