Launcher¶
Start and stop the Resonite client through umu-launcher — pure host process
control, no gRPC. launch spawns the umu-run chain and PID-diffs the engine and
renderer processes into existence; terminate stages SIGTERM → SIGKILL over
the two PIDs (or auto-detects the single running instance). The cooperative gRPC
quit is resoio.shutdown. See the CLI resoio launch
/ resoio terminate commands.
Pass Resonite's own command-line launch options as a typed
LaunchOptions via launch(options=...)
(-DataPath, -CachePath, -Screen, -Verbose, …) instead of hand-assembling
raw flag strings. Anything LaunchOptions does not model can still be passed
through launch(extra_args=...).
resoio.launcher.launch ¶
launch(
*,
resonite_exe: str | None = None,
mod_path: str | None = None,
vanilla: bool = False,
options: LaunchOptions | None = None,
extra_args: Sequence[str] = (),
prefix: str | None = None,
proton_path: str | None = None,
name: str | None = None,
wait_timeout: float = 60.0,
poll_interval: float = 0.5,
) -> LaunchResult
Launch Resonite (engine + renderer) via umu-launcher and return both PIDs.
Spawns the umu-run chain detached (the caller can exit without taking Resonite down), then PID-diffs the engine and renderer processes into existence and returns their host PIDs. Pure process control — no gRPC.
| PARAMETER | DESCRIPTION |
|---|---|
resonite_exe
|
Path to
TYPE:
|
mod_path
|
Gale profile directory holding the ResoniteIO mod.
TYPE:
|
vanilla
|
Launch without loading any mod (skips the mod-profile checks).
TYPE:
|
options
|
Typed Resonite launch options (
TYPE:
|
extra_args
|
Extra arguments forwarded to
TYPE:
|
prefix
|
Wine prefix directory (
TYPE:
|
proton_path
|
Proton build (
TYPE:
|
name
|
Convenience label for multi-launch. Purely auto-allocates an
isolated data tree under
TYPE:
|
wait_timeout
|
Seconds to wait for both processes to appear.
TYPE:
|
poll_interval
|
Seconds between process-table polls.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The
|
class:
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
LauncherError
|
Resonite.exe / the mod / |
Source code in src/resoio/launcher.py
744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 | |
resoio.launcher.terminate ¶
terminate(
resonite_pid: int | None = None,
renderer_pid: int | None = None,
*,
timeout: float = 3.0,
) -> LaunchResult
Stop Resonite by signalling its engine and renderer processes.
Each target is sent SIGTERM, given timeout seconds to exit, then
SIGKILL if still alive. Idempotent: a PID that is already gone is
skipped. With no arguments, the single running instance is auto-detected
from the process table (RESONITE_EXE's install dir); detecting more than
one engine or renderer is an error (pass explicit PIDs to disambiguate).
| PARAMETER | DESCRIPTION |
|---|---|
resonite_pid
|
Engine host PID to kill (e.g.
TYPE:
|
renderer_pid
|
Renderer host PID to kill.
TYPE:
|
timeout
|
Seconds to wait after
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The
|
class:
TYPE:
|
LaunchResult
|
that was not running). |
| RAISES | DESCRIPTION |
|---|---|
LauncherError
|
more than one instance was detected in the no-argument path, or a given PID is alive but is not the expected Resonite process. |
Source code in src/resoio/launcher.py
resoio.launcher.LaunchResult
dataclass
¶
Host PIDs of the Resonite engine and renderer processes.
Returned by :func:launch (the freshly started pair) and :func:terminate
(the pair it actually signalled; 0 for a role that was not running).
resonite_pid matches the engine PID the mod reports as
ServerInfo.resonite_pid; renderer_pid matches ServerInfo.renderer_pid.
resoio.launcher.LauncherError ¶
Bases: RuntimeError
A resoio launch / terminate operation could not be completed.
Raised for actionable conditions: Resonite.exe / the mod not found, no
umu-run on PATH, more than one new engine / renderer appearing from a
single launch, terminate finding more than one instance where exactly one
is expected, or the engine / renderer not appearing before the timeout.
resoio.launcher.LaunchOptions
dataclass
¶
LaunchOptions(
skip_intro_tutorial: bool = True,
force_intro_tutorial: bool = False,
do_not_auto_load_home: bool = False,
screen: bool = False,
device: Device | None = None,
legacy_steamvr_input: bool = False,
force_sranipal: bool = False,
force_babble: bool = False,
force_reticle_above_horizon: bool = False,
cubemap_resolution: int | None = None,
join: str | None = None,
open: str | None = None,
bootstrap: str | None = None,
scratchspace: int | None = None,
announce_home_on_lan: bool = False,
camera_biggest_group: bool = False,
camera_timelapse: bool = False,
camera_stay_behind: bool = False,
camera_stay_in_front: bool = False,
use_resonite_camera: bool = False,
data_path: str | None = None,
cache_path: str | None = None,
logs_path: str | None = None,
repair_database: bool = False,
generate_precache: bool = False,
export_database_all: str | None = None,
export_database_machine: str | None = None,
reset_dash: bool = False,
never_save_settings: bool = False,
never_save_dash: bool = False,
kiosk: bool = False,
no_ui: bool = False,
force_lan_only: bool = False,
invisible: bool = False,
disable_platform_interfaces: bool = False,
force_no_voice: bool = False,
force_april_fools: bool = False,
load_assembly: tuple[str, ...] = (),
verbose: bool = False,
validate_types: bool = False,
watchdog: str | None = None,
engine_config: str | None = None,
cloud_profile: CloudProfile | None = None,
delete_unsynced_cloud_records: bool = False,
force_sync_conflicting_cloud_records: bool = False,
background_workers: int | None = None,
priority_workers: int | None = None,
)
Typed Resonite command-line launch options for :func:launch.
Resonite's client accepts a large set of command-line launch arguments
(documented at https://wiki.resonite.com/Command_line_arguments). Each field
maps to one of them, so callers get autocomplete and type checking instead of
hand-assembling raw -Flag strings into extra_args. :meth:to_args
renders the argv fragment that :func:launch weaves in just ahead of
extra_args (so a raw extra_args entry can still override an option).
Booleans render as a bare flag when True and are omitted when False;
value-bearing fields are omitted when None (or empty), and fields render
in declaration order. All fields default to Resonite's own default behaviour
except skip_intro_tutorial, which defaults to True to preserve
:func:launch's historical behaviour of always skipping the intro tutorial.
The renderer-overriding arguments -Renderer and -AttachRenderer are
intentionally not modelled: they break :func:launch's renderer-PID
detection (which pins <install>/Renderer/Renderite.Renderer.exe) and the
doorstop preloader lookup, so the launch would time out waiting for the
renderer. Pass them through launch(extra_args=...) only if you accept that
PID detection will not work.
Path-valued options are passed through verbatim; :meth:to_args does not
absolutise them. :func:launch starts the process with cwd at the
Resonite install dir, so a relative path resolves against that directory.
skip_intro_tutorial
class-attribute
instance-attribute
¶
Skip the intro tutorial world (-SkipIntroTutorial).
Defaults to
True to preserve :func:launch's historical behaviour.
force_intro_tutorial
class-attribute
instance-attribute
¶
Force the intro tutorial to run (-Forceintrotutorial; note
Resonite's irregular casing).
do_not_auto_load_home
class-attribute
instance-attribute
¶
Do not auto-load the cloud Home on start (-DoNotAutoLoadHome).
screen
class-attribute
instance-attribute
¶
Force desktop screen mode instead of VR (-Screen).
device
class-attribute
instance-attribute
¶
Force a specific headset / display device (-Device).
legacy_steamvr_input
class-attribute
instance-attribute
¶
Use legacy SteamVR input handling (-LegacySteamVRInput).
force_sranipal
class-attribute
instance-attribute
¶
Force SRAnipal init for HTC eye/lip tracking (-ForceSRAnipal).
force_babble
class-attribute
instance-attribute
¶
Force the Project Babble face-tracking driver (-ForceBabble).
force_reticle_above_horizon
class-attribute
instance-attribute
¶
Disallow looking below the horizon in desktop first-person view
(-ForceReticleAboveHorizon).
cubemap_resolution
class-attribute
instance-attribute
¶
Cubemap resolution for 360° equirectangular rendering
(-CubemapResolution).
join
class-attribute
instance-attribute
¶
Join a session on start: Auto for active LAN sessions, or a session
URI (-Join).
open
class-attribute
instance-attribute
¶
Open a world at the given resrec URL on start (-Open).
bootstrap
class-attribute
instance-attribute
¶
Run a custom bootstrap function in the named class (-Bootstrap).
scratchspace
class-attribute
instance-attribute
¶
Start a scratchspace world on the given port (-Scratchspace;
legacy).
announce_home_on_lan
class-attribute
instance-attribute
¶
Make Home and userspace accessible from LAN (-AnnounceHomeOnLAN).
camera_biggest_group
class-attribute
instance-attribute
¶
Init the static camera with the biggest-group preset
(-CameraBiggestGroup).
camera_timelapse
class-attribute
instance-attribute
¶
Init the static camera with the timelapse preset
(-CameraTimelapse).
camera_stay_behind
class-attribute
instance-attribute
¶
Init the static camera with the stay-behind preset
(-CameraStayBehind).
camera_stay_in_front
class-attribute
instance-attribute
¶
Init the static camera with the stay-in-front preset
(-CameraStayInFront).
use_resonite_camera
class-attribute
instance-attribute
¶
Spawn the static camera as a Resonite Camera with zoom controls
(-UseResoniteCamera).
data_path
class-attribute
instance-attribute
¶
Database directory location (-DataPath).
cache_path
class-attribute
instance-attribute
¶
Cache directory location (-CachePath).
logs_path
class-attribute
instance-attribute
¶
Log files directory location (-LogsPath).
repair_database
class-attribute
instance-attribute
¶
Repair the local database on start (-RepairDatabase).
generate_precache
class-attribute
instance-attribute
¶
Cache cloud records to RuntimeData/PreCache
(-GeneratePrecache).
export_database_all
class-attribute
instance-attribute
¶
Export all local database records to a directory
(-ExportDatabaseAll).
export_database_machine
class-attribute
instance-attribute
¶
Export records owned by this machine to a directory
(-ExportDatabaseMachine).
reset_dash
class-attribute
instance-attribute
¶
Reset the dashboard layout to default (-ResetDash).
never_save_settings
class-attribute
instance-attribute
¶
Do not save/sync settings — testing only (-NeverSaveSettings).
never_save_dash
class-attribute
instance-attribute
¶
Do not save/sync dashboard changes — testing only
(-NeverSaveDash).
kiosk
class-attribute
instance-attribute
¶
Run in Kiosk mode: hide userspace UI, disable guest teleport
(-Kiosk).
force_lan_only
class-attribute
instance-attribute
¶
Announce sessions on LAN only, not the internet (-ForceLANOnly).
invisible
class-attribute
instance-attribute
¶
Force online status to invisible on login (-Invisible).
disable_platform_interfaces
class-attribute
instance-attribute
¶
Disable all platform interfaces — Discord/Steam/clipboard
(-DisablePlatformInterfaces).
force_no_voice
class-attribute
instance-attribute
¶
Do not set up avatars with voice (-ForceNoVoice).
force_april_fools
class-attribute
instance-attribute
¶
Activate April Fools mode regardless of date (-ForceAprilFools).
load_assembly
class-attribute
instance-attribute
¶
Extra CLR assemblies / DLLs to load into the process (-LoadAssembly,
one occurrence per path).
verbose
class-attribute
instance-attribute
¶
Produce detailed engine-initialisation logs (-Verbose).
validate_types
class-attribute
instance-attribute
¶
Check and log DataModel type validation (-ValidateTypes).
watchdog
class-attribute
instance-attribute
¶
Periodically write the current time to this file for restart detection
(-Watchdog).
engine_config
class-attribute
instance-attribute
¶
Use a custom engine config file (-EngineConfig).
cloud_profile
class-attribute
instance-attribute
¶
Cloud API server set to use, for debugging (-CloudProfile).
delete_unsynced_cloud_records
class-attribute
instance-attribute
¶
WARNING: irreversibly deletes local unsynced cloud records and
re-downloads cloud copies (-DeleteUnsyncedCloudRecords).
force_sync_conflicting_cloud_records
class-attribute
instance-attribute
¶
WARNING: forces conflicting local records to overwrite their cloud copies
(-ForceSyncConflictingCloudRecords).
background_workers
class-attribute
instance-attribute
¶
WARNING: overrides the background worker process count; wrong values can
destabilise the engine (-BackgroundWorkers).
priority_workers
class-attribute
instance-attribute
¶
WARNING: overrides the priority worker process count; wrong values can
destabilise the engine (-PriorityWorkers).
to_args ¶
Render the Resonite argv fragment for these options.
Walks the fields in declaration order so the output is deterministic.
Booleans emit a bare flag when True; None / empty values are
omitted; enums emit their wire value; load_assembly emits one
-LoadAssembly <path> pair per entry.
Source code in src/resoio/launcher.py
resoio.launcher.Device ¶
Bases: Enum
Headset / display device to force (-Device <value>).
resoio.launcher.CloudProfile ¶
Bases: Enum
Cloud API server set to target (-CloudProfile <value>).