Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"sarif-viewer.connectToGithubCodeScanning": "off"
}
54 changes: 48 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
FROM python
FROM python:3.12-slim-trixie

#Required for tzdata
ENV TZ=Europe/Amsterdam
ARG TZ=America/Los_Angeles
ARG LANG=C.UTF-8
ARG AESCOMPILE_ASEPRITE_VERSION=v1.3.15.2
ARG AESCOMPILE_SKIA_VERSION=aseprite-m124
ARG AESCOMPILE_DEPENDENCIES_DIR=/dependencies
ARG AESCOMPILE_OUTPUT_DIR=/output
ARG AESCOMPILE_BUILD_TYPE=RelWithDebInfo
ARG AESCOMPILE_VERBOSITY=3
ARG AESCOMPILE_NO_COLOR=false
ARG AESCOMPILE_QUIET=false

ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=${LANG}
ENV LC_ALL=${LANG}
ENV TZ=${TZ}
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_ROOT_USER_ACTION=ignore
ENV AESCOMPILE_ASEPRITE_VERSION=${AESCOMPILE_ASEPRITE_VERSION:-v1.3.15.2}
ENV AESCOMPILE_SKIA_VERSION=${AESCOMPILE_SKIA_VERSION:-aseprite-m124}
ENV AESCOMPILE_DEPENDENCIES_DIR=${AESCOMPILE_DEPENDENCIES_DIR:-/dependencies}
ENV AESCOMPILE_OUTPUT_DIR=${AESCOMPILE_OUTPUT_DIR:-/output}
ENV AESCOMPILE_BUILD_TYPE=${AESCOMPILE_BUILD_TYPE:-RelWithDebInfo}
ENV AESCOMPILE_VERBOSITY=${AESCOMPILE_VERBOSITY:-3}
ENV AESCOMPILE_NO_COLOR=${AESCOMPILE_NO_COLOR:-false}
ENV AESCOMPILE_QUIET=${AESCOMPILE_QUIET:-false}

# Set timezone
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
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
git \
unzip \
curl \
build-essential \
g++ \
clang \
cmake \
ninja-build \
libx11-dev \
libxcursor-dev \
libxi-dev \
libxrandr-dev \
libgl1-mesa-dev \
libfontconfig1-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY compile.sh /

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 nilsve

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
IMAGE_NAME := docker-aseprite

.PHONY: build build-compose build-image clean

clean:
sudo rm -rf ./output ./dependencies 2>/dev/null || true

build: build-image
docker run --rm \
docker run -it --rm \
-v ${PWD}/output:/output \
-v ${PWD}/dependencies:/dependencies \
${IMAGE_NAME}
${IMAGE_NAME} $(ARGS)

build-compose:
docker-compose build
Expand Down
108 changes: 77 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,98 @@

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
After spending hours trying to get Aseprite to compile, I decided to just make a Docker image for it.

Currently the script checks out Skia version `m124` and Aseprite version `1.3.15.2`. You can easily change this in `compile.sh` by changing the `-b` flag to the desired versions.
The script features a comprehensive logging system with robust error handling, and fully configurable build options. By default it compiles Skia version `aseprite-m124` and Aseprite version `v1.3.15.2` with `RelWithDebInfo` build type.

If any of the folders of the projects folder isn't empty, the script will skip checking out the latest versions. In order to re-download, delete the according folder.
If any of the folders of the projects folder isn't empty, the script will skip checking out the latest versions. In order to re-download, delete the according folder:
* ./dependencies/depot_tools
* ./dependencies/skia
* ./output/aseprite
* ./dependencies/aseprite

## Usage
* Install docker
* Clone this repository
* cd into cloned repository
* Run `make build` or `make build-compose` (The latter will use docker-compose to build the image)
* Grab a cup of coffee, since this can take quite a while (Compiling build deps, skia, and aseprite)

You can now find the compiled version of Aseprite in the `output/aseprite/build/bin` folder
### Quick Start
1. Install docker
2. Clone this repository
3. cd into cloned repository
4. Run `make build` (uses default settings)
5. Grab a cup of coffee, since this can take quite a while (Compiling build deps, skia, and aseprite)

You can now find the compiled version of Aseprite in the `output/bin` folder (or just `output/aseprite` if bin folder doesn't exist)

### Advanced Usage

The compilation script supports various options that can be passed through the Makefile.

```bash
# Basic usage with default settings
make build

# Using docker-compose (alternative method)
make build-compose

# Pass arguments to the compilation script
make build ARGS="[OPTIONS]"
```

### Available Options

| Command Line Option | Environment Variable | Description |
|---------------------|---------------------|-------------|
| `-a, --aseprite-version VERSION` | `AESCOMPILE_ASEPRITE_VERSION` | Set Aseprite version (default: v1.3.15.2) |
| `-s, --skia-version VERSION` | `AESCOMPILE_SKIA_VERSION` | Set Skia version (default: aseprite-m124) |
| `-d, --dependencies-dir DIR` | `AESCOMPILE_DEPENDENCIES_DIR` | Set dependencies directory (default: /dependencies) |
| `-o, --output-dir DIR` | `AESCOMPILE_OUTPUT_DIR` | Set output directory (default: /output) |
| `-b, --build-type TYPE` | `AESCOMPILE_BUILD_TYPE` | CMake build type: `Release` or `RelWithDebInfo` (default: RelWithDebInfo) |
| `-v, --verbose` | `AESCOMPILE_VERBOSITY` | Increase verbosity (0=critical, 1=error, 2=warning, 3=info, 4=debug) |
| `-q, --quiet` | `AESCOMPILE_QUIET` | Suppress output except errors and critical messages |
| `-n, --no-color` | `AESCOMPILE_NO_COLOR` | Disable colored output and emojis |
| `-h, --help` | N/A | Display help message and exit |

### Examples

```bash
# Basic compilation with default settings
make build

# Compile specific versions with verbose output
make build ARGS="-a v1.3.15.2 -s aseprite-m124 -v"

# Compile older versions
make build ARGS="--aseprite-version v1.3.10 --skia-version aseprite-m102"

# Use custom directories (mapped to host paths via Docker volumes)
make build ARGS="-d /custom/deps -o /custom/output"

# Release build without debug info, no colors/emojis, quiet mode
make build ARGS="-b Release --no-color --quiet"

# Maximum verbosity for debugging (shows debug, info, warning, error, critical)
make build ARGS="-vvvv"

# Debug mode with real-time output processing
make build ARGS="-vvv --no-color" # Clean debug output without colors

# Show comprehensive help with all options
make build ARGS="--help"
```

### Build Types

- **RelWithDebInfo** (default): Optimized build with debug information included
* **Release**: Fully optimized build without debug information (smaller binary)

## FAQ

If you get the following error when running Aseprite: `./aseprite: error while loading shared libraries: libdeflate.so.0: cannot open shared object file: No such file or directory`, make sure you have libdeflate installed on your system. Please run
`sudo apt install -y libdeflate0 libdeflate-dev`

If you get the following error: `./aseprite: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory`, you'll want to install the OpenSSL 1.1 package/library. You may have only OpenSSL 3.x installed, meanwhile Aseprite still uses the v1.1 library.

* On Arch / Arch based distros, run `sudo pacman -Syu openssl-1.1`
* On Ubuntu try: `sudo apt install -y libssl1.1`

## License

MIT License

Copyright (c) 2025 nilsve

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Loading