commit 1231e4b7f403217342d0cc03b02f5872cabe6d56 Author: nils Date: Fri Apr 16 13:15:19 2021 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b34b0f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +dependencies +output \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e35595d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:20.04 + +#Required for tzdata +ENV TZ=Europe/Amsterdam +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Install dependencies +RUN apt-get update +RUN apt-get upgrade -y +RUN apt-get install -y git unzip curl build-essential cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev + +VOLUME /dependencies +VOLUME /output + +WORKDIR /output + +COPY compile.sh / + +RUN ["chmod", "+x", "/compile.sh"] +ENTRYPOINT ["/compile.sh"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e013bff --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +#Docker Aseprite container + +This repository allows you to compile Aseprite without installing any build tools. All that is required is Docker. + +After spending hours trying to get Aseprite to compile, I decided to just make a Docker image for it + +To simplify and speed up the build process, the build script uses the precompiled version of Skia, which it downloads from the Github repo. + +## Usage + * Install docker + * Clone this repository + * cd into cloned repository + * Run `docker-compose build` + * Run `docker-compose up` + +You can now find the compiled version of Aseprite in the `output/aseprite/build` folder \ No newline at end of file diff --git a/compile.sh b/compile.sh new file mode 100755 index 0000000..1d68da9 --- /dev/null +++ b/compile.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Download Skia +if [ ! -d "/dependencies/skia" ] +then + curl -L https://github.com/aseprite/skia/releases/download/m81-b607b32047/Skia-Linux-Release-x64.zip --output /dependencies/skia.zip + unzip /dependencies/skia.zip -d /dependencies/skia +fi + +git clone --recursive https://github.com/aseprite/aseprite.git +cd aseprite +mkdir -p build +cd build +cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DLAF_BACKEND=skia \ + -DSKIA_DIR=/dependencies/skia \ + -DSKIA_LIBRARY_DIR=/dependencies/skia/out/Release-x64 \ + -DSKIA_LIBRARY=/dependencies/skia/out/Release-x64/libskia.a \ + -G Ninja \ + .. +ninja aseprite \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..04b9f66 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '2' + +services: + installer: + build: . + volumes: + - ./output:/output + - ./dependencies:/dependencies \ No newline at end of file