Skip to content

Commit b7f0e88

Browse files
committed
Fix assets conversion bug. Add running with docker docs
Using Cython < 3.0.10 leads to the runtime errors on assets conversion. Cython >= 3.0.10 shall be used. Update docker build file and add chapter in documentation about running image with Docker. Issue: #1766
1 parent cfeb492 commit b7f0e88

File tree

5 files changed

+49
-3
lines changed

5 files changed

+49
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
3939

4040
# Python and Cython requirements
4141
set(PYTHON_MIN_VERSION 3.9)
42-
set(CYTHON_MIN_VERSION 0.29.31)
42+
set(CYTHON_MIN_VERSION 3.0.10)
4343

4444
# CMake policies
4545
foreach(pol

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ To turn them off, use `./bin/run --dont-segfault --no-errors --dont-eat-dog`.
145145
If this still does not help, try our [troubleshooting guide](/doc/troubleshooting.md), the [contact section](#contact)
146146
or the [bug tracker](https://github.com/SFTtech/openage/issues).
147147

148+
* **Running with Docker**
149+
You can build and run the project using Docker. See [Running with docker](/doc/building.md#running-with-docker)
150+
148151

149152
Contributing
150153
============

doc/build_instructions/ubuntu.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Run the following commands:
77

88
You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies.
99

10+
Notes:
11+
- The project requires at least **Cython 3.0.10** for successful compilation.
12+
Using an older version may result in runtime errors!
13+
1014
# Additional steps for Ubuntu 22.04 LTS
1115

1216
The available system version of Cython is too old in Ubuntu 22.04. You have to get the correct version

doc/building.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Dependency list:
2929

3030
C gcc >=10 or clang >=10
3131
CRA python >=3.9
32-
C cython >=0.29.31
32+
C cython >=3.0.10
3333
C cmake >=3.16
3434
A numpy
3535
A lz4
@@ -162,6 +162,42 @@ The reference package is [created for Gentoo](https://github.com/SFTtech/gentoo-
162162
which will then be packed/installed by your package manager.
163163

164164

165+
### Running with Docker
166+
167+
To simplify the setup process, you can use Docker to build and run the project.
168+
This is particularly useful if you want to avoid installing dependencies
169+
manually. Please note:
170+
- You will need docker installed on your machine. Follow [official documentation
171+
from docker](https://docs.docker.com/) to start.
172+
- The following configuration was tested on Ubuntu 24.04 on WSL2 on Windows 11.
173+
174+
##### Steps to Build and Run
175+
176+
1. **Enable GUI Support**
177+
178+
allow the Docker container to access your X server:
179+
```bash
180+
xhost +local:root
181+
```
182+
183+
2. **Build the Docker Image**
184+
185+
```bash
186+
sudo docker build -t openage -f packaging/docker/devenv/Dockerfile.ubuntu.2404 .
187+
```
188+
189+
3. **Run the Docker Container**
190+
191+
Run docker container and mount necessary X11 socket and .Xauthority file to
192+
enable GUI for openage project.
193+
```bash
194+
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/root/.Xauthority --network host openage
195+
```
196+
197+
After running container just follow regular setup described in
198+
[Development](#development) chapter (you can already skip dependencies
199+
installation) inside your docker image.
200+
165201
### Troubleshooting
166202

167203
- I wanna see compiler invocations

packaging/docker/devenv/Dockerfile.ubuntu.2404

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y sudo \
3636
qt6-multimedia-dev \
3737
qml6-module-qtquick3d-spatialaudio \
3838
&& sudo apt-get clean \
39-
&& truncate -s 0 ~/.bash_history
39+
&& truncate -s 0 ~/.bash_history
40+
41+
# At least cython >= 3.0.10 is required to avoid runtime errors
42+
RUN pip install cython==3.0.10 --break-system-packages

0 commit comments

Comments
 (0)