Closed atsushieno closed 2 years ago
Thanks for trying out OS-251!
Did you try release build?
If you build the debug version, it tries to use main.js
in the local development host.
But when it's release version, it uses main.js
embedded in the plugins' binary.
In details, it does following:
main.js
is embedded in the plugin's binary using JUCE's BinaryData
.main.js
to File::tempDirectory using createTempFilebundle
main.js
based on the bundle
's value2 and 3 are done in https://github.com/utokusa/OS-251/commit/89eccbfb4c6dbf747636544d7b0165a32bec37ca#diff-578bbcf45713dbccea501c1c5258f5ee4969efffd9a8ad487ec734271664498aR85-R92
I don't know much about JUCE with Android
, but for other OSs which OS-251 supports, it works fine because File::tempDirectory
is determined at runtime.
Ah, I missed that #if JUCE_DEBUG
section. Alright, for debugging it should work fine on non-cross-compiling environment.
I have added the following changes (among other messy changes for Android) in CMakeLists.txt
and changed the condition to #if JUCE_DEBUG && !OS251_CROSSCOMPILING
and fixed the problem.
+if (CMAKE_CROSSCOMPILING)
+add_compile_definitions(OS251_CROSSCOMPILING=1)
+endif (CMAKE_CROSSCOMPILING)
I'm not sure if that is an ideal solution with CMake but works. (Not really as a plugin yet, needs more investigation.)
Glad to hear that you can run OS-251 now!
I am looking for a better way too :)
I'm trying to build OS-251 for Android (as an example port of my framework project) and it's getting closer to working state. But I'm stuck at
Os251AudioProcessorEditor::getBundle()
which tries to load resources from my local development host (which does not exist on the target device):https://github.com/utokusa/OS-251/commit/89eccbfb4c6dbf747636544d7b0165a32bec37ca#diff-578bbcf45713dbccea501c1c5258f5ee4969efffd9a8ad487ec734271664498aR95
I'm sure this won't work when it is distributed as binaries either. Maybe that resource should be generated and bundled at build time? I'm not sure how typical react-juce projects deal with it though...