mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 04:13:01 +02:00
Nixpkgs Implementation (and Docker Improvement) (#1881)
* Fix Dockerfile would not complete due to interactivity being enabled. * Added docker-compose.yml to build with `docker-compose up`. * Removed Lua 5.2 from Dockerfile. * Add BUILD_CORSIXTH cmake flag for disabling building the main program, e.g. if you only want AnimView
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -101,3 +101,7 @@ CorsixTH/CorsixTH.sln
|
|||||||
# Default build path
|
# Default build path
|
||||||
CorsixTH/CorsixTH
|
CorsixTH/CorsixTH
|
||||||
CorsixTH/corsix-th
|
CorsixTH/corsix-th
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
*.so
|
||||||
|
/result*
|
||||||
|
@@ -39,6 +39,7 @@ include(CheckIncludeFiles)
|
|||||||
set(CORSIX_TH_DONE_TOP_LEVEL_CMAKE ON)
|
set(CORSIX_TH_DONE_TOP_LEVEL_CMAKE ON)
|
||||||
|
|
||||||
# Define our options
|
# Define our options
|
||||||
|
option(BUILD_CORSIXTH "Builds the main game" ON)
|
||||||
option(WITH_AUDIO "Activate sound" ON)
|
option(WITH_AUDIO "Activate sound" ON)
|
||||||
option(WITH_FREETYPE2 "Enhanced font support" ON)
|
option(WITH_FREETYPE2 "Enhanced font support" ON)
|
||||||
option(WITH_MOVIES "Activate in game movies" ON)
|
option(WITH_MOVIES "Activate in game movies" ON)
|
||||||
@@ -125,9 +126,11 @@ message("")
|
|||||||
message("Building common libraries")
|
message("Building common libraries")
|
||||||
add_subdirectory("libs")
|
add_subdirectory("libs")
|
||||||
|
|
||||||
# We always build CorsixTH otherwise we would miss the generated header
|
# We build CorsixTH if BUILD_CORSIXTH is set. This is set by default and should generally be set.
|
||||||
message("Building CorsixTH")
|
if(BUILD_CORSIXTH)
|
||||||
add_subdirectory(CorsixTH)
|
message("Building CorsixTH")
|
||||||
|
add_subdirectory(CorsixTH)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_ANIMVIEW)
|
if(BUILD_ANIMVIEW)
|
||||||
message("Building AnimView")
|
message("Building AnimView")
|
||||||
|
@@ -3,6 +3,23 @@ FROM ubuntu:latest
|
|||||||
|
|
||||||
WORKDIR /sourcecode
|
WORKDIR /sourcecode
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y build-essential cmake git liblua5.2-0 liblua5.2-dev libsdl2-dev libsdl2-mixer-dev timidity libfreetype6-dev lua-filesystem lua-lpeg doxygen liblua5.3-0 liblua5.3-0-dbg liblua5.3-dev ffmpeg libavcodec-dev libavformat-dev libavresample-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
CMD mkdir build && cd build && cmake -DUSE_SOURCE_DATADIRS=ON .. && make
|
RUN apt-get -y update
|
||||||
|
|
||||||
|
RUN apt-get install -y \
|
||||||
|
# Base Tools
|
||||||
|
build-essential cmake git doxygen \
|
||||||
|
# LUA
|
||||||
|
liblua5.3-0 liblua5.3-0-dbg liblua5.3-dev \
|
||||||
|
lua-filesystem lua-lpeg \
|
||||||
|
# SDL2
|
||||||
|
libsdl2-dev libsdl2-mixer-dev \
|
||||||
|
# AV
|
||||||
|
ffmpeg timidity \
|
||||||
|
libavformat-dev libavresample-dev libavdevice-dev libavutil-dev libavfilter-dev libavcodec-dev \
|
||||||
|
libpostproc-dev libswscale-dev libswresample-dev \
|
||||||
|
# Font
|
||||||
|
libfreetype6-dev
|
||||||
|
|
||||||
|
CMD mkdir -p build && cd build && cmake -DUSE_SOURCE_DATADIRS=ON .. && make
|
||||||
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
corsix-th:
|
||||||
|
container_name: corsix-th
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.build
|
||||||
|
volumes:
|
||||||
|
- .:/sourcecode
|
Reference in New Issue
Block a user