Featured image of post Build Aseprite

Build Aseprite

Build Aseprite

Aseprite 是一個跨平台的像素畫編輯器,反正看起來很棒,但是官網和 itch.io 買 19.99 美金,steam 賣三百多元,為了省這個錢決定自己編譯,原始碼在 https://github.com/aseprite/aseprite,而且官方有一個很詳細的編譯說明

clone

1
$ git clone https://github.com/aseprite/aseprite --recursive --depth 1

Dependencies

1
$ sudo apt-get install -y g++ clang libc++-dev libc++abi-dev cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev

skia

https://github.com/aseprite/skia/releases/latest 下載編譯好的 skia,解壓縮放到 ~/deps/skia 下面

cmake

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
$ cd aseprite
$ mkdir build
$ cd build
$ export CC=clang
$ export CXX=clang++

# add by me
$ export CMAKE_CXX_COMPILER="ccache"

$ cmake \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_CXX_FLAGS:STRING=-stdlib=libc++ \
  -DCMAKE_EXE_LINKER_FLAGS:STRING=-stdlib=libc++ \
  -DLAF_BACKEND=skia \
  -DSKIA_DIR=$HOME/deps/skia \
  -DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-x64 \
  -DSKIA_LIBRARY=$HOME/deps/skia/out/Release-x64/libskia.a \
  -G Ninja \
  ..
$ ninja aseprite

Execute Path

1
2
$ sudo mv bin /usr/local/share/aseprite
$ sudo ln -s /usr/local/share/aseprite/aseprite /usr/local/bin/aseprite

Desktop File

~/.local/share/applications/aseprite.desktop

1
2
3
4
5
6
[Desktop Entry]
Name=Aseprite
Exec=/usr/local/bin/aseprite
Icon=/usr/local/share/aseprite/data/icons/ase128.png
Terminal=false
Type=Application
好想養貓阿~~
使用 Hugo 建立
主題 StackJimmy 設計