chore: update thumbnailer for new rive building set-up 9fd4961e9b

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
This commit is contained in:
mjtalbot
2025-07-15 20:58:14 +00:00
parent 912438bf52
commit 9064f36eb9
4 changed files with 75 additions and 104 deletions

View File

@@ -1 +1 @@
8b7aa847042cbb17ee62d126d3b488dc7a4f8614
9fd4961e9bf4da4198a43bb5ec00baf5d2cf1561

View File

@@ -9,26 +9,28 @@ else
export RIVE_RUNTIME_DIR="$PWD/../../../runtime"
fi
cd ../renderer
./build.sh "$@"
source "$RIVE_RUNTIME_DIR"/dependencies/config_directories.sh
cd "$BASEDIR"
export SKIA_REPO="https://github.com/rive-app/skia.git"
export SKIA_BRANCH="bae2881014cb5c3216184cbb0b639045b8804931"
export SKIA_COMMIT=$SKIA_BRANCH
# could call this thumbnailer, but we can share.
export CACHE_NAME="rive_recorder"
export MAKE_SKIA_FILE="make_skia_recorder.sh"
export SKIA_DIR_NAME="skia"
export SKIA_DIR="skia"
build_deps() {
pushd "$RIVE_RUNTIME_DIR"/skia/dependencies
./make_skia_recorder.sh
popd
echo "$RIVE_RUNTIME_DIR"
pwd
}
build_deps
cd build
OPTION=$1
export PREMAKE_PATH="$RIVE_RUNTIME_DIR/build":$PREMAKE_PATH
if [ "$OPTION" = 'help' ]; then
echo build.sh - build debug library
echo build.sh clean - clean the build
echo build.sh release - build release library
elif [ "$OPTION" = "clean" ]; then
echo Cleaning project ...
premake5 clean --scripts="$RIVE_RUNTIME_DIR/build"
elif [ "$OPTION" = "release" ]; then
premake5 gmake --scripts="$RIVE_RUNTIME_DIR/build" --with_rive_text --with_rive_layout && make config=release -j7
else
premake5 gmake --scripts="$RIVE_RUNTIME_DIR/build" --with_rive_text --with_rive_layout && make -j7
if [[ $1 != "skip" ]]; then
build_rive.sh $@
fi

View File

@@ -1,95 +1,64 @@
workspace('rive')
configurations({ 'debug', 'release' })
require('setup_compiler')
dofile('rive_build_config.lua')
RIVE_RUNTIME_DIR = os.getenv('RIVE_RUNTIME_DIR') or '../../../'
SKIA_DIR_NAME = os.getenv('SKIA_DIR_NAME') or 'skia'
BASE_DIR = path.getabsolute(RIVE_RUNTIME_DIR .. '/build')
location('./')
dofile(path.join(BASE_DIR, 'premake5.lua'))
dofile(path.join(RIVE_RUNTIME_DIR, 'premake5_v2.lua'))
BASE_DIR = path.getabsolute(RIVE_RUNTIME_DIR .. '/skia/renderer')
dofile(path.join(BASE_DIR, 'premake5_v2.lua'))
BASE_DIR = path.getabsolute(RIVE_RUNTIME_DIR .. '/skia/renderer/build')
location('./')
dofile(path.join(BASE_DIR, 'premake5.lua'))
project('rive_thumbnail_generator')
kind('ConsoleApp')
language('C++')
cppdialect('C++17')
targetdir('%{cfg.system}/bin/%{cfg.buildcfg}')
objdir('%{cfg.system}/obj/%{cfg.buildcfg}')
do
kind('ConsoleApp')
exceptionhandling('On')
rtti('On')
includedirs({
RIVE_RUNTIME_DIR .. '/include',
RIVE_RUNTIME_DIR .. '/skia/renderer/include',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME,
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/core',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/effects',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/gpu',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/config',
})
if os.host() == 'macosx' then
links({
'Cocoa.framework',
'rive',
'skia',
'rive_skia_renderer',
'rive_harfbuzz',
'rive_sheenbidi',
includedirs({
RIVE_RUNTIME_DIR .. '/include',
RIVE_RUNTIME_DIR .. '/skia/renderer/include',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME,
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/core',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/effects',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/gpu',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/include/config',
'/usr/local/include',
'/usr/include',
yoga,
})
else
links({
'rive',
'rive_skia_renderer',
'skia',
'GL',
'rive_harfbuzz',
'rive_sheenbidi',
})
end
libdirs({
'../../../build/%{cfg.system}/bin/%{cfg.buildcfg}',
'../../dependencies/skia/out/static',
'../../renderer/build/%{cfg.system}/bin/%{cfg.buildcfg}',
})
files({ '../src/**.cpp' })
buildoptions({ '-Wall', '-fno-exceptions', '-fno-rtti' })
filter('configurations:debug')
defines({ 'DEBUG' })
symbols('On')
filter('configurations:release')
defines({ 'RELEASE' })
defines({ 'NDEBUG' })
optimize('On')
filter({ 'options:with_rive_layout' })
do
defines({ 'YOGA_EXPORT=' })
includedirs({ yoga })
links({
'rive_yoga',
})
end
-- Clean Function --
newaction({
trigger = 'clean',
description = 'clean the build',
execute = function()
print('clean the build...')
os.rmdir('./bin')
os.rmdir('./obj')
os.remove('Makefile')
-- no wildcards in os.remove, so use shell
os.execute('rm *.make')
print('build cleaned')
end,
})
if os.host() == 'macosx' then
links({
'Cocoa.framework',
'skia',
'rive',
'rive_skia_renderer',
'rive_harfbuzz',
'rive_sheenbidi',
'rive_yoga',
})
else
links({
'skia',
'GL',
'rive',
'rive_skia_renderer',
'rive_harfbuzz',
'rive_sheenbidi',
'rive_yoga',
})
end
libdirs({
-- hmm nothing here?
-- RIVE_RUNTIME_DIR .. '/build/%{cfg.system}/bin/%{cfg.buildcfg}',
-- RIVE_RUNTIME_DIR .. '/dependencies/%{cfg.system}/cache/bin/%{cfg.buildcfg}',
RIVE_RUNTIME_DIR .. '/skia/dependencies/' .. SKIA_DIR_NAME .. '/out/static',
RIVE_RUNTIME_DIR .. '/skia/renderer/build/%{cfg.system}/bin/%{cfg.buildcfg}',
'/usr/local/lib',
'/usr/lib',
})
files({ '../src/**.cpp',})
end

View File

@@ -1 +1 @@
./build/bin/debug/rive_thumbnail_generator
./build/out/release/rive_thumbnail_generator