官方网站 : https://www.aseprite.org/
Aseprite编译 步骤 :
1> App Store 下载安装 XCode
2> 安装 brew
# /bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
或
# /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
3> 安装 cmake
# brew install cmake
4> 安装 Ninja
# brew install ninja
5> clone Aseprite 仓库 :
GitHub地址 : https://github.com/aseprite/aseprite
# git clone --recursive https://github.com/aseprite/aseprite
由于仓库引用别的项目,需要则将 --recursive 参数
6> 下载并解压 Skia :
下载地址 https://github.com/aseprite/skia/releases
7> 编译
Intel 芯片 :
# cd Aseprite根目录
# mkdir build
# cd build
# cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.5 \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-DLAF_BACKEND=skia \
-DSKIA_DIR=Skia目录/Skia-macOS-Release-x64 \
-DSKIA_LIBRARY_DIR=Skia目录/Skia-macOS-Release-x64/out/Release-x64 \
-DSKIA_LIBRARY=Skia目录Skia-macOS-Release-x64/out/out/Release-x64/libskia.a \
-G Ninja \
..
# ninja aseprite
M1 M2 芯片 :
# cd Aseprite根目录
# mkdir build
# cd build
# cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES=arm64\
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.5 \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-DLAF_BACKEND=skia \
-DSKIA_DIR=Skia目录/Skia-macOS-Release-x64 \
-DSKIA_LIBRARY_DIR=Skia目录/Skia-macOS-Release-x64/out/Release-arm64 \
-DSKIA_LIBRARY=Skia目录Skia-macOS-Release-x64/out/Release-arm64/libskia.a \
-G Ninja \
..
# ninja aseprite
编译过程中可能出现的问题 :
<1> MACOSX_RPATH is enabled by default. 报错
...
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
ClangWrapper
Structure
WCETXML
This warning is for project developers. Use -Wno-dev to suppress it.
解决方案 : 将 set(CMAKE_MACOSX_RPATH 1) 添加到 Aseprite根目录/CMakeLists.txt 中,就不会有上述问题
<2> skia 目录配置异常
...
-- Configuring done (102.2s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
WEBP_LIBRARIES
linked by target "app-lib" in directory /Users/chenshun/Desktop/workspace/asepite/aseprite/src/app
检查 skia 目录,Intel 芯片 和 M1 M2 芯片 目录是不一样的
8> 编译好后在 build/bin/ 中看到编译好的 aseprite,双击 aseprite 就可以运行
9> 组装成App应用
进入“应用程序”目录(/Applications),新建一个文件夹Aseprite.app :
接下来添加 Icon,右键菜单选择“显示简介”,然后打开之前编译好的文件,在 build/bin/data 中有个icons目录,这里有各种样式的 Icon,选择ase.ico,将其拖到简介的左上角,就可以修改好图标
右键应用程序里的Aseprite,点击“显示包内容”,然后新建一个名为Contents的文件夹,再在Contents里面新建一个名为MacOS的文件夹
将之前 build/bin中的data目录和aseprite可执行文件拷贝过来 :
这时候你点击应用程序里的Aseprite,便会像正常程序一样运行
编译好的Aseprite https://download.csdn.net/download/chenshun123/88657280