// Copyright Epic Games, Inc. All Rights Reserved. #include "hostinterface.h" #include namespace zen { ZenServerHost::ZenServerHost() { } ZenServerHost::~ZenServerHost() { } // TODO: Constrain access via AppContainer mechanisms // // AppContainer is the mechanism used by UWP apps. A process // in AppContainer can only access explicitly granted folders via capabilities. // // You can create a classic Win32 process in an AppContainer using CreateProcess // with an AppContainer token. // // Grant access to specific folders using CreateAppContainerProfile() and // AppContainerNamedObjectPath. // void ZenServerHost::SpawnOne(std::string_view Id) { std::unique_ptr Proc = std::make_unique(); std::filesystem::path ProgramBaseDir = GetRunningExecutablePath().parent_path(); Proc->Env.Initialize(ProgramBaseDir); Proc->Server = std::make_unique(Proc->Env); Proc->Server->SpawnServerAndWait(); m_LiveProcessesByProjectId.insert({std::string{Id}, std::move(Proc)}); } } // namespace zen