Fixed some relative paths to ease deployment on non a root path. Ref #41

This commit is contained in:
emeric
2020-04-03 14:43:04 +02:00
parent 5e8e46e77f
commit 9d06b02acc
4 changed files with 20 additions and 8 deletions
+3 -1
View File
@@ -43,13 +43,15 @@ std::vector<std::string> generateWtConfig(std::string execPath)
const std::filesystem::path wtConfigPath {ServiceProvider<IConfig>::get()->getPath("working-dir") / "wt_config.xml"};
const std::filesystem::path wtLogFilePath {ServiceProvider<IConfig>::get()->getPath("log-file", "/var/log/lms.log")};
const std::filesystem::path wtAccessLogFilePath {ServiceProvider<IConfig>::get()->getPath("access-log-file", "/var/log/lms.access.log")};
const std::filesystem::path wtResourcesPath {ServiceProvider<IConfig>::get()->getPath("wt-resources", "/usr/share/Wt/resources")};
args.push_back(execPath);
args.push_back("--config=" + wtConfigPath.string());
args.push_back("--docroot=" + ServiceProvider<IConfig>::get()->getString("docroot"));
args.push_back("--approot=" + ServiceProvider<IConfig>::get()->getString("approot"));
args.push_back("--deploy-path=" + ServiceProvider<IConfig>::get()->getString("deploy-path", "/"));
args.push_back("--resources-dir=" + ServiceProvider<IConfig>::get()->getString("wt-resources"));
if (!wtResourcesPath.empty())
args.push_back("--resources-dir=" + wtResourcesPath.string());
if (ServiceProvider<IConfig>::get()->getBool("tls-enable", false))
{
+3 -3
View File
@@ -153,9 +153,9 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env,
messageResourceBundle().use(appRoot() + "tracksinfo");
// Require js here to avoid async problems
requireJQuery("/js/jquery-1.10.2.min.js");
require("/js/mediaplayer.js");
require("/js/bootstrap-notify.js");
requireJQuery("js/jquery-1.10.2.min.js");
require("js/mediaplayer.js");
require("js/bootstrap-notify.js");
setTitle("LMS");