修复linux启动问题
This commit is contained in:
@@ -120,8 +120,8 @@ void fastweb::module_manager::start()
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// Linux
|
// Linux
|
||||||
{
|
{
|
||||||
m_lua_include_path += ";/usr/local/lib/lua/5.3/?.lua";
|
m_lua_include_path += ";/opt/luarocks/lib/lua/5.4/?.lua";
|
||||||
m_lua_include_cpath += ";/usr/local/share/lua/5.3/?.lua";
|
m_lua_include_cpath += ";/opt/luarocks/lib/lua/5.4/?.so";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// 用户
|
// 用户
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <regex>
|
#include <regex>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include <filesystem>
|
||||||
#include "util/ini.h"
|
#include "util/ini.h"
|
||||||
#include "util/file.h"
|
#include "util/file.h"
|
||||||
#include "util/system.h"
|
#include "util/system.h"
|
||||||
@@ -44,7 +45,7 @@ std::tuple<bool,std::string> parseconfig(ylib::ini &ini,const std::string& ini_f
|
|||||||
src_content = strutils::replace(src_content, "${current_dir}", strutils::replace(system::current_dir(),'\\','/'));
|
src_content = strutils::replace(src_content, "${current_dir}", strutils::replace(system::current_dir(),'\\','/'));
|
||||||
// 配置文件目录
|
// 配置文件目录
|
||||||
{
|
{
|
||||||
std::string ini_dir = ylib::file::parent_dir(ini_filepath);
|
std::string ini_dir = ylib::file::parent_dir(std::filesystem::absolute(ini_filepath).string());
|
||||||
src_content = strutils::replace(strutils::replace(src_content, "${config_dir}", ini_dir), '\\', '/');
|
src_content = strutils::replace(strutils::replace(src_content, "${config_dir}", ini_dir), '\\', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,4 +69,4 @@ std::tuple<bool,std::string> parseconfig(ylib::ini &ini,const std::string& ini_f
|
|||||||
ini.open(temp_filepath);
|
ini.open(temp_filepath);
|
||||||
|
|
||||||
return std::make_tuple(true,"");
|
return std::make_tuple(true,"");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ void fastweb::install_module_linux(fastweb::module_info info)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::cout<<"正在安装 `"<<info.name_en<<"` 库"<<std::endl;
|
std::cout<<"正在安装 `"<<info.name_en<<"` 库"<<std::endl;
|
||||||
auto [code,err] = execute_command("sudo luarocks install "+info.name_en+" LUA_INCDIR=/opt/lua54/include LUA_LIBDIR=/opt/lua54/lib");
|
auto [code,err] = execute_command("sudo /opt/luarocks/bin/luarocks install "+info.name_en+" LUA_INCDIR=/opt/lua54/include LUA_LIBDIR=/opt/lua54/lib");
|
||||||
if(code == 0)
|
if(code == 0)
|
||||||
{
|
{
|
||||||
std::cout<<"安装成功"<<std::endl;
|
std::cout<<"安装成功"<<std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user