adapted scripts to fit in with the thumnail generator

This commit is contained in:
Maxwell Talbot
2020-08-06 11:45:12 +01:00
parent 3fff4ea023
commit f15af60770
5 changed files with 15 additions and 81 deletions

1
.gitignore vendored
View File

@@ -64,3 +64,4 @@ wasm/custom_emcc
skia/dependencies/skia
skia/dependencies/glfw_build
skia/renderer/build/bin
skia/**/build/bin

View File

@@ -20,7 +20,7 @@ RUN /app/skia/dependencies/make_glfw.sh
WORKDIR /app/packages/peon_process
ADD rive /app/rive
ADD skia /app/skia
WORKDIR /app/skia/renderer
WORKDIR /app/skia/thumbnail_generator
RUN /app/skia/renderer/build.sh clean
RUN /app/skia/renderer/build.sh
RUN /app/skia/thumbnail_generator/build.sh clean
RUN /app/skia/thumbnail_generator/build.sh

View File

@@ -1,75 +1,2 @@
#!/bin/sh
# Requires depot_tools and git:
# https://skia.org/user/download
# Build notes:
# https://skia.org/user/build
# GLFW requires CMake
SKIA_REPO=https://github.com/google/skia
GLFW_REPO=https://github.com/glfw/glfw
# -----------------------------
# Get & Build Skia
# -----------------------------
if [ ! -d skia ]; then
echo "Cloning Skia."
git clone $SKIA_REPO
else
echo "Already have Skia, update it."
cd skia && git fetch && git merge master
cd ..
fi
cd skia
python tools/git-sync-deps
bin/gn gen out/Static --args=" \
is_official_build=true \
skia_use_angle=false \
skia_use_dng_sdk=false \
skia_use_egl=false \
skia_use_expat=false \
skia_use_fontconfig=false \
skia_use_freetype=true \
skia_use_system_freetype2=false \
skia_use_icu=false \
skia_use_libheif=false \
skia_use_system_libpng=false \
skia_use_libjpeg_turbo_encode=false \
skia_use_libjpeg_turbo_decode=false \
skia_use_libwebp_encode=false \
skia_use_libwebp_decode=false \
skia_use_lua=false \
skia_use_piex=false \
skia_use_vulkan=false \
skia_use_metal=false \
skia_use_gl=true \
skia_use_zlib=true \
skia_use_system_zlib=false \
skia_enable_ccpr=true \
skia_enable_gpu=true \
skia_enable_fontmgr_empty=false \
skia_enable_spirv_validation=false \
skia_enable_pdf=false \
skia_use_libpng_encode = true \
skia_use_libpng_decode = true \
"
ninja -C out/Static
cd ..
# -----------------------------
# Get & Build GLFW
# -----------------------------
if [ ! -d glfw ]; then
echo "Cloning GLFW."
git clone $GLFW_REPO
else
echo "Already have GLFW, update it."
cd glfw && git fetch && git merge master
cd ..
fi
mkdir glfw_build
cd glfw_build
cmake ../glfw -DBUILD_SHARED_LIBS=OFF
make
./make_skia.sh
./make_glfw.sh

View File

@@ -44,6 +44,7 @@ bin/gn gen out/Static --args=" \
skia_use_piex=false \
skia_use_vulkan=false \
skia_use_metal=false \
skia_use_gl=true \
skia_use_zlib=true \
skia_use_system_zlib=false \
skia_enable_ccpr=true \
@@ -52,7 +53,7 @@ bin/gn gen out/Static --args=" \
skia_enable_spirv_validation=false \
skia_enable_pdf=false \
skia_use_libpng_encode = true \
skia_use_libpng_decode = true
skia_use_libpng_decode = true \
"
ninja -C out/Static
cd ..
cd ..

View File

@@ -11,7 +11,12 @@ includedirs {"../include", "../../../rive/include", "../../renderer/include", ".
"../../dependencies/skia/include/core", "../../dependencies/skia/include/effects",
"../../dependencies/skia/include/gpu", "../../dependencies/skia/include/config"}
links {"Cocoa.framework", "IOKit.framework", "CoreVideo.framework", "rive", "skia", "rive_skia_renderer"}
if os.host() == "macosx" then
links {"Cocoa.framework", "rive", "skia", "rive_skia_renderer"}
else
links {"rive", "skia", "rive_skia_renderer"}
end
libdirs {"../../../rive/build/bin/%{cfg.buildcfg}", "../../dependencies/skia/out/Static",
"../../renderer/build/bin/%{cfg.buildcfg}"}