Skip to content

Commit cb30846

Browse files
authored
Merge pull request #1494 from doll-sh/docker
add docker-based build script
2 parents 54fb4a1 + b9f885c commit cb30846

File tree

4 files changed

+61
-7
lines changed

4 files changed

+61
-7
lines changed

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM eclipse-temurin:21
2+
3+
WORKDIR /build
4+
5+
RUN apt-get -yq update && \
6+
apt-get upgrade -yq && \
7+
apt-get -y --no-install-recommends \
8+
install \
9+
ant \
10+
ca-certificates \
11+
curl \
12+
sed \
13+
&& apt-get -y clean \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
RUN curl -OL https://dlcdn.apache.org/flex/4.16.1/binaries/apache-flex-sdk-4.16.1-bin.tar.gz
17+
RUN tar xvf apache-flex-sdk-4.16.1-bin.tar.gz
18+
RUN mkdir -p apache-flex-sdk-4.16.1-bin/frameworks/libs/player/27.0
19+
20+
RUN curl -L \
21+
https://github.com/nexussays/playerglobal/raw/master/27.0/playerglobal.swc \
22+
-o apache-flex-sdk-4.16.1-bin/frameworks/libs/player/27.0/playerglobal.swc
23+
24+
RUN sed -i'' 's|{playerglobalHome}|libs/player|g' apache-flex-sdk-4.16.1-bin/frameworks/flex-config.xml
25+
26+
RUN cat apache-flex-sdk-4.16.1-bin/frameworks/flex-config.xml
27+
28+
COPY . /build/
29+
30+
ENV FLEX_HOME=/build/apache-flex-sdk-4.16.1-bin
31+
32+
CMD ant debug && \
33+
mv /build/target/CoC-debug.swf /build/artifacts/CoC-debug.swf

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,29 @@ Corruption-of-Champions-Mod
55

66
NOTE: CONTAINS MATURE CONTENT. ADULTS ONLY
77

8-
CoC Mod source from Kitteh6660. Original game by Fenoxo.
9-
Modifications by everyone at:
8+
CoC Mod source from Kitteh6660. Original game by Fenoxo.
9+
Modifications by everyone at:
1010
https://github.com/Kitteh6660/Corruption-of-Champions-Mod/graphs/contributors
1111

1212
Everything in original game is copyright Fenoxo (fenoxo.com).
1313

1414
Check out the wiki for information and the FAQ.
1515

16-
**Playable releases can be found in the Releases tab.**
17-
**Android Releases:** https://github.com/Hexxah/CoC-MOD-Android-Build
16+
**Playable releases can be found in the Releases tab.**
17+
**Android Releases:** https://github.com/Hexxah/CoC-MOD-Android-Build
1818

1919
**Discord Server:** https://discord.gg/R25MZEx
2020

21-
# Building with ant
22-
## Prerequisites
21+
# Building
22+
23+
## With ant
24+
25+
### Prerequisites
2326
- Java JRE installed
2427
- Ant installed
2528
- Environment variable FLEX_HOME set to the flex SDK path
2629

27-
## Building
30+
### Building
2831
To build run:
2932

3033
`ant`
@@ -51,3 +54,13 @@ example:
5154
`ant test-single -Dtestclass=classes.Items.MutationsTest`
5255

5356
This allows for quick testing or debugging of classes without running all tests.
57+
58+
## With Docker
59+
60+
With Docker and Docker Compose installed, run:
61+
62+
```
63+
docker compose build && docker compose up
64+
```
65+
66+
The resulting `.swf` will be in the `artifacts` directory.

artifacts/.keep

Whitespace-only changes.

docker-compose.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
build:
3+
image: coc-ant
4+
build:
5+
context: .
6+
restart: no
7+
volumes:
8+
- ./artifacts:/build/artifacts

0 commit comments

Comments
 (0)