Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 4.26 #441

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
25 changes: 15 additions & 10 deletions src/holodeck/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,16 +606,21 @@ def __linux_start_process__(self, binary_path, task_key, gl_version, verbose,
loading_semaphore = \
posix_ipc.Semaphore('/HOLODECK_LOADING_SEM' + self._uuid, os.O_CREAT | os.O_EXCL,
initial_value=0)
# Copy the environment variables and remove the DISPLAY variable to hide viewport
# https://answers.unrealengine.com/questions/815764/in-the-release-notes-it-says-the-engine-can-now-cr.html?sort=oldest
environment = dict(os.environ.copy())
if not show_viewport and 'DISPLAY' in environment:
del environment['DISPLAY']
arguments = [binary_path, task_key, '-HolodeckOn',
'-LOG=HolodeckLog.txt', '-ForceRes', '-ResX=' + str(self._window_size[1]),
'-ResY=' + str(self._window_size[0]), '--HolodeckUUID=' + self._uuid,
'-TicksPerSec=' + str(self._ticks_per_sec)]
if not show_viewport:
arguments.append('-RenderOffScreen')
vinhowe marked this conversation as resolved.
Show resolved Hide resolved

# Copy the environment variables and remove the DISPLAY variable to hide viewport
# https://answers.unrealengine.com/questions/815764/in-the-release-notes-it-says-the-engine-can-now-cr.html?sort=oldest
environment = dict(os.environ.copy())
if 'DISPLAY' in environment:
del environment['DISPLAY']

self._world_process = \
subprocess.Popen([binary_path, task_key, '-HolodeckOn', '-opengl' + str(gl_version),
'-LOG=HolodeckLog.txt', '-ForceRes', '-ResX=' + str(self._window_size[1]),
'-ResY=' + str(self._window_size[0]), '--HolodeckUUID=' + self._uuid,
'-TicksPerSec=' + str(self._ticks_per_sec)],
subprocess.Popen(arguments,
stdout=out_stream,
stderr=out_stream,
env=environment)
Expand All @@ -626,7 +631,7 @@ def __linux_start_process__(self, binary_path, task_key, gl_version, verbose,
loading_semaphore.acquire(10)
except posix_ipc.BusyError:
raise HolodeckException("Timed out waiting for binary to load. Ensure that holodeck is "
"not being run with root priveleges.")
"not being run with root privileges.")
loading_semaphore.unlink()
loading_semaphore.close()

Expand Down