aseprite/INSTALL.md
2016-04-26 17:38:27 -05:00

7.4 KiB

Table of contents

Platforms

You should be able to compile Aseprite successfully on the following platforms:

  • Windows 10 + VS2015 Community Edition + Windows 10 SDK
  • Mac OS X 10.11.4 El Capitan + Xcode 7.3 + OS X 10.11 SDK + Skia (without GPU)
  • Linux + gcc 4.8 with some C++11 support

Get the source code

You can get the source code downloading a Aseprite-v1.x-Source.zip file from the latest Aseprite release:

https://github.com/aseprite/aseprite/releases

Or you can clone the repository and all its submodules using the following command:

git clone --recursive https://github.com/aseprite/aseprite.git

To update an existing clone you can use the following commands:

cd aseprite
git pull
git submodule update --init --recursive

On Windows you can use programs like msysgit to clone the repository.

Dependencies

Aseprite uses the latest version of CMake (3.4 or greater) as its build system. Also we use Ninja build files regularly instead of Visual Studio or Xcode projects. Finally, you will need awk utility to compile the embedded (non-shared version of) libpng library (on Windows you can get this utility from MSYS2 distributions, e.g. MozillaBuild).

Aseprite can be compiled with two different back-ends:

  1. Allegro back-end (Windows, Linux): You will not need any extra library because the repository already contains a modified version of the Allegro library. This back-end is only available for Windows and Linux and it'll be removed in following versions.

  2. Skia back-end (Windows, OS X): You will need a compiled version of Skia, chrome/m50 branch, without GPU support, i.e. compiled with GYP_DEFINES='skia_gpu=0'. When you compile Aseprite, you'll need to give some variables to CMake: -DUSE_ALLEG4_BACKEND=OFF, -DUSE_SKIA_BACKEND=ON, and -DSKIA_DIR=... pointing to the Skia checkout directory. (Note: The GPU support is a work-in-progress, so it will be available in a future.)

Linux dependencies

You will need the following dependencies (Ubuntu, Debian):

sudo apt-get update -qq
sudo apt-get install -y g++ libx11-dev libxcursor-dev cmake ninja-build

The libxcursor-dev package is needed to hide the hardware cursor.

Aseprite uses Ninja as the build system on POSIX-like platforms.

Compiling

The following are the steps to compile Aseprite (in this case we have the repository clone in a directory called aseprite):

  1. Make a build directory to leave all the files that are result of the compilation process (.exe, .lib, .obj, .a, .o, etc).

     C:\>cd aseprite
     C:\aseprite>mkdir build
    

    In this way, if you want to start with a fresh copy of Aseprite source code, you can remove the build directory and start again.

  2. Enter in the new directory and execute cmake giving to it your compiler as generator:

     C:\aseprite>cd build
    

    On Linux / OS X / BSD:

     C:\aseprite\build>cmake -G Ninja ..
    

    If you have nmake (MSVC compilers):

     C:\aseprite\build>cmake -G "NMake Makefiles" ..
    

    If you have Visual Studio you can generate a solution:

     C:\aseprite\build>cmake -G "Visual Studio 12 2013" ..
    

    For more information in CMake wiki.

    Additionally you can change build settings by passing them on the command line, like so:

     ~/aseprite/build$ cmake -DCMAKE_INSTALL_PREFIX=~/software ..
    

    or later on with a tool like ccmake or cmake-gui.

  3. After you have executed one of the cmake -G <generator> .. commands, you have to compile the project executing make, nmake, opening the solution, etc.

  4. When the project is compiled, you can find the executable file inside build/bin/aseprite.exe. If you invoked make install it will be copied to an appropriate location (e.g. /usr/local/bin/aseprite on Linux).

Mac OS X details

From v1.1.4 we compile with Mac OS X 10.11 SDK universal and skia.

See the skia instructions from how to build skia.

You should run cmake with the following parameters:

cd aseprite
mkdir build
cd build
cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=x86_64" -D "CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7" \
-DUSE_ALLEG4_BACKEND=OFF -DUSE_SKIA_BACKEND=ON \
-DSKIA_DIR=PATH/TO/SKIA \
-D "CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" \
-D "WITH_HarfBuzz:BOOL=OFF" -GNinja ..

ninja

Issues with Retina displays

If you have a Retina display, check this issue:

https://github.com/aseprite/aseprite/issues/589

Using shared third party libraries

If you don't want to use the embedded code of third party libraries (i.e. to use your installed versions), you can disable static linking configuring each USE_SHARED_ option.

After running cmake -G, you can edit build/CMakeCache.txt file, and enable the USE_SHARED_ flag (set its value to ON) of the library that you want to be linked dynamically.

Linux issues

If you use the official version of Allegro 4.4 library (i.e. you compile with USE_SHARED_ALLEGRO4=ON) you will experience a couple of known issues solved in our patched version of Allegro 4.4 library:

Building Skia dependency

Linux, OS X, BSD

Building aseprite with skia as a back-end may require building from source since most package repositories don't package skia (as for April 2016).

For "always up to date" info on building skia across platforms, see the skia quickstart and select the OS you are building for.

Grab depot tools:

git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' ~/.depot_tools

Add depot tools to your PATH to ~/.bashrc, ~/.zshrc, etc:

export PATH=`pwd`/depot_tools:"$PATH"

Clone skia

git clone 'https://skia.googlesource.com/skia'
cd skia

Checkout chrome/m50:

git checkout chrome/m50

Set terminal to build without graphic support

export GYP_DEFINES='skia_gpu=0'

Sync and create ninja project file

python bin/sync-and-gyp
ninja -C out/Debug dm