Compare commits

..

No commits in common. "6ba5a056a18485e410519ca96d9471f734b4a3a2" and "66c20f578cf0ab837b922761ca0398165ba97af3" have entirely different histories.

6 changed files with 32 additions and 38 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
Cameo-mod/
CameoReloaded/

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "Cameo-mod"]
path = Cameo-mod
url = https://github.com/Zeruel87/Cameo-mod.git

View File

@ -2,19 +2,19 @@ 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 wine32 wine64 xdg-utils zenity wget make unzip python nsis imagemagick python3
RUN mkdir /dotnet RUN mkdir /dotnet
WORKDIR /dotnet WORKDIR /dotnet
RUN wget -q https://download.visualstudio.microsoft.com/download/pr/ede8a287-3d61-4988-a356-32ff9129079e/bdb47b6b510ed0c4f0b132f7f4ad9d5a/dotnet-sdk-6.0.101-linux-x64.tar.gz -O /root/dotnet-sdk.tar.gz RUN wget https://download.visualstudio.microsoft.com/download/pr/ede8a287-3d61-4988-a356-32ff9129079e/bdb47b6b510ed0c4f0b132f7f4ad9d5a/dotnet-sdk-6.0.101-linux-x64.tar.gz -O /root/dotnet-sdk.tar.gz
RUN tar xzf /root/dotnet-sdk.tar.gz 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
CMD /workdir/build-docker.sh COPY build.sh /root/build.sh
CMD /root/build.sh

View File

@ -1,21 +0,0 @@
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)"

View File

@ -4,32 +4,38 @@ 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 https://gitea.burntworld.ca/kienan/cameo-build.git git clone --recurse-submodules https://gitea.burntworld.ca/kienan/cameo-build.git
``` ```
To get the Cameo source code, clone one of the following repos; If you already have the source checked out:
* [Cameo (releases)](https://github.com/Zeruel87/Cameo-mod.git) ```
* [Cameo (dev)](https://github.com/Elpollo315/Cameo-mod.git) git submodule init
* [Cameo Reloaded](https://github.com/Carloo999/CameoReloaded.git) ```
### Updating the checked out Cameo mod code
```
git submodule update
```
## Building container image ## Building container image
``` ```
make container podman build -t cameo-build:latest .
``` ```
## Building Cameo ## Building Cameo
To produce builds with complete packages:
``` ```
make build podman run --rm -v $(pwd)/Cameo-mod:/workdir localhost/cameo-build:latest
``` ```
To build the executables only; To build the release packages (exe, AppImage):
``` ```
make build-dev 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
``` ```

8
build.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
make
mkdir -p build && cd build
if [ -n "$RELEASE_VERSION" ]; then
../packaging/package-all.sh ${RELEASE_VERSION} $(pwd)
fi
cd ..