2016-04-11 20:50:11 +00:00
|
|
|
# Table of contents
|
|
|
|
|
|
|
|
* [Platforms](#platforms)
|
|
|
|
* [Get the source code](#get-the-source-code)
|
|
|
|
* [Dependencies](#dependencies)
|
|
|
|
* [Linux dependencies](#linux-dependencies)
|
|
|
|
* [Compiling](#compiling)
|
|
|
|
* [Mac OS X details](#mac-os-x-details)
|
|
|
|
* [Issues with Retina displays](#issues-with-retina-displays)
|
|
|
|
* [Using shared third party libraries](#using-shared-third-party-libraries)
|
|
|
|
* [Linux issues](#linux-issues)
|
|
|
|
|
2015-01-06 12:34:40 +00:00
|
|
|
# Platforms
|
2012-07-08 04:41:14 +00:00
|
|
|
|
2013-11-23 19:01:34 +00:00
|
|
|
You should be able to compile Aseprite successfully on the following
|
2012-07-08 04:41:14 +00:00
|
|
|
platforms:
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
* 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
|
2012-07-08 04:41:14 +00:00
|
|
|
|
2015-01-06 12:34:40 +00:00
|
|
|
# Get the source code
|
|
|
|
|
2016-04-13 15:00:12 +00:00
|
|
|
You can get the source code downloading a `Aseprite-v1.x-Source.zip`
|
|
|
|
file from the latest Aseprite release:
|
2015-01-06 12:34:40 +00:00
|
|
|
|
2016-04-13 15:00:12 +00:00
|
|
|
https://github.com/aseprite/aseprite/releases
|
2015-01-06 12:34:40 +00:00
|
|
|
|
2016-04-13 15:00:12 +00:00
|
|
|
Or you can clone the repository and all its submodules using the
|
|
|
|
following command:
|
2015-01-06 12:34:40 +00:00
|
|
|
|
|
|
|
git clone --recursive https://github.com/aseprite/aseprite.git
|
|
|
|
|
2016-04-13 15:00:12 +00:00
|
|
|
To update an existing clone you can use the following commands:
|
2015-11-20 02:12:07 +00:00
|
|
|
|
|
|
|
cd aseprite
|
|
|
|
git pull
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
2015-01-06 12:34:40 +00:00
|
|
|
On Windows you can use programs like
|
|
|
|
[msysgit](http://msysgit.github.io/) to clone the repository.
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
# Dependencies
|
2012-07-08 04:41:14 +00:00
|
|
|
|
2014-08-14 03:41:30 +00:00
|
|
|
Aseprite uses the latest version of [CMake](http://www.cmake.org/)
|
2016-04-18 16:27:36 +00:00
|
|
|
(3.4 or greater) as its build system. Also we use
|
2016-04-11 20:50:11 +00:00
|
|
|
[Ninja](https://ninja-build.org) build files regularly instead of
|
2016-04-11 22:25:54 +00:00
|
|
|
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](https://wiki.mozilla.org/MozillaBuild)).
|
2016-04-11 20:50:11 +00:00
|
|
|
|
|
|
|
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](http://skia.org/), `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_SKIA_ALLEG4=OFF`, `-DUSE_SKIA_BACKEND=ON`, and
|
|
|
|
`-DSKIA_DIR=...` pointing to the Skia checkout directory. (Note:
|
2016-04-15 13:18:05 +00:00
|
|
|
The GPU support is a work-in-progress, so it will be available in a
|
|
|
|
future.)
|
2016-04-11 20:50:11 +00:00
|
|
|
|
|
|
|
## Linux dependencies
|
|
|
|
|
|
|
|
You will need the following dependencies:
|
|
|
|
|
|
|
|
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](https://github.com/aseprite/aseprite/issues/913).
|
|
|
|
|
|
|
|
# Compiling
|
2013-11-23 19:32:13 +00:00
|
|
|
|
2013-11-23 19:01:34 +00:00
|
|
|
The following are the steps to compile Aseprite (in this case we have
|
2016-02-29 15:25:15 +00:00
|
|
|
the repository clone in a directory called `aseprite`):
|
2012-07-08 04:41:14 +00:00
|
|
|
|
|
|
|
1. Make a build directory to leave all the files that are result of
|
|
|
|
the compilation process (`.exe`, `.lib`, `.obj`, `.a`, `.o`, etc).
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
C:\>cd aseprite
|
|
|
|
C:\aseprite>mkdir build
|
2012-07-08 04:41:14 +00:00
|
|
|
|
2013-11-23 19:01:34 +00:00
|
|
|
In this way, if you want to start with a fresh copy of Aseprite
|
2012-07-08 04:41:14 +00:00
|
|
|
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:
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
C:\aseprite>cd build
|
|
|
|
|
|
|
|
If you have ninja:
|
|
|
|
|
|
|
|
C:\aseprite\build>cmake -G Ninja ..
|
2012-07-08 04:41:14 +00:00
|
|
|
|
|
|
|
If you have nmake (MSVC compilers):
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
C:\aseprite\build>cmake -G "NMake Makefiles" ..
|
2012-07-08 04:41:14 +00:00
|
|
|
|
|
|
|
If you have Visual Studio you can generate a solution:
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
C:\aseprite\build>cmake -G "Visual Studio 12 2013" ..
|
2012-07-08 04:41:14 +00:00
|
|
|
|
|
|
|
If you are on Linux:
|
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
~/aseprite/build$ cmake -G "Unix Makefiles" ..
|
2012-07-08 04:41:14 +00:00
|
|
|
|
|
|
|
For more information in [CMake wiki](http://www.vtk.org/Wiki/CMake_Generator_Specific_Information).
|
2016-02-29 15:25:15 +00:00
|
|
|
|
2016-02-29 15:34:55 +00:00
|
|
|
Additionally you can change build settings by passing them on the
|
|
|
|
command line, like so:
|
2015-04-10 12:37:56 +00:00
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
~/aseprite/build$ cmake -DCMAKE_INSTALL_PREFIX=~/software ..
|
2015-12-30 15:29:53 +00:00
|
|
|
|
2016-02-29 15:34:55 +00:00
|
|
|
or later on with a tool like
|
|
|
|
[`ccmake`](https://cmake.org/cmake/help/latest/manual/ccmake.1.html)
|
|
|
|
or
|
|
|
|
[`cmake-gui`](https://cmake.org/cmake/help/latest/manual/cmake-gui.1.html).
|
2015-12-30 15:29:53 +00:00
|
|
|
|
|
|
|
3. After you have executed one of the `cmake -G <generator> ..`
|
2012-07-08 04:41:14 +00:00
|
|
|
commands, you have to compile the project executing make, nmake,
|
|
|
|
opening the solution, etc.
|
|
|
|
|
2014-12-02 14:15:06 +00:00
|
|
|
4. When the project is compiled, you can find the executable file
|
2016-02-29 15:34:55 +00:00
|
|
|
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).
|
2012-07-09 21:29:36 +00:00
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
# Mac OS X details
|
2014-08-14 03:41:30 +00:00
|
|
|
|
2016-04-13 15:02:25 +00:00
|
|
|
From v1.1.4 we compile with Mac OS X 10.11 SDK universal. You should
|
|
|
|
run cmake with the following parameters:
|
2014-08-14 03:41:30 +00:00
|
|
|
|
2016-04-13 15:02:25 +00:00
|
|
|
-D "CMAKE_OSX_ARCHITECTURES:STRING=x86_64"
|
|
|
|
-D "CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7"
|
|
|
|
-D "CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
|
|
|
|
-D "WITH_HarfBuzz:BOOL=OFF"
|
2014-08-14 03:41:30 +00:00
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
## Issues with Retina displays
|
2015-04-17 17:30:09 +00:00
|
|
|
|
|
|
|
If you have a Retina display, check this issue:
|
|
|
|
|
|
|
|
https://github.com/aseprite/aseprite/issues/589
|
|
|
|
|
2015-01-06 12:34:40 +00:00
|
|
|
# Using shared third party libraries
|
2013-11-23 19:32:13 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2016-02-29 15:34:55 +00:00
|
|
|
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.
|
2013-11-23 19:32:13 +00:00
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
## Linux issues
|
2012-07-09 21:29:36 +00:00
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
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](https://github.com/aseprite/aseprite/tree/master/src/allegro):
|
2012-07-09 21:29:36 +00:00
|
|
|
|
2016-04-11 20:50:11 +00:00
|
|
|
* You will
|
|
|
|
[not be able to resize the window](https://github.com/aseprite/aseprite/issues/192)
|
|
|
|
([patch](https://github.com/aseprite/aseprite/commit/920f6275d55113507121afcbcda80adb44cc0563)).
|
|
|
|
* You will have problems
|
|
|
|
[adding HSV colors in non-English systems](https://github.com/aseprite/aseprite/commit/27b55030e26e93c5e8d9e7e21206c8709d46ff22)
|
|
|
|
using the warning icon.
|