Eliminate lpx-paths.hpp, which contains hardwired paths.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "LockedWrapper.h"
|
||||
#include "lpx-drvutil.hpp"
|
||||
#include "lpx-paths.hpp"
|
||||
#include "Misc/Paths.h"
|
||||
|
||||
using namespace LpxCommonTypes;
|
||||
|
||||
@@ -17,7 +17,13 @@ void FlxLockedWrapper::InitWrapper() {
|
||||
// Already initialized.
|
||||
return;
|
||||
}
|
||||
FString dll((const UTF8CHAR*)LUPREX_DLL_PATH);
|
||||
#if PLATFORM_LINUX
|
||||
FString dll = FPaths::Combine(FPaths::ProjectDir(), TEXT("luprex/build/Linux/luprexlib.so"));
|
||||
#elif PLATFORM_WINDOWS
|
||||
FString dll = FPaths::Combine(FPaths::ProjectDir(), TEXT("luprex/build/Windows/luprexlib.dll"));
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
UE_LOG(LogLuprex, Verbose, TEXT("Luprex DLL Path: %s"), *dll);
|
||||
void* DLL = FPlatformProcess::GetDllHandle(*dll);
|
||||
if (DLL != nullptr) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "LuprexGameModeBase.h"
|
||||
#include "lpx-drvutil.hpp"
|
||||
#include "lpx-paths.hpp"
|
||||
#include "Misc/Paths.h"
|
||||
#include "Tangible.h"
|
||||
#include "TangibleManager.h"
|
||||
#include "LuaCall.h"
|
||||
@@ -41,7 +41,8 @@ uint32 ALuprexGameModeBase::Run() {
|
||||
if (lockedwrap->get_rescan_lua_source(lockedwrap.Get()))
|
||||
{
|
||||
drvutil::ostringstream srcpak;
|
||||
std::string srcpakerr = drvutil::package_lua_source(LUPREX_ROOT_PATH, &srcpak);
|
||||
FString LuprexRoot = FPaths::Combine(FPaths::ProjectDir(), TEXT("luprex"));
|
||||
std::string srcpakerr = drvutil::package_lua_source(TCHAR_TO_UTF8(*LuprexRoot), &srcpak);
|
||||
if (!srcpakerr.empty())
|
||||
{
|
||||
FString FMessage((const UTF8CHAR *)(srcpakerr.c_str()));
|
||||
|
||||
Reference in New Issue
Block a user