Hi Kirill, Ok, so with help from here (https://github.com/pgregory/libffi-msvc) I think I've now got a VS project / makefile that builds libffi.lib, but I can't work out how to get the build script to build the visual studio project!
The project is in modules\media\src\main\native\vs_project\libffi, and I've updated FXMedia.sln to include it - this builds ok, but the makefile then expects the object files in modules\media\build\native\win\Release\obj\3rd_party\libffi-lite (I deliberately kept this structure for consistency with the other projects), and I can't seem to work out where in the script they're copied across from the visual studio project (I feel like this should be the easy bit of this step!) If I copy them there manually it works and builds libffi-lite.lib, but obviously this isn't ideal - if it's not too much hassle could someone point me at the relevant place? Many thanks, Michael On 27 March 2014 08:58, Kirill Kirichenko <kirill.kiriche...@oracle.com>wrote: > > > On 27.03.2014 03:53, Michael Berry wrote: > >> Unfortunately I seem to have become a bit stuck at step one! I'm >> probably missing a few things that are rather obvious, but haven't >> really got much experience at all in this area, so am relying on >> haphazard Googling and a bit of guesswork! It may well be that updating >> the framework is a bit beyond my skillset for the time I have available >> at the moment, but I'll keep pushing on if anyone's willing to give me a >> bit of guidance on it. >> > Yes. It's not trivial at all. You need to have enough patience to go > through all the steps. > > > Firstly libffi - I've downloaded that, put it in the 3rd_party folder, >> and have run "./configure", "make", then "make install" (all under >> cygwin.) That seems fine; so I've now got "libffi.a" (as well as >> "cygffi-6.dll") in "3rd_party\libffi\i686-pc-cygwin\.libs". >> > The challenge here is first to build libffi with Mircosoft C compiler and > linker. Here at the first stage you should take libffi and put it somewhere > separately from javafx. Then try to build it with VisualStudio. Once you > succeed you should create a makefile in the manner of javafx makefiles for > Media. As the result of this step you'll get a bunch of C/Header files, the > makefile. Everything else can be deleted. The resulting makefile should be > able to build libffi.lib - statically linked library. > > I've then grabbed glib 2.40, placed that in the glib folder, and >> attempted the same process - this first complained about a lack of >> libiconv, so I grabbed that and set the appropriate flags to point to >> it, and now I get the following: >> >> /configure: error: in >> `/cygdrive/c/Users/Michael/Documents/JFX8/modules/media/ >> src/main/native/gstreamer/3rd_party/glib/glib-2.28.8':/ >> /configure: error: The pkg-config script could not be found or is too >> >> old. Make sure it is in your PATH or set the PKG_CONFIG environment >> variable to the full path to pkg-config./ >> / >> / >> /Alternatively, you may set the environment variables LIBFFI_CFLAGS and >> LIBFFI_LIBS to avoid the need to call pkg-config./ >> > > For GLib you can disable iconv in configure. This is the next step. Let's > start with libffi first. > > > >> I'm assuming this is something to do with the fact it can't find libffi, >> but I'm unaware of how to tell it that libffi is in the given folder! >> I'm also assuming that calling config / make etc. manually is the way to >> go for the time being - I think I'd be at even more of a loss trying to >> integrate it into the gradle build script. >> > The reason for this to be "such non trivial" is/was the download size. We > aimed the minimal possible download size. This is probably not an issue > anymore and we can switch to simpler solutions like you originally did - > download, unzip, run configure and here we go. > > K >