Skip to content

Instantly share code, notes, and snippets.

@VermeilChan
Forked from veganaize/Aseprite-build-linux.md
Last active September 19, 2024 00:11
Show Gist options
  • Save VermeilChan/4ae1bff376df819391e5b74a31a9e474 to your computer and use it in GitHub Desktop.
Save VermeilChan/4ae1bff376df819391e5b74a31a9e474 to your computer and use it in GitHub Desktop.
Compile Aseprite from source code for GNU/Linux

Prerequisites

Install dependencies

on Ubuntu/Debian:

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

On Fedora:

sudo dnf install gcc-c++ clang libcxx-devel cmake ninja-build libX11-devel libXcursor-devel libXi-devel mesa-libGL-devel fontconfig-devel curl unzip -y

On Arch Linux:

sudo pacman -S gcc clang libc++ cmake ninja libx11 libxcursor mesa-libgl fontconfig curl unzip --noconfirm

On OpenSUSE:

sudo zypper -n install gcc-c++ clang libc++-devel libc++abi-devel cmake ninja libX11-devel libXcursor-devel libXi-devel Mesa-libGL-devel fontconfig-devel unzip curl

Create folders

mkdir -p ~/src/aseprite/build ~/src/deps/skia

Download & extract Aseprite source

cd ~/src/aseprite
curl --proto '=https' --tlsv1.3 -LsSf https://github.com/aseprite/aseprite/releases/download/v1.3.8.1/Aseprite-v1.3.8.1-Source.zip -o Aseprite-v1.3.8.1-Source.zip
unzip Aseprite-v1.3.8.1-Source.zip

Download & extract Skia

cd ~/src/deps/skia
curl -LO https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Linux-Release-x64-libc++.zip
unzip Skia-Linux-Release-x64-libc++.zip

Build Aseprite

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

Install program

mkdir ~/opt
mv -T bin ~/opt/aseprite

To run Aseprite, execute the following command:

~/opt/aseprite/aseprite

Tested With Aseprite v1.3.8.1

Please remember to support the creators of Aseprite. Only use this method to try the program or if you don't have access to funds or a credit card :)

@johanjavier123
Copy link

i not have a credit card,tanks you ;)

@VermeilChan
Copy link
Author

i not have a credit card,tanks you ;)

np :)

@back2Lobby
Copy link

back2Lobby commented Aug 25, 2024

Adding Aseprite Desktop Entry (with icon) for Ubuntu:

First add your executable to the path with:

sudo ln -s ~/opt/aseprite/aseprite /usr/local/bin/aseprite

Now you should be able to open aseprite from anywhere using command asperite.

Create a file in /usr/share/applications as aseprite.desktop with following content.

[Desktop Entry]
Type=Application
Name=Aseprite
GenericName=Sprite Editor
Comment=Animated sprite editor & pixel art tool
Icon=<aseprite-icon>
Categories=Graphics;2DGraphics;RasterGraphics
Exec=aseprite %U
TryExec=aseprite
Terminal=false
StartupNotify=false
StartupWMClass=Aseprite
MimeType=image/bmp;image/gif;image/jpeg;image/png;image/x-pcx;image/x-tga;image/vnd.microsoft.icon;video/x-flic;image/webp;image/x-aseprite;

Replace <aseprite-icon> with a path to any png aseprite icon. You can get it from any of the following sources:

  • Get it directory from the repo source you downloaded. At ~/src/aseprite/data/icons/ase256.png. You can copy it to the ~/opt/aseprite so all the resources are at same place.
  • After building (completing full tutorial) you can also get it from the ~/opt/aseprite/data/icons/ase256.png
  • Or download any png icon from internet, place it anywhere.

Note: Use absolute path to specify icons. Avoid using ~ in the path. Corrent Example is: /home/yourname/opt/aseprite/data/icons/ase256.png

Now update the entries using update-desktop-database ~/.local/share/applications/

Note: If you still see a desktop entry for Aseprite with settings icon or an empty icon on the entry, then most likely its an issue with your icon path.

@VermeilChan
Copy link
Author

Adding Aseprite Desktop Entry (with icon) for Ubuntu:

First add your executable to the path with:

sudo ln -s ~/opt/aseprite/aseprite /usr/local/bin/aseprite

Create a file in /usr/share/applications as aseprite.desktop with following content.

[Desktop Entry]
Type=Application
Name=Aseprite
GenericName=Sprite Editor
Comment=Animated sprite editor & pixel art tool
Icon=<aseprite-icon>
Categories=Graphics;2DGraphics;RasterGraphics
Exec=aseprite %U
TryExec=aseprite
Terminal=false
StartupNotify=false
StartupWMClass=Aseprite
MimeType=image/bmp;image/gif;image/jpeg;image/png;image/x-pcx;image/x-tga;image/vnd.microsoft.icon;video/x-flic;image/webp;image/x-aseprite;

Replace <aseprite-icon> with a path to any png aseprite icon. You can get it from any of the following sources:

  • Get it directory from the repo source you downloaded. At ~/src/aseprite/data/icons/ase256.png. You can copy it to the ~/opt/aseprite so all the resources are at same place.
  • After building (completing full tutorial) you can also get it from the ~/opt/aseprite/data/icons/ase256.png
  • Or download any png icon from internet, place it anywhere.

Note: Use absolute path to specify icons. Avoid using ~ in the path. Corrent Example is: /home/yourname/opt/aseprite/data/icons/ase256.png

Now update the entries using update-desktop-database ~/.local/share/applications/

Note: If you still see a desktop entry for Aseprite with settings icon or not empty icon on the entry, then most likely its an issue with your icon path.

thank you :) im not that good with linux :)

@vonMort
Copy link

vonMort commented Aug 25, 2024

Adding Aseprite Desktop Entry (with icon) for Ubuntu:

...many blabla...

Just to mention it, exact these steps work on all ubuntu based dists including pop_os

@back2Lobby
Copy link

back2Lobby commented Aug 26, 2024

Just to mention it, exact these steps work on all ubuntu based dists including pop_os

That's good to know, I've only used a few random distros other than ubuntu so I didn't have a clue lol.

@johanjavier123
Copy link

just navigate to the folther and make a desktop entry with the file explorer :/

@johanjavier123
Copy link

...

@johanjavier123
Copy link

If you think you are pro, use the shortcut tutorial

@VermeilChan
Copy link
Author

just navigate to the folther and make a desktop entry with the file explorer :/

im not that good with linux :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment