diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..67fe56d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Cameo-mod/ +CameoReloaded/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 59fa24e..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "Cameo-mod"] - path = Cameo-mod - url = https://github.com/Zeruel87/Cameo-mod.git diff --git a/Containerfile b/Containerfile index 5532e44..ddd0c6a 100644 --- a/Containerfile +++ b/Containerfile @@ -2,11 +2,12 @@ FROM docker.io/mono:6.12.0 WORKDIR /workdir +RUN dpkg --add-architecture i386 RUN apt-get update RUN apt-get install -y apt-transport-https 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 \ - 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 WORKDIR /dotnet @@ -16,5 +17,4 @@ RUN tar xzf /root/dotnet-sdk.tar.gz ENV PATH="${PATH}:/dotnet" ENV DOTNET_ROOT=/dotnet WORKDIR /workdir -COPY build.sh /root/build.sh -CMD /root/build.sh +CMD /workdir/build-docker.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..29356d7 --- /dev/null +++ b/Makefile @@ -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)" diff --git a/README.md b/README.md index 041829b..7cef158 100644 --- a/README.md +++ b/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 -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; -``` -git submodule init -``` - -### Updating the checked out Cameo mod code - -``` -git submodule update -``` +* [Cameo (releases)](https://github.com/Zeruel87/Cameo-mod.git) +* [Cameo (dev)](https://github.com/Elpollo315/Cameo-mod.git) +* [Cameo Reloaded](https://github.com/Carloo999/CameoReloaded.git) ## Building container image ``` -podman build -t cameo-build:latest . +make container ``` ## Building Cameo -``` -podman run --rm -v $(pwd)/Cameo-mod:/workdir localhost/cameo-build:latest -``` - -To build the release packages (exe, AppImage): +To produce builds with complete packages: ``` -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 ``` diff --git a/build.sh b/build.sh deleted file mode 100755 index a2ab15a..0000000 --- a/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -make -mkdir -p build && cd build -if [ -n "$RELEASE_VERSION" ]; then - ../packaging/package-all.sh ${RELEASE_VERSION} $(pwd) -fi -cd ..