Skip to content

Commit

Permalink
add docker-based build script
Browse files Browse the repository at this point in the history
relates to #1487
  • Loading branch information
doll-sh committed Sep 23, 2024
1 parent 54fb4a1 commit b9f885c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 7 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM eclipse-temurin:21

WORKDIR /build

RUN apt-get -yq update && \
apt-get upgrade -yq && \
apt-get -y --no-install-recommends \
install \
ant \
ca-certificates \
curl \
sed \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*

RUN curl -OL https://dlcdn.apache.org/flex/4.16.1/binaries/apache-flex-sdk-4.16.1-bin.tar.gz
RUN tar xvf apache-flex-sdk-4.16.1-bin.tar.gz
RUN mkdir -p apache-flex-sdk-4.16.1-bin/frameworks/libs/player/27.0

RUN curl -L \
https://github.com/nexussays/playerglobal/raw/master/27.0/playerglobal.swc \
-o apache-flex-sdk-4.16.1-bin/frameworks/libs/player/27.0/playerglobal.swc

RUN sed -i'' 's|{playerglobalHome}|libs/player|g' apache-flex-sdk-4.16.1-bin/frameworks/flex-config.xml

RUN cat apache-flex-sdk-4.16.1-bin/frameworks/flex-config.xml

COPY . /build/

ENV FLEX_HOME=/build/apache-flex-sdk-4.16.1-bin

CMD ant debug && \
mv /build/target/CoC-debug.swf /build/artifacts/CoC-debug.swf
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@ Corruption-of-Champions-Mod

NOTE: CONTAINS MATURE CONTENT. ADULTS ONLY

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

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

Check out the wiki for information and the FAQ.

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

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

# Building with ant
## Prerequisites
# Building

## With ant

### Prerequisites
- Java JRE installed
- Ant installed
- Environment variable FLEX_HOME set to the flex SDK path

## Building
### Building
To build run:

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

This allows for quick testing or debugging of classes without running all tests.

## With Docker

With Docker and Docker Compose installed, run:

```
docker compose build && docker compose up
```

The resulting `.swf` will be in the `artifacts` directory.
Empty file added artifacts/.keep
Empty file.
8 changes: 8 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
build:
image: coc-ant
build:
context: .
restart: no
volumes:
- ./artifacts:/build/artifacts

0 comments on commit b9f885c

Please sign in to comment.