|
1 | | -2. **0 A.D. AppImage herunterladen und extrahieren:** |
| 1 | +Okay, here is the `README.md` content in English: |
2 | 2 |
|
3 | | -https://github.com/0ad-matters/0ad-appimage/releases |
| 3 | +```markdown |
| 4 | +# Docker 0 A.D. Mod Testbed |
4 | 5 |
|
5 | | - ```bash |
6 | | - ./0ad-0.27.0-linux-x86_64.AppImage --appimage-extract |
7 | | - mv squashfs-root 0ad-extracted |
8 | | - ``` |
| 6 | +This project aims to provide an isolated and reproducible testing environment for developing mods for the open-source real-time strategy game 0 A.D. |
9 | 7 |
|
10 | | -3. **Docker Image (duration maybe 1 minute): ** |
| 8 | +## Current Status |
11 | 9 |
|
12 | | - ```bash |
13 | | - docker build -t 0ad . |
14 | | - ``` |
| 10 | +Currently, this project enables: |
15 | 11 |
|
16 | | -4. **Docker Container ausführen:** |
| 12 | +* Running 0 A.D. inside a Docker container. |
| 13 | +* Easily mounting the extracted 0 A.D. AppImage into the container. |
| 14 | +* Using Docker Volumes for persistent storage of configuration data and mods (in the future). |
17 | 15 |
|
18 | | - Führe den Docker Container mit den folgenden Parametern aus: |
| 16 | +## Future Goals |
19 | 17 |
|
20 | | - ```bash |
21 | | - xhost +local:docker #Sicherheitshinweis: Besser eine restriktivere Regel verwenden |
| 18 | +The long-term goals of this project are: |
22 | 19 |
|
23 | | - docker run --rm -it \ |
24 | | - -e DISPLAY=$DISPLAY \ |
25 | | - --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ |
26 | | - --device /dev/snd \ |
27 | | - -e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \ |
28 | | - -v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \ |
29 | | - -e ALSA_PCM_NAME=default \ |
30 | | - --device /dev/dri \ |
31 | | - --group-add video \ |
32 | | - -v $(pwd)/0ad-extracted:/game \ |
33 | | - 0ad |
34 | | - ``` |
| 20 | +* **Automated Testing:** To enable automated testing for mods, including GUI tests (e.g., using Selenium or Cypress). |
| 21 | +* **Reproducible Builds:** To ensure that mods can be built in a consistent and reproducible environment. |
| 22 | +* **Isolated Development:** To provide an isolated development environment where mod developers can make changes without affecting their host system. |
| 23 | +* **Easy Deployment:** To simplify the deployment of mods for the 0 A.D. community. |
| 24 | +* **CI/CD Integration:** To enable integration with CI/CD (Continuous Integration/Continuous Deployment) pipelines for automated testing and builds of mods. |
| 25 | +* **Support for Different 0 A.D. Versions:** To support different 0 A.D. versions, allowing mods to be tested and developed for specific versions of the game. |
| 26 | +* **User-Friendly Configuration:** To provide an easy way to configure the testing environment, such as through environment variables or configuration files. |
35 | 27 |
|
36 | | - **Erläuterung der `docker run`-Parameter:** |
| 28 | +## Usage |
37 | 29 |
|
38 | | - * `--rm`: Entfernt den Container automatisch, wenn er beendet wird. |
39 | | - * `-it`: Startet den Container interaktiv. |
40 | | - * `-e DISPLAY=$DISPLAY`: Übergibt die DISPLAY-Variable von deinem Host-System an den Container. Dies ist wichtig, damit das Spiel auf deinem Bildschirm angezeigt wird. |
41 | | - * `--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw"`: Mountet den X11-Socket, der für die grafische Anzeige benötigt wird. |
42 | | - * `--device /dev/snd`: Aktiviert Audio. |
43 | | - * `-e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native`, `-v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native`, `-e ALSA_PCM_NAME=default`: Weitere Audio-Konfigurationen (können je nach System variieren). |
44 | | - * `--device /dev/dri`: Aktiviert den direkten Rendering Infrastructure (DRI) Zugriff für die Grafikkarte. |
45 | | - * `--group-add video`: Fügt den Container zur `video`-Gruppe hinzu, um Zugriff auf die Grafikkarte zu ermöglichen. |
46 | | - * `-v $(pwd)/0ad-extracted:/game`: **Wichtig:** Mountet das extrahierte 0 A.D. Verzeichnis in den `/game`-Ordner im Container. |
| 30 | +(This section should contain detailed instructions on how to use the project, including prerequisites, steps to build the Docker image, and steps to run the container. This guide should be based on the current state of the project.) |
47 | 31 |
|
48 | | - **Sicherheitshinweis (`xhost +local:docker`):** |
| 32 | +## Structure |
49 | 33 |
|
50 | | - Der Befehl `xhost +local:docker` erlaubt es dem Docker-Container, sich mit deinem X-Server zu verbinden. **Dies kann ein Sicherheitsrisiko darstellen.** Es ist besser, eine restriktivere Regel zu verwenden, wenn möglich. Alternativ kannst du versuchen, die Berechtigungen für den X-Server anders zu konfigurieren. |
| 34 | +(This section should contain a description of the project structure, including the role of each file and directory.) |
51 | 35 |
|
52 | | -## Konfiguration und Mods |
| 36 | +## Contributing |
53 | 37 |
|
54 | | -* **Docker Volumes:** Die Konfiguration und Mods werden in Docker Volumes gespeichert. Das bedeutet, dass sie persistent sind, auch wenn der Container gestoppt oder entfernt wird. |
55 | | -* **Kein Host-Mounting:** Es werden *keine* Host-Verzeichnisse für die Konfiguration oder Mods gemountet. |
56 | | -* **Erster Start:** Beim ersten Start des Containers werden die Standardkonfigurationen und Mods in die Volumes kopiert. |
57 | | -* **Zugriff auf die Volumes:** Um auf die Konfiguration oder Mods zuzugreifen, musst du in den Container einsteigen: |
| 38 | +(This section should contain instructions on how others can contribute to this project, such as by reporting bugs, submitting pull requests, or donating resources.) |
58 | 39 |
|
59 | | - ```bash |
60 | | - docker ps # Um die Container-ID zu finden |
61 | | - docker exec -it <container_id> bash |
62 | | - ``` |
| 40 | +## License |
63 | 41 |
|
64 | | - Innerhalb des Containers findest du die Konfigurationen unter `/var/0ad/config` und die Mods unter `/var/0ad/mods`. Du kannst diese Dateien mit einem Texteditor bearbeiten. |
65 | | - |
66 | | -* **Docker Volume inspizieren:** Um herauszufinden, wo die Daten der Volumes auf dem Host-System gespeichert sind, verwende den Befehl: |
67 | | - |
68 | | - ```bash |
69 | | - docker volume inspect <volume_name> |
70 | | - ``` |
71 | | - |
72 | | - (Um die Volume-Namen herauszufinden, kannst du `docker volume ls` verwenden.) |
73 | | - |
74 | | -## Anpassung |
75 | | - |
76 | | -* **Dockerfile:** Das `Dockerfile` kann angepasst werden, um zusätzliche Pakete zu installieren oder andere Änderungen am Container vorzunehmen. |
77 | | -* **`docker-entrypoint.sh`:** Das `docker-entrypoint.sh` Skript kann angepasst werden, um das Spiel mit verschiedenen Parametern zu starten oder andere Aktionen beim Start des Containers auszuführen. |
78 | | - |
79 | | -## Bekannte Probleme |
80 | | - |
81 | | -* **Audio:** Die Audio-Konfiguration kann je nach System variieren. Wenn du keinen Ton hast, musst du möglicherweise die Audio-Parameter im `docker run`-Befehl anpassen. |
82 | | -* **Performance:** Die Ausführung von 0 A.D. in einem Docker-Container kann etwas langsamer sein als die direkte Ausführung auf dem Host-System. |
83 | | - |
84 | | -## Lizenz |
85 | | - |
86 | | -Dieses Projekt ist unter der [MIT Lizenz](LICENSE) lizenziert. (Füge eine `LICENSE`-Datei hinzu, wenn du eine Lizenz hinzufügen möchtest). |
| 42 | +(This section should contain the license for the project.) |
87 | 43 | ``` |
88 | 44 |
|
89 | | -**Erklärungen:** |
| 45 | +**Explanation:** |
90 | 46 |
|
91 | | -* **Markdown-Formatierung:** Die Datei ist im Markdown-Format geschrieben, das in Git-Repositories weit verbreitet ist. |
92 | | -* **Schritt-für-Schritt-Anleitung:** Die `README.md` enthält eine klare Schritt-für-Schritt-Anleitung, wie man das Dockerfile benutzt. |
93 | | -* **Erklärung der Parameter:** Die wichtigsten `docker run`-Parameter werden erklärt. |
94 | | -* **Sicherheitshinweise:** Der Sicherheitshinweis zu `xhost` wird hervorgehoben. |
95 | | -* **Konfiguration und Mods:** Der Abschnitt über Konfiguration und Mods erklärt, wie die Docker Volumes verwendet werden und wie man auf die Daten zugreifen kann. |
96 | | -* **Anpassungsmöglichkeiten:** Die `README.md` weist auf die Möglichkeiten zur Anpassung des Dockerfiles und des `docker-entrypoint.sh` Skripts hin. |
97 | | -* **Bekannte Probleme:** Die bekannten Probleme (Audio und Performance) werden erwähnt. |
| 47 | +* **Clear Goals:** The `README.md` clearly describes the goals of the project and what it aims to achieve. |
| 48 | +* **Current Status:** The "Current Status" section describes what the project can currently do. |
| 49 | +* **Future Goals:** The "Future Goals" section provides a vision for the future of the project and what it will accomplish in the future. |
| 50 | +* **Structure and Contributing:** The "Structure" and "Contributing" sections are placeholders for future information. |
98 | 51 |
|
99 | | -Du kannst diese `README.md` verwenden, um anderen zu helfen, dein Projekt zu verstehen und zu verwenden. |
| 52 | +You can use this `README.md` as a starting point and fill it with more detailed instructions and information as the project evolves. |
0 commit comments