+
    Kii  c                   s   R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHt ]P                  P                  ]P                  ! 4       R4      ]P                  P                  ]P                   R4      .t ! R R]	4      tR	 tR# )
z/Base class and utilities for JSON based runnersN)settings)MissingGameExecutableError)Runner)datapathsystemjsonc                   s@   a a ] tR t^t oRtRV 3R lltR tRtVtV ;t	# )
JsonRunnerNc                s  < \         SV `  V4       V P                  '       g   \        R 4      h\	        V P                  RR7      ;_uu_ 4       p\
        P                  ! V4      V n        RRR4       V P                  R,          V n        V P                  P                  R. 4      V n
        V P                  R,          V n        V P                  R,          V n        V P                  R,          V n        V P                  R	,          V n        V P                  P                  R
. 4      V n        V P                  P                  RR4      V n        V P                  P                  R4      V n        V P                  P                  R4      V n        V P                  P                  R4      V n        R#   + '       g   i     ELN; i)z@Create subclasses of JsonRunner with the json_path attribute setzutf-8)ZencodingNgame_optionsrunner_options
human_namedescription	platformsrunner_executablesystem_options_overrideentry_point_option	main_filedownload_urlrunnable_alone
flatpak_id)Zsuper__init__	json_pathRuntimeErrorZopenr   Zload
_json_datar   getr   r	   r
   r   r   r   r   r   r   r   )selfZconfigZ	json_file	__class__s   && 8/usr/lib/python3.14/site-packages/lutris/runners/json.pyr   ZJsonRunner.__init__   sC    ~~~abb$..733y"ii	2DO 4 !OON;"oo112BBG//,7??=95!%1D!E'+':':;TVX'Y$"&//"5"56JK"X OO//?"oo112BC//--l; 433s   F..F?	c                s   V P                  4       pV P                   EF  pVR,          V P                  9  d   K  VR,          R8X  dE   V P                  P                  VR,          4      '       d   VP	                  VR,          4       Kn  Kp  VR,          R8X  du   V P                  P                  VR,          4      R8w  dL   VP	                  VR,          4       VP	                  V P                  P                  VR,          4      4       K  K  VR,          R8X  dM   VP	                  VR,          4       VP	                  V P                  P                  VR,          4      4       EKL  VR,          R8X  dk   VP                  R4      pV'       d   VP	                  V4       V\
        P                  ! V P                  P                  VR,          4      4      ,          pEK  \        R	VR,          ,          4      h	  V P                  P                  V P                  4      p\        P                  ! V4      '       g   \        VR
7      hVP	                  V4       RV/pV P                  P                  R4      '       d   V P                  R,          VR&   V P                  P                  R4      R8X  dY   \        P                  P!                  \        P                  P#                  \$        P&                  V P(                  4      4      VR&   V# )z8Return a launchable command constructed from the optionsoptiontypeZboolZargumentZchoiceZoffZstringZcommand_linezUnhandled type %s)ZfilenameZcommandZenvZworking_dirZrunner)Zget_commandr   Zrunner_configr   ZappendshlexZsplitr   Zgame_configr   r   Zpath_existsr   r   ospathZdirnamejoinr    
RUNNER_DIRr   )r   Z	argumentsr   Zargr   Zresults   &     r   playZJsonRunner.play(   sS   $$&	))Fht'9'99f~'%%))&*:;;$$VJ%78 <8+%%))&*:;uD$$VJ%78$$T%7%7%;%;F8<L%MN E 8+  
!34  !3!3!7!7x8H!IJ>1jj,$$S)U[[););)?)?x@P)QRR	"#6#GHH' *( $$(()@)@A	!!),,,i@@#Y'??u%% OOE2F5M??}-9$&GGOOBGGLLATATVZVlVl4m$nF=!    )r   r
   r   r   r   r   r	   r   r   r   r   r   )N)
Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r   r"   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   r   r      s     I<&   r#   r   c                  sR   / p \          F  p\        P                  P                  V4      '       g   K*  \        P                  ! V4       FV  pVP                  R 4      '       g   K  VRR p\        V\        3R\        P                  P                  W4      /4      pW@V&   KX  	  K  	  V # )z.jsonNr   i)	JSON_RUNNER_DIRSr   r   ZexistsZlistdirZendswithr   r   r    )Zjson_runnersZjson_dirr   Zrunner_nameZrunner_classs        r   load_json_runnersr%   K   s    L$ww~~h''H-I%%g..#CR.Kj]["'',,W_Jk<lmL(4% . % r#   )Z__doc__r   r   r   Zlutrisr    Zlutris.exceptionsr   Zlutris.runners.runnerr   Zlutris.utilr   r   r   r    r   r!   r$   r   r%   ) r#   r   <module>r&      si    5  	   8 ( ( GGLL(GGLL$$f- 6 6rr#   