File: Readme.md

package info (click to toggle)
warzone2100 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 660,348 kB
  • sloc: cpp: 675,711; ansic: 387,204; javascript: 75,107; python: 16,628; php: 4,294; sh: 3,941; makefile: 2,330; lisp: 1,492; cs: 489; xml: 404; perl: 224; ruby: 156; java: 89
file content (43 lines) | stat: -rw-r--r-- 1,235 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# How to build the docker images:

In the root of the WZ repo:
- `docker build -f docker/<subdir>/Dockerfile -t <build_image_name> .`

For example:
```shell
docker build -f docker/ubuntu-20.04/Dockerfile -t ubuntu .
```

For more information, see the documentation on [`docker build`](https://docs.docker.com/engine/reference/commandline/build/).

# How to build Warzone 2100 using the docker image:

Beware of line ending mismatch between Windows and Linux when cloning repo.

### Ubuntu

- via CMake
```shell
docker run --rm -v $(pwd):/code <build_image_name> cmake '-H.' -Bbuild -DCMAKE_BUILD_TYPE=Debug -G"Ninja"
docker run --rm -v $(pwd):/code <build_image_name> cmake --build build
```

### Cross-compile (for Windows)

- via CMake
```shell
docker run --rm -v $(pwd):/code <build_image_name> i686-w64-mingw32.static-cmake '-H.' -Bbuild -DCMAKE_BUILD_TYPE=Debug -G"Ninja"
docker run --rm -v $(pwd):/code <build_image_name> cmake --build build --target package
```
This will build the full Windows (portable) installer package.

# Tips

### Using CMake

The examples above build `DEBUG` builds.

To build a Release mode build (with debugging symbols), change:
- `-DCMAKE_BUILD_TYPE=Debug`
to:
- `-DCMAKE_BUILD_TYPE=RelWithDebInfo`