mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Merge pull request #2 from VPeruS/docker-build
[build] Added configuration to allow building in container
This commit is contained in:
commit
12597294d9
4 changed files with 62 additions and 0 deletions
|
|
@ -88,6 +88,12 @@ sudo pacman -S sdl2 glew glm openssl cmake base-devel \
|
||||||
stormlib # for asset_extract
|
stormlib # for asset_extract
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Container build
|
||||||
|
You can use podman to build application in separate container.
|
||||||
|
- Install podman
|
||||||
|
- Then run `container/build-in-container.sh`
|
||||||
|
- Artifacts can be found in `/tmp/wowee.[random value].[commit hash]`
|
||||||
|
|
||||||
### Game Data
|
### Game Data
|
||||||
|
|
||||||
This project requires WoW client data that you extract from your own legally obtained install.
|
This project requires WoW client data that you extract from your own legally obtained install.
|
||||||
|
|
|
||||||
19
container/build-in-container.sh
Executable file
19
container/build-in-container.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||||
|
|
||||||
|
podman build \
|
||||||
|
-f "${SCRIPT_DIR}/builder-ubuntu.Dockerfile" \
|
||||||
|
-t wowee-builder-ubuntu
|
||||||
|
|
||||||
|
BUILD_DIR="$(mktemp --tmpdir -d wowee.XXXXX \
|
||||||
|
--suffix=".$(cd "${PROJECT_ROOT}"; git rev-parse --short HEAD)")"
|
||||||
|
podman run \
|
||||||
|
--mount "type=bind,src=${PROJECT_ROOT},dst=/WoWee-src,ro=true" \
|
||||||
|
--mount "type=bind,src=${BUILD_DIR},dst=/build" \
|
||||||
|
localhost/wowee-builder-ubuntu \
|
||||||
|
./build-wowee.sh
|
||||||
14
container/build-wowee.sh
Executable file
14
container/build-wowee.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
cp -r /WoWee-src /WoWee
|
||||||
|
|
||||||
|
pushd /WoWee
|
||||||
|
./build.sh
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd /WoWee/build
|
||||||
|
cmake --install . --prefix=/build
|
||||||
|
popd
|
||||||
23
container/builder-ubuntu.Dockerfile
Normal file
23
container/builder-ubuntu.Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt install -y \
|
||||||
|
cmake \
|
||||||
|
build-essential \
|
||||||
|
pkg-config \
|
||||||
|
git \
|
||||||
|
libsdl2-dev \
|
||||||
|
libglew-dev \
|
||||||
|
libglm-dev \
|
||||||
|
libssl-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libavformat-dev \
|
||||||
|
libavcodec-dev \
|
||||||
|
libswscale-dev \
|
||||||
|
libavutil-dev \
|
||||||
|
libstorm-dev && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY build-wowee.sh /
|
||||||
|
|
||||||
|
ENTRYPOINT ./build-wowee.sh
|
||||||
Loading…
Add table
Add a link
Reference in a new issue