Feature/wasm remote 2#1288
Conversation
| url = https://github.com/Vidvox/hap | ||
| [submodule "3rdparty/qml-remote"] | ||
| path = 3rdparty/qml-remote | ||
| url = https://github.com/ossia/qml-remote.git |
There was a problem hiding this comment.
let's remove that part, we don't want this as a submodule
| "RemoteControl/DocumentPlugin.hpp" | ||
| "i-score-remote/RemoteApplication.hpp" | ||
| "score_plugin_remotecontrol.hpp" | ||
| "RemoteControl/Http_server.hpp" |
There was a problem hiding this comment.
Can you name that file HttpServer in line with the rest of score ?
| "${CMAKE_CURRENT_SOURCE_DIR}/score_plugin_remotecontrol.cpp" | ||
| ) | ||
|
|
||
| file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/RemoteControl/build-wasm/ DESTINATION ${CMAKE_BINARY_DIR}/src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/) |
There was a problem hiding this comment.
we won't need that: the remote's .wasm file is not supposed to be built as part of score but in a different repo which will be in the package manager
|
|
||
| protected: | ||
| void on_createdDocument(score::Document& doc) override; | ||
| Http_server m_server; |
| { | ||
| auto const address2 = net::ip::make_address("0.0.0.0"); | ||
| auto const port = static_cast<unsigned short>(std::atoi("8080")); | ||
| auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); |
There was a problem hiding this comment.
this line only works on the build computer.
instead we have to look for it in the user library which is where it will be installed on the user's computer:
#include <Library/LibrarySettings.hpp>
#include <score/application/ApplicationContext.hpp>
QString chemin_vers_dossier_packages = score::AppContext().settings<Library::Settings::Model>().getPackagesPath();
| auto const port = static_cast<unsigned short>(std::atoi("8080")); | ||
| auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); | ||
| // auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); | ||
| std::string packagesPath = score::AppContext().settings<Library::Settings::Model>().getPackagesPath().toUtf8().constData(); |
There was a problem hiding this comment.
getPackagesPath().toStdString() :-)
| auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); | ||
| // auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); | ||
| std::string packagesPath = score::AppContext().settings<Library::Settings::Model>().getPackagesPath().toUtf8().constData(); | ||
| QDebug << "packagesPath :" << packagesPath; |
There was a problem hiding this comment.
No need for the QDebug anymore (.. does that compile ? it's supposed to be qDebug())
| auto const address2 = net::ip::make_address("0.0.0.0"); | ||
| auto const port = static_cast<unsigned short>(std::atoi("8080")); | ||
| auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); | ||
| // auto const m_docRoot = std::make_shared<std::string>("./src/plugins/score-plugin-remotecontrol/CMakeFiles/score_plugin_remotecontrol.dir/RemoteControl/build-wasm/"); |
|
|
||
| std::thread m_serverThread; | ||
| int m_listenSocket{}; | ||
| std::string buildWasmPath; |
|
done @jcelerier |
| ApplicationPlugin::~ApplicationPlugin() | ||
| { | ||
| std::remove((m_server.m_buildWasmPath + "remote.html").c_str()); | ||
| std::rename((m_server.m_buildWasmPath + "remote.html~").c_str(), (m_server.m_buildWasmPath + "remote.html").c_str()); |
1d961e8 to
919e08a
Compare
9a9b382 to
28c6d0a
Compare
ac5bf9a to
fd8efed
Compare
a402674 to
c16c15a
Compare
ff76fa0 to
1e41cd2
Compare
|
superseded by #2104 |
|
(@thibaudk were all my comments here taken into account ? ) |
In the process of |
No description provided.