virtualx-engine/thirdparty/thorvg/update-thorvg.sh
Martin Capitanio aab650f2ef ThorVG: update to v0.11.0 release.
See https://github.com/thorvg/thorvg/releases/tag/v0.11.0

+ Infrastructure
    Repository folder structure was make it more intuitive and coherent.
        "thorvg/src/lib" -> "thorvg/src/common"
            (providing essential common functionalities
                used internally among the renderer and sub-modules)
        "thorvg/src/lib" -> "thorvg/src/renderer"
            (for vector drawing features)

+ SVG related
    Fix stroke regression https://github.com/thorvg/thorvg/issues/1670
    Support stroke dash offset function https://github.com/thorvg/thorvg/issues/1591#issuecomment-1681319321
    Support Focal property in Radial Gradient https://github.com/thorvg/thorvg/issues/1558
2023-09-29 19:50:19 +02:00

60 lines
1.3 KiB
Bash
Executable file

#!/bin/bash -e
VERSION=0.11.0
cd thirdparty/thorvg/ || true
rm -rf AUTHORS LICENSE inc/ src/ *.zip *.tar.gz tmp/
mkdir tmp/ && pushd tmp/
# Release
curl -L -O https://github.com/thorvg/thorvg/archive/v$VERSION.tar.gz
# Current Github main branch tip
#curl -L -O https://github.com/thorvg/thorvg/archive/refs/heads/main.tar.gz
tar --strip-components=1 -xvf *.tar.gz
rm *.tar.gz
# Install from local git checkout "thorvg-git" in the same directory
# as godot git checkout.
#d="../../../../thorvg-git"
#cp -r ${d}/AUTHORS ${d}/inc ${d}/LICENSE ${d}/src .
find . -type f -name 'meson.build' -delete
# Fix newline at end of file.
for source in $(find ./ -type f \( -iname \*.h -o -iname \*.cpp \)); do
sed -i -e '$a\' $source
done
cp -v AUTHORS LICENSE ..
cp -rv inc ../
cat << EOF > ../inc/config.h
#ifndef THORVG_CONFIG_H
#define THORVG_CONFIG_H
#define THORVG_SW_RASTER_SUPPORT
#define THORVG_SVG_LOADER_SUPPORT
// For internal debugging:
//#define THORVG_LOG_ENABLED
#define THORVG_VERSION_STRING "$VERSION"
#endif
EOF
mkdir ../src
cp -rv src/common ../src
cp -rv src/renderer ../src/
# Only sw_engine is enabled.
rm -rfv ../src/renderer/gl_engine
# Only svg (+raw) loader is enabled.
mkdir ../src/loaders
cp -rv src/loaders/svg src/loaders/raw ../src/loaders/
popd
rm -rf tmp