Finish porting to Linux
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "IntegrationGameModeBase.h"
|
||||
#include "lpx-drvutil.hpp"
|
||||
#include "lpx-paths.hpp"
|
||||
#include "DebugPrint.h"
|
||||
#include "Tangible.h"
|
||||
#include "TangibleManager.h"
|
||||
@@ -193,22 +194,25 @@ void AIntegrationGameModeBase::BeginPlay()
|
||||
if (w->play_initialize != nullptr)
|
||||
{
|
||||
drvutil::ostringstream srcpak;
|
||||
std::string srcpakerr = drvutil::package_lua_source("c:\\Luprex", &srcpak);
|
||||
std::string srcpakerr = drvutil::package_lua_source(LUPREX_ROOT_PATH, &srcpak);
|
||||
if (!srcpakerr.empty())
|
||||
{
|
||||
DPrint(srcpakerr.c_str());
|
||||
}
|
||||
std::string_view srcpakv = srcpak.view();
|
||||
char* argv[1];
|
||||
argv[0] = const_cast<char*>("lpxserver");
|
||||
w->play_initialize(w.Get(), 1, argv, srcpakv.size(), srcpakv.data(), "");
|
||||
if (w->error[0])
|
||||
else
|
||||
{
|
||||
DPrint(w->error);
|
||||
}
|
||||
if (w->engine != nullptr) {
|
||||
DPrint("Luprex initialize success");
|
||||
Playing = true;
|
||||
std::string_view srcpakv = srcpak.view();
|
||||
char* argv[1];
|
||||
argv[0] = const_cast<char*>("lpxserver");
|
||||
w->play_initialize(w.Get(), 1, argv, srcpakv.size(), srcpakv.data(), "");
|
||||
if (w->error[0])
|
||||
{
|
||||
DPrint(w->error);
|
||||
}
|
||||
if (w->engine != nullptr) {
|
||||
DPrint("Luprex initialize success");
|
||||
Playing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "LockedWrapper.h"
|
||||
#include "DebugPrint.h"
|
||||
#include "lpx-drvutil.hpp"
|
||||
#include "lpx-paths.hpp"
|
||||
|
||||
using namespace CommonTypes;
|
||||
|
||||
@@ -10,7 +11,9 @@ void FlxLockedWrapper::InitWrapper() {
|
||||
// Already initialized.
|
||||
return;
|
||||
}
|
||||
void* DLL = FPlatformProcess::GetDllHandle(TEXT("c:\\Luprex\\build\\visual\\luprexlib.dll"));
|
||||
FString dll((const UTF8CHAR*)LUPREX_DLL_PATH);
|
||||
DebugPrint::DPrint(dll);
|
||||
void* DLL = FPlatformProcess::GetDllHandle(*dll);
|
||||
if (DLL != nullptr) {
|
||||
using InitFn = void (*)(EngineWrapper*);
|
||||
InitFn init = (InitFn)FPlatformProcess::GetDllExport(DLL, TEXT("init_engine_wrapper"));
|
||||
|
||||
Reference in New Issue
Block a user