Ui serving
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m55s
CI / Windows Release Package (push) Successful in 3m21s

This commit is contained in:
Aiden
2026-05-12 13:25:34 +10:00
parent bc690e2a87
commit b44504500a
7 changed files with 118 additions and 4 deletions

View File

@@ -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());

View File

@@ -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);
}

View File

@@ -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;