|
1 | 1 | # About |
2 | 2 |
|
3 | 3 | Opus is a work-in-progress Minecraft Discord bot written in C. |
| 4 | +There are two ways to run Opus: |
| 5 | +1. Natively on your machine |
| 6 | +2. Through docker |
4 | 7 |
|
5 | | ---- |
| 8 | +I recommend running opus with the makefile as it is simpler, |
| 9 | +and if you encounter any issues with dependencies, try docker instead. |
6 | 10 |
|
7 | | -## Installation |
8 | 11 |
|
9 | | -You can run Opus using either `Docker` or directly with the `Makefile`. |
| 12 | +## Dependencies |
10 | 13 |
|
11 | | -### Option 1: Docker (Recommended for simplicity) |
12 | | - |
13 | | -- **Docker** is the only dependency required for this option. |
14 | | - |
15 | | -### Option 2: Using Makefile |
| 14 | +##### Using docker |
| 15 | +- just **Docker** |
16 | 16 |
|
| 17 | +##### Running directly |
17 | 18 | If you opt to use the `Makefile` directly, please check the `dependencies` file for a comprehensive list of the project's dependencies. The dependencies listed in the `dependencies` file are for a minimal installation of Alpine Linux. |
18 | 19 |
|
19 | | -> **Note**: If you're using a package-rich distribution like Ubuntu, some dependencies (e.g., `musl-dev` for basic C libraries) may already be installed. |
20 | | -
|
21 | | -#### Required Dependencies (for Makefile option) |
22 | 20 | - **Make** |
23 | 21 | - **Clang** |
24 | 22 | - **Valgrind*** |
25 | | -- **Bash*** <br> <br> <br> |
| 23 | +- **Bash*** |
| 24 | + |
26 | 25 | *required only for running test suite |
27 | | -## Building |
28 | 26 |
|
29 | | -This step is only necessary if you're using Docker to run Opus. |
| 27 | +> **Note**: If you're using a package-rich distribution like Ubuntu, some dependencies in the `dependencies` file (e.g., `musl-dev` for basic C libraries) may already be installed. |
30 | 28 |
|
31 | | -**Build the main image**: |
| 29 | +## Execution |
32 | 30 |
|
33 | | -```bash |
34 | | -docker build -t Opus . |
35 | | -``` |
| 31 | +You can choose to run either the discord bot or the test suite. |
36 | 32 |
|
37 | | -**Build the test suite image**: |
| 33 | +### Build & Run with Docker |
38 | 34 |
|
| 35 | +##### Opus |
39 | 36 | ```bash |
40 | | -docker build --build-arg directory=tests -t Opus/tests . |
| 37 | +docker build -t Opus . |
| 38 | +docker run Opus |
41 | 39 | ``` |
42 | 40 |
|
43 | | -## Running |
44 | | - |
45 | | -You can run Opus either through the `Makefile` or `Docker`. |
46 | | - |
47 | | -### Option 1: Using Makefile (Recommended) |
48 | | - |
49 | | -**Run the main program**: |
50 | | - |
| 41 | +##### Opus test suite |
51 | 42 | ```bash |
52 | | -make run |
| 43 | +docker build --build-arg directory=tests -t Opus/tests . |
| 44 | +docker run Opus/tests |
53 | 45 | ``` |
54 | 46 |
|
55 | | -**Run the test suite** (navigate to `tests` directory first): |
| 47 | +### Makefile |
56 | 48 |
|
| 49 | +The command to run the test suite is the same as running the program, |
| 50 | +but to run tests you must be in the `tests` directory. |
57 | 51 | ```bash |
58 | 52 | make run |
59 | 53 | ``` |
60 | | - |
61 | | -### Option 2: Using Docker |
62 | | - |
63 | | -**Run the main program**: |
64 | | - |
65 | | -```bash |
66 | | -docker run Opus |
67 | | -``` |
68 | | - |
69 | | -**Run the test suite**: |
70 | | - |
71 | | -```bash |
72 | | -docker run Opus/tests |
73 | | -``` |
0 commit comments