Add Makefile to simply building
This commit is contained in:
parent
28c48d7515
commit
6ba5a056a1
|
@ -0,0 +1,2 @@
|
||||||
|
Cameo-mod/
|
||||||
|
CameoReloaded/
|
|
@ -1,3 +0,0 @@
|
||||||
[submodule "Cameo-mod"]
|
|
||||||
path = Cameo-mod
|
|
||||||
url = https://github.com/Zeruel87/Cameo-mod.git
|
|
|
@ -2,11 +2,12 @@ FROM docker.io/mono:6.12.0
|
||||||
|
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
|
|
||||||
|
RUN dpkg --add-architecture i386
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y apt-transport-https
|
RUN apt-get install -y apt-transport-https
|
||||||
RUN apt-get install -y --allow-unauthenticated --no-install-recommends \
|
RUN apt-get install -y --allow-unauthenticated --no-install-recommends \
|
||||||
ca-certificates zip file mono-devel libfreetype6 libopenal1 liblua5.1-0 libsdl2-2.0-0 \
|
ca-certificates zip file mono-devel libfreetype6 libopenal1 liblua5.1-0 libsdl2-2.0-0 \
|
||||||
xdg-utils zenity wget make unzip python nsis imagemagick python3
|
xdg-utils zenity wget make unzip python nsis imagemagick python3 wine32 wine64
|
||||||
|
|
||||||
RUN mkdir /dotnet
|
RUN mkdir /dotnet
|
||||||
WORKDIR /dotnet
|
WORKDIR /dotnet
|
||||||
|
@ -16,5 +17,4 @@ RUN tar xzf /root/dotnet-sdk.tar.gz
|
||||||
ENV PATH="${PATH}:/dotnet"
|
ENV PATH="${PATH}:/dotnet"
|
||||||
ENV DOTNET_ROOT=/dotnet
|
ENV DOTNET_ROOT=/dotnet
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
COPY build.sh /root/build.sh
|
CMD /workdir/build-docker.sh
|
||||||
CMD /root/build.sh
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
CWD=$(shell pwd)
|
||||||
|
CAMEO_DIR?=$(CWD)/Cameo-mod
|
||||||
|
VERSION?=$(shell git --git-dir=$(CAMEO_DIR)/.git --work-tree=$(CAMEO_DIR) describe --tags)
|
||||||
|
VERSION?=$(shell git --git-dir=$(CAMEO_DIR)/.git --work-tree=$(CAMEO_DIR) rev-parse HEAD)
|
||||||
|
|
||||||
|
.phony: build-dev build all container build-linux
|
||||||
|
|
||||||
|
all: container build
|
||||||
|
|
||||||
|
container:
|
||||||
|
podman build -t cameo-build:latest .
|
||||||
|
|
||||||
|
build:
|
||||||
|
podman run --rm -v $(CAMEO_DIR):/workdir -e APPIMAGE_EXTRACT_AND_RUN=1 -e RELEASE_VERSION=$(VERSION) localhost/cameo-build:latest
|
||||||
|
|
||||||
|
build-dev:
|
||||||
|
podman run --rm -v $(CAMEO_DIR):/workdir localhost/cameo-build:latest
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
podman run --rm -v $(CAMEO_DIR):/workdir -e APPIMAGE_EXTRACT_AND_RUN=1 -e RELEASE_VERSION=$(VERSION) localhost/cameo-build:latest make
|
||||||
|
podman run --rm -v $(CAMEO_DIR):/workdir -e APPIMAGE_EXTRACT_AND_RUN=1 -e RELEASE_VERSION=$(VERSION) localhost/cameo-build:latest /bin/bash -c "cd build && ../packaging/linux/buildpackage.sh $(VERSION)"
|
34
README.md
34
README.md
|
@ -4,38 +4,32 @@ It could be used to build any OpenRA mod which uses make and package-all.sh.
|
||||||
|
|
||||||
## Checking out the code
|
## Checking out the code
|
||||||
|
|
||||||
The actual Cameo source is a git submodule. If you are cloning this initially, use
|
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone --recurse-submodules https://gitea.burntworld.ca/kienan/cameo-build.git
|
git clone https://gitea.burntworld.ca/kienan/cameo-build.git
|
||||||
```
|
```
|
||||||
|
|
||||||
If you already have the source checked out:
|
To get the Cameo source code, clone one of the following repos;
|
||||||
|
|
||||||
```
|
* [Cameo (releases)](https://github.com/Zeruel87/Cameo-mod.git)
|
||||||
git submodule init
|
* [Cameo (dev)](https://github.com/Elpollo315/Cameo-mod.git)
|
||||||
```
|
* [Cameo Reloaded](https://github.com/Carloo999/CameoReloaded.git)
|
||||||
|
|
||||||
### Updating the checked out Cameo mod code
|
|
||||||
|
|
||||||
```
|
|
||||||
git submodule update
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building container image
|
## Building container image
|
||||||
|
|
||||||
```
|
```
|
||||||
podman build -t cameo-build:latest .
|
make container
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building Cameo
|
## Building Cameo
|
||||||
|
|
||||||
```
|
To produce builds with complete packages:
|
||||||
podman run --rm -v $(pwd)/Cameo-mod:/workdir localhost/cameo-build:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
To build the release packages (exe, AppImage):
|
|
||||||
|
|
||||||
```
|
```
|
||||||
podman run --rm -v $(pwd)/Cameo-mod:/workdir -e RELEASE_VERSION=$(git --git-dir=Cameo-mod/.git --work-tree=Cameo-mod describe --tags) localhost/cameo-build:latest
|
make build
|
||||||
|
```
|
||||||
|
|
||||||
|
To build the executables only;
|
||||||
|
|
||||||
|
```
|
||||||
|
make build-dev
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue