1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Aseprite を Windows でビルドする備忘録

1
Posted at

基本はこれを参照。
何回やっても Skia のインストールを忘れてしまい時間を浪費する問題があったため、備忘録を書くことにした。

ビルド方法

Dependencies に書いてある CMake および Ninja はインストール済みとします。

Git リポジトリをクローンする

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

Skia を入れる

任意の場所(ここでは Z:/aseprite/skia とする)に aseprite/skia の事前ビルド済みバイナリパッケージを展開し入れます。

執筆時点では Skia-m124 を入れろという指示がありました。
aseprite/skia には Skia-m148 (beta) もあるので、いずれ変更されるかもしれません。

ビルド

"x64 Native Tools Command Prompt for VS 2022" を実行して以下の手順を行います。

ビルド用のディレクトリを作成します。

cd Z:/aseprite
mkdir build
cd build

cmake を叩きます。
-DCMAKE_C_FLAGS="/w" -DCMAKE_CXX_FLAGS="/w" を入れておくと警告が表示されなくて快適です。

cmake ^
  -DLAF_BACKEND=skia ^
  -DSKIA_DIR=Z:/aseprite/skia ^
  -DSKIA_LIBRARY_DIR=Z:/aseprite/skia/out/Release-x64 ^
  -DSKIA_LIBRARY=Z:/aseprite/skia/out/Release-x64/skia.lib ^
  -G Ninja -DCMAKE_C_FLAGS="/w" -DCMAKE_CXX_FLAGS="/w" ..

ビルドします。

ninja aseprite

トラブルシューティング

clang++: error: unsupported option '-fPIC' for target 'x86_64-pc-windows-msvc'

Clang を使用していることで起きるエラーです。
MSVC を利用するため、build ディレクトリの中身を消してから、以下を試してください:

  • x64 Native Tools Command Prompt for VS 2022 を起動して、パスが通った状態でもう一度行う
    • なお、起動した後 powershell を実行して PowerShell にするほうが楽
  • C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64 など、手動で cl.exe がある場所にパスを通す
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?