rive-app / rive-android

A runtime for interactive animations on Android
https://rive.app
MIT License
350 stars 31 forks source link

Updating rive-android for changes to rive-cpp. #225

Closed luigi-rosso closed 2 years ago

luigi-rosso commented 2 years ago

We changed rive-cpp so that it can build regular skia and the rive optimized (slimmed down) skia. We do this by building two versions of skia, so anything depending on the optimized one needs to update references. Lots of this was done in rive-app/rive-cpp but some needs to done in the various runtimes. I think this is all that's necessary here but please take a look!

mjtalbot commented 2 years ago

linking #226

mjtalbot commented 2 years ago

I think having looked at the other pr properly. this should be a no change, so building the .so's should result in the same files. @luigi-rosso if thats right, then its obviously just hit merge

mjtalbot commented 2 years ago

running into issues building. got to the bottom of it

below makes it work, obviously we can't commit it as is. probably relates to ios too?

diff --git a/skia/renderer/build/premake5.lua b/skia/renderer/build/premake5.lua
index 4303423..b71bc93 100644
--- a/skia/renderer/build/premake5.lua
+++ b/skia/renderer/build/premake5.lua
@@ -8,9 +8,9 @@ project "rive_skia_renderer"
     toolset "clang"
     targetdir "%{cfg.system}/bin/%{cfg.buildcfg}"
     objdir "%{cfg.system}/obj/%{cfg.buildcfg}"
-    includedirs {"../include", "../../../include", "../../dependencies/skia", "../../dependencies/skia/include/core",
-             "../../dependencies/skia/include/effects", "../../dependencies/skia/include/gpu",
-             "../../dependencies/skia/include/config"}
+    includedirs {"../include", "../../../include", "../../dependencies/skia_rive_optimized", "../../dependencies/skia_rive_optimized/include/core",
+             "../../dependencies/skia_rive_optimized/include/effects", "../../dependencies/skia_rive_optimized/include/gpu",
+             "../../dependencies/skia_rive_optimized/include/config"}

     if os.host() == "macosx" then
         links {"Cocoa.framework", "rive", "skia"}
@@ -18,7 +18,7 @@ project "rive_skia_renderer"
         links {"rive", "skia"}
     end

-    libdirs {"../../../build/%{cfg.system}/bin/%{cfg.buildcfg}", "../../dependencies/skia/out/static"}
+    libdirs {"../../../build/%{cfg.system}/bin/%{cfg.buildcfg}", "../../dependencies/skia_rive_optimized/out/arm64"}

     files {"../src/**.cpp"}
mjtalbot commented 2 years ago

oh. it fails. great!