Ui serving
This commit is contained in:
@@ -207,6 +207,11 @@ void VideoFormatDimensions(const std::string& formatName, unsigned& width, unsig
|
||||
}
|
||||
|
||||
std::filesystem::path FindConfigFile(const std::filesystem::path& relativePath)
|
||||
{
|
||||
return FindRepoPath(relativePath);
|
||||
}
|
||||
|
||||
std::filesystem::path FindRepoPath(const std::filesystem::path& relativePath)
|
||||
{
|
||||
std::vector<std::filesystem::path> starts;
|
||||
starts.push_back(std::filesystem::current_path());
|
||||
|
||||
@@ -29,4 +29,5 @@ private:
|
||||
double FrameDurationMillisecondsFromRateString(const std::string& rateText, double fallbackRate = 59.94);
|
||||
void VideoFormatDimensions(const std::string& formatName, unsigned& width, unsigned& height);
|
||||
std::filesystem::path FindConfigFile(const std::filesystem::path& relativePath = "config/runtime-host.json");
|
||||
std::filesystem::path FindRepoPath(const std::filesystem::path& relativePath);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "AppConfig.h"
|
||||
#include "AppConfigProvider.h"
|
||||
#include "../logging/Logger.h"
|
||||
#include "../runtime/RuntimeShaderBridge.h"
|
||||
#include "../control/RuntimeStateJson.h"
|
||||
@@ -171,7 +172,12 @@ private:
|
||||
};
|
||||
|
||||
std::string error;
|
||||
if (!mHttpServer.Start(std::filesystem::current_path() / "docs", mConfig.http, callbacks, error))
|
||||
if (!mHttpServer.Start(
|
||||
FindRepoPath("ui/dist"),
|
||||
FindRepoPath("docs"),
|
||||
mConfig.http,
|
||||
callbacks,
|
||||
error))
|
||||
{
|
||||
LogWarning("http", "HTTP control server did not start: " + error);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user