Finish porting to Linux

This commit is contained in:
2023-10-16 16:54:41 -04:00
parent 320b4dd714
commit f647025a97
4 changed files with 34 additions and 21 deletions

View File

@@ -71,3 +71,12 @@ ConnectionType=USBOnly
bUseManualIPAddress=False
ManualIPAddress=
[/Script/LinuxTargetPlatform.LinuxTargetSettings]
SpatializationPlugin=
SourceDataOverridePlugin=
ReverbPlugin=
OcclusionPlugin=
SoundCueCookQualityIndex=-1
-TargetedRHIs=SF_VULKAN_SM5
+TargetedRHIs=SF_VULKAN_SM6

View File

@@ -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,11 +194,13 @@ 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());
}
else
{
std::string_view srcpakv = srcpak.view();
char* argv[1];
argv[0] = const_cast<char*>("lpxserver");
@@ -211,6 +214,7 @@ void AIntegrationGameModeBase::BeginPlay()
Playing = true;
}
}
}
// If we successfully created a luprex engine, create a socket system and a worker thread.
if (Playing) {

View File

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

View File

@@ -11,13 +11,10 @@ LUPREX=$HOME/luprex
rm -f Source/Integration/lpx-*.hpp
rm -f Source/Integration/lpx-*.cpp
rm -f Binaries/Linux/luprexlib.so
mkdir -p Binaries/Linux
echo '#include "'$LUPREX'/ext/base-writer.hpp"' > Source/Integration/lpx-basewriter.hpp
echo '#include "'$LUPREX'/cpp/drv/drvutil.hpp"' > Source/Integration/lpx-drvutil.hpp
echo '#include "'$LUPREX'/cpp/drv/drvutil.cpp"' > Source/Integration/lpx-drvutil.cpp
echo '#include "'$LUPREX'/cpp/core/enginewrapper.hpp"' > Source/Integration/lpx-enginewrapper.hpp
ln -s $LUPREX/build/linux/luprexlib.so Binaries/Linux/luprexlib.so
echo '#define LUPREX_DLL_PATH "'$LUPREX'/build/linux/luprexlib.so"' > Source/Integration/lpx-paths.hpp
echo '#define LUPREX_ROOT_PATH "'$LUPREX'"' >> Source/Integration/lpx-paths.hpp