commit 553d041b91977a36a4b109d7bcbe488bdbd08f44 Author: Kienan Stewart Date: Sun Jan 2 10:08:16 2022 -0500 Initial commit diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..59fa24e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Cameo-mod"] + path = Cameo-mod + url = https://github.com/Zeruel87/Cameo-mod.git diff --git a/Cameo-mod b/Cameo-mod new file mode 160000 index 0000000..094fcfd --- /dev/null +++ b/Cameo-mod @@ -0,0 +1 @@ +Subproject commit 094fcfdfabf65ef59e8d1e928267263d1e0ca666 diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..a471dab --- /dev/null +++ b/Containerfile @@ -0,0 +1,20 @@ +FROM docker.io/mono:6.12.0 + +WORKDIR /workdir + +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 + +RUN mkdir /dotnet +WORKDIR /dotnet +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 + +ENV PATH="${PATH}:/dotnet" +ENV DOTNET_ROOT=/dotnet +WORKDIR /workdir +COPY build.sh /root/build.sh +CMD /root/build.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..e9a3c5c --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +This project is used to build Cameo using podman / docker. + +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 +``` + +If you already have the source checked out: + +``` +git submodule init +``` + +### Updating the checked out Cameo mod code + +``` +git submodule update +``` + +## Building container image + +``` +podman build -t cameo-build:latest +``` + +## Building Cameo + +``` +podman run -v $(pwd)/Cameo-mod:/workdir localhost/cameo-build:latest +``` + +To build the release packages (exe, AppImage): + +``` +podman run -v $(pwd)/Cameo-mod:/workdir -e RELEASE_VERSION=$(git --git-dir=Cameo-mod/.git --work-tree=Cameo-mod describe --tags) localhost/cameo-build:latest +``` diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a2ab15a --- /dev/null +++ b/build.sh @@ -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 ..