Sorry for the code dump...
-
@Vitruvius But good to know it works on your end. :) will try a couple older commits and see if its solved to confirm the new one is still the issue.
-
@Straticah did you clean your build folder and resave the juicer file?
-
@Christoph-Hart Couple of new build errors
../../../../../HISE/hi_tools/hi_standalone_components/ChocWebView.cpp:681:16: error: invalid use of incomplete type ‘class choc::ui::WebView’ 681 | webView->navigate("");
../../../../../HISE/hi_tools/../hi_dsp_library/../hi_tools/../JUCE/modules/juce_core/memory/juce_ByteOrder.h:81:21: error: call of overloaded ‘swap(long unsigned int&)’ is ambiguous 81 | return swap (value);
../../../../../HISE/hi_tools/../hi_dsp_library/../hi_tools/../JUCE/modules/juce_core/memory/juce_ContainerDeletePolicy.h:52:23: error: invalid application of ‘sizeof’ to incomplete type ‘choc::ui::WebView’ 52 | ignoreUnused (sizeof (ObjectType)); | ^~~~~~~~~~~~~~~~~~~
-
@d-healey Alright, I've tried one last time to fix this, if it still doesn't compile now on Linux, I'll boot up the VM and have to check for myself.
-
@Christoph-Hart Time to dust off that VM
I thought these may be related to the gtk version I have, I installed the dev files for gtk2 and passed the paths along within Projucer but it didn't seem to affect the errors.
../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h: In static member function ‘static long unsigned int choc::ui::createJUCEWebViewHolder(choc::ui::WebView&)::Holder::getWindowID(choc::ui::WebView&)’: ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:2034:25: error: ‘gtk_plug_new’ was not declared in this scope; did you mean ‘atk_plug_new’? 2034 | auto plug = gtk_plug_new (0); | ^~~~~~~~~~~~ | atk_plug_new ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:2037:37: error: ‘GTK_PLUG’ was not declared in this scope; did you mean ‘ATK_PLUG’? 2037 | return gtk_plug_get_id (GTK_PLUG (plug)); | ^~~~~~~~ | ATK_PLUG ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:2037:20: error: ‘gtk_plug_get_id’ was not declared in this scope; did you mean ‘atk_plug_get_id’? 2037 | return gtk_plug_get_id (GTK_PLUG (plug)); | ^~~~~~~~~~~~~~~ | atk_plug_get_id
../../../../../HISE/hi_tools/../hi_dsp_library/../hi_tools/../JUCE/modules/juce_core/memory/juce_ByteOrder.h:81:21: error: call of overloaded ‘swap(long unsigned int&)’ is ambiguous 81 | return swap (value);
I've been testing with my fork and your changes merged, but just to be sure I tried your develop branch and I get the same errors.
Also you'll need to merge this before the develop branch will compile on Linux - https://github.com/christophhart/HISE/pull/669
-
@d-healey said in Sorry for the code dump...:
error: ‘gtk_plug_new’ was not declared in this scope; did you mean ‘atk_plug_new’?
alright, just spend an incredibly frustrating hour trying to compile this mess and it cannot find the correct libraries / headers for GTK. There's this hint in the webview code from choc:
- On Linux, you'll need to: 1. Install the libgtk-3-dev and libwebkit2gtk-4.1-dev packages. 2. Link the gtk+3.0 and webkit2gtk-4.1 libraries in your build. You might want to have a look inside choc/tests/CMakeLists.txt for an example of how to add those packages to your build without too much fuss.
I added those, but it kept throwing the same errors at me.
@d-healey maybe you're better at this, as it doesn't seem to be a C++ issue but more like a Linux library / build configuration problem. Even ChatGPT did send me around in circles (not the best advertisement for Vibe coding lol).
If not, I'm happy to revert the commit and reintroduce our friend
SorryDavid
... -
@Christoph-Hart said in Sorry for the code dump...:
but more like a Linux library / build configuration problem.
Yeah that's what I suspected before. I'll play around with it for a bit and see if I can figure it out.
-
@Christoph-Hart Na I can't figure it out. I'm including the correct libraries as shown in the choc/test/cmake file. It keeps saying
gtk_plug_new’ was not declared
which implies that it can't find gtk.h but I've tried including it in a number of places and the error persists.If you're out of ideas too then just roll back to the previous iteration, I'm not missing the webview anyway. I just want to get my hands on that new broadcaster bypass feature :)
-
@d-healey I would love to give this is a shot and get WebViews working on Linux. I have a product which is blocked because of that with some real cool features :))
How would I go about to debug this is the latest develop branch of HISE equipped with all features needed and we just need to link the library?
-
@oskarsh I think you should use the commit from around the time of this thread before Christoph reverted his attempts at getting it running on Linux.
-
the webview websocket stuff sounds super intriguing, was wondering about how to communicate with the webview if I were to use it. is this no longer in the develop branch at all, or is there documentation about it?
-
@thrice801 said in Sorry for the code dump...:
is this no longer in the develop branch at all
Only on Linux, for Windows and MacOS it's there and working, has been for a good while.
-
@d-healey ah sweet thanks
-
@Christoph-Hart don't know if this is helpful or how hard it would be to implement in HISE/C++ side, but, since you never got this running in linux: as an alternative to using websockets (and this would be my preferred way of communication if it were possible), you could potentially ust mqtt for communication. That's what I've done with a pretty large electron sound design app I made, and it works great for ipc and communication. (plus it's more reliable, faster, and cleaner because you have topic based message routing).
Basically main process just spins up an mqtt broker on launch, and then all my different webviews, and swift audio rendering processes, just connect to the main broker and use that for pub sub. Disadvantage would be people would have to include a lib like https://github.com/mqttjs in their webview, but it looks like you need to add a little code already anyways to get the comms working.