rive-cpp icon indicating copy to clipboard operation
rive-cpp copied to clipboard

Windows viewer

Open luigi-rosso opened this issue 2 years ago • 5 comments

Exploring what support for a Windows viewer would look like.

Currently required creating a separate build folder for Windows with its own Premake. I've done a better job in other projects (like rive-unity) of maintaining one premake5.lua for all environments. Our current one in this repo is just a little too funky to patch for this (we import multiple premake scripts and they each sort of do their own thing to try to be OS-agnostic, but none of them really do it well).

Only real code change is the need to supply "b" to fopen on Windows. The rest of it is config and dependency retrieval/building.

Readme with requirements here: https://github.com/rive-app/rive-cpp/tree/windows_viewer/skia/viewer/build/windows

luigi-rosso avatar Jun 13 '22 23:06 luigi-rosso

Oh this new gmtime stuff is throwing windows as gmtime_r isn't availbale there. I'm going to ifdef this out as it should be experimental anyway.

luigi-rosso avatar Jun 13 '22 23:06 luigi-rosso

I'd like to land this so the Noesis team can keep using it. It's not an ideal build system design but it does unblock an important initiative.

luigi-rosso avatar Jun 20 '22 17:06 luigi-rosso

thanks @luigi-rosso but how to build rive-cpp for windows? if we want to use it as a third party library in our application? there is any way to build it on windows? please let me know!

madoodia avatar Oct 24 '23 16:10 madoodia

I build it on Windows in our RiveQtQuickPlugin.

Since Qt uses cmake, I basically just created simple cmakelists files out of source and avoid using premake5.

With that I can build it with visual studio compiler, gcc (with a small patch), clang,...

Just take a look at the repo.

jebos avatar Oct 24 '23 17:10 jebos

Thanks @jebos I'll take a look to see how did you compile rive-cpp as a third party to your project I'll ask upcoming questions, if you answer It would be great! thanks

madoodia avatar Oct 24 '23 18:10 madoodia