64 lines
2.9 KiB
Bash
Executable file
64 lines
2.9 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#
|
|
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in
|
|
# all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
#
|
|
|
|
|
|
if [[ ! -d depot_tools ]]; then
|
|
sudo apt-get install -y libgnutls28-dev libbz2-dev libharfbuzz-dev g++ cmake ninja-build libx11-dev libxcursor-dev libgl1-mesa-dev libfontconfig1-dev
|
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
git clone -b aseprite-m102 https://github.com/aseprite/skia.git
|
|
export PATH="${PWD}/depot_tools:${PATH}"
|
|
cd skia
|
|
python tools/git-sync-deps
|
|
# gn gen out/Release-x64 --args='is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false cc="clang" cxx="clang++" extra_cflags_cc=["-stdlib=libc++"] extra_ldflags=["-stdlib=libc++"]'
|
|
gn gen out/Release-x64 --args="is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false"
|
|
ninja -C out/Release-x64 skia modules
|
|
fi
|
|
|
|
if [[ ! -d aseprite ]]; then
|
|
git clone https://github.com/aseprite/aseprite.git aseprite-source
|
|
pushd aseprite-source
|
|
git submodule update --init --recursive
|
|
popd
|
|
fi
|
|
|
|
SKIA=$(pwd)/skia
|
|
|
|
pushd aseprite-source
|
|
if [[ -d .builddir ]]; then
|
|
rm -rf .builddir
|
|
fi
|
|
|
|
mkdir -p .builddir
|
|
|
|
cd .builddir
|
|
cmake \
|
|
-G Ninja \
|
|
-DLAF_BACKEND=skia \
|
|
-DSKIA_DIR=${SKIA} \
|
|
..
|
|
ninja aseprite
|
|
popd
|
|
|
|
mkdir -p aseprite
|
|
mv -f aseprite-source/.builddir/bin/* aseprite/.
|