forked from aki/docker-aseprite-linux
Fix build & compile skia from source
This commit is contained in:
parent
18470299dc
commit
02647a7ee4
@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:20.04
|
FROM python
|
||||||
|
|
||||||
#Required for tzdata
|
#Required for tzdata
|
||||||
ENV TZ=Europe/Amsterdam
|
ENV TZ=Europe/Amsterdam
|
||||||
@ -9,12 +9,13 @@ RUN apt-get update
|
|||||||
RUN apt-get upgrade -y
|
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 install -y git unzip curl build-essential cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev
|
||||||
|
|
||||||
|
COPY compile.sh /
|
||||||
|
|
||||||
VOLUME /dependencies
|
VOLUME /dependencies
|
||||||
VOLUME /output
|
VOLUME /output
|
||||||
|
|
||||||
WORKDIR /output
|
WORKDIR /output
|
||||||
|
|
||||||
COPY compile.sh /
|
|
||||||
|
|
||||||
RUN ["chmod", "+x", "/compile.sh"]
|
RUN ["chmod", "+x", "/compile.sh"]
|
||||||
|
|
||||||
ENTRYPOINT ["/compile.sh"]
|
ENTRYPOINT ["/compile.sh"]
|
||||||
@ -4,7 +4,12 @@ This repository allows you to compile Aseprite without installing any build tool
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
To simplify and speed up the build process, the build script uses the precompiled version of Skia, which it downloads from the Github repo.
|
Currently the script checks out Skia version `m96` and Aseprite version `1.2.34.1`. You can easily change this in `compile.sh` by changing the `-b` flag to the desired versions.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
* Install docker
|
* Install docker
|
||||||
@ -12,5 +17,6 @@ To simplify and speed up the build process, the build script uses the precompile
|
|||||||
* cd into cloned repository
|
* cd into cloned repository
|
||||||
* Run `docker-compose build`
|
* Run `docker-compose build`
|
||||||
* Run `docker-compose up`
|
* Run `docker-compose up`
|
||||||
|
* 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
|
You can now find the compiled version of Aseprite in the `output/aseprite/build/bin` folder
|
||||||
|
|||||||
41
compile.sh
41
compile.sh
@ -1,16 +1,45 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Download Skia
|
# Fail on errors
|
||||||
if [ ! -d "/dependencies/skia" ]
|
set -e
|
||||||
|
|
||||||
|
echo "Download and compile Skia & other dependencies"
|
||||||
|
cd /dependencies
|
||||||
|
|
||||||
|
if [ ! -d "/dependencies/depot_tools" ]
|
||||||
then
|
then
|
||||||
curl -L https://github.com/aseprite/skia/releases/download/m96-2f1f21b8a9/Skia-Linux-Release-x64.zip --output /dependencies/skia.zip
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
unzip /dependencies/skia.zip -d /dependencies/skia
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "/dependencies/skia" ]
|
||||||
|
then
|
||||||
|
git clone -b aseprite-m96 https://github.com/aseprite/skia.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH="${PWD}/depot_tools:${PATH}"
|
||||||
|
|
||||||
|
cd skia
|
||||||
|
pwd
|
||||||
|
echo "Syncing skia dependencies"
|
||||||
|
python3 tools/git-sync-deps
|
||||||
|
|
||||||
|
echo "Compiling skia"
|
||||||
|
gn gen out/Release-x64 --args="is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false"
|
||||||
|
ninja -C out/Release-x64 skia modules
|
||||||
|
|
||||||
|
echo "Download Aseprite and compile"
|
||||||
|
cd /output
|
||||||
|
|
||||||
|
if [ ! -d "/output/aseprite" ]
|
||||||
|
then
|
||||||
|
git clone -b v1.2.34.1 --recursive https://github.com/aseprite/aseprite.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git clone --recursive https://github.com/aseprite/aseprite.git
|
|
||||||
cd aseprite
|
cd aseprite
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
|
echo "Compiling Asperite"
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DLAF_BACKEND=skia \
|
-DLAF_BACKEND=skia \
|
||||||
@ -19,4 +48,6 @@ cmake \
|
|||||||
-DSKIA_LIBRARY=/dependencies/skia/out/Release-x64/libskia.a \
|
-DSKIA_LIBRARY=/dependencies/skia/out/Release-x64/libskia.a \
|
||||||
-G Ninja \
|
-G Ninja \
|
||||||
..
|
..
|
||||||
|
|
||||||
|
echo "Linking Aseprite"
|
||||||
ninja aseprite
|
ninja aseprite
|
||||||
|
|||||||
@ -4,5 +4,5 @@ services:
|
|||||||
installer:
|
installer:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
- ./output:/output
|
- "./output:/output:rw"
|
||||||
- ./dependencies:/dependencies
|
- "./dependencies:/dependencies:rw"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user