+
    Kit  c                   s|    R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIHt  ! R R	]4      tR# )
zRunner for Linux gamesN)gettextCallable)GameConfigErrorMissingGameExecutableError)Runner)system)split_argumentsc                   s  a a ] tR t^t o]! R4      t]! R4      t]! R4      .tRtRRRRRRR	]! R
4      R]! R4      /RRRRR	]! R4      R]! R4      /RRRRR	]! R4      R]! R4      /RRRRR	]! R4      RRR]! R4      /RRRRR	]! R4      RRR]! R4      /.t	R,V 3R llt
]R 4       tV 3R ltR  t]V 3R! l4       t]R" 4       tR-V3R# lR$ lltR% tV3R& lR' ltR( tR) tR* tR+tVtV ;t# ).linuxZLinuxzRuns native gamesexeoptionZtypeZfileZdefault_path	game_pathZlabelZ
ExecutableZhelpzThe game's main executable fileargsZstringZ	Argumentsz3Command line arguments used when launching the gameworking_dirZ	directoryzWorking directoryzaThe location where the game is run from.
By default, Lutris uses the directory of the executable.
ld_preloadzPreload libraryZadvancedTz7A library to load before running the game's executable.ld_library_pathz Add directory to LD_LIBRARY_PATHzA directory where libraries should be searched for first, before the standard set of directories; this is useful when debugging a new library or using a nonstandard library for special purposes.c                s4   < \         SV `  V4       R V n        R # N)super__init__r   )selfZconfig	__class__s   &&9/usr/lib/python3.14/site-packages/lutris/runners/linux.pyr   Zlinux.__init__A   s         c                s|   V P                   P                  R4      pV'       g   R# \        P                  P	                  V4      p\        P                  P                  V4      '       d   V# V P                  '       d+   \        P                  P                  V P                  V4      # \        P                  ! V4      # )zrReturn the game's executable's path. The file may not exist, but
this returns None if the exe path is not defined.r	   N)
game_configgetospath
expanduserisabsr   Zjoinr   Zfind_executable)r   r	   s   & r   game_exeZlinux.game_exeE   s     ""5)gg  %77==J>>>77<<44%%c**r   c                s   < \         SV `  4       ;'       g4    \        P                  P	                  V P
                  ;'       g    R 4      # ) )r   resolve_game_pathr   r   dirnamer   )r   r   s   &r   r   Zlinux.resolve_game_pathS   s2    w(*RRbggoodmm>Q>Qr.RRr   c                s    V'       dp   V'       dh   \         P                  P                  WR7      pVP                  R4      '       g1   \         P                  P	                  V4      '       g
   RV,           pV# V# )zzReturn a relative path if a working dir is provided
Some games such as Unreal Gold fail to run if given the absolute path
)Zstartz../z./)r   r   ZrelpathZ
startswithr   )r   Zexe_pathr   Zrelatives   &&& r   get_relative_exeZlinux.get_relative_exeV   sV     wwxCH&&u-- ww}}X..#hHr   c                s  < V P                   P                  R4      pV'       d    \        P                  P	                  V4      # V P
                  '       d*   \        P                  P                  V P
                  4      # \        SV `   # )z:Return the working directory to use when running the game.r   )	r   r   r   r   r   r   r    r   r   )r   r
   r   s   & r   r   Zlinux.working_dird   s^     !!%%m477%%f--===77??4==11w""r   c                sB    V P                   ;'       g    V P                  # )z?Linux programs should get individual shader caches if possible.)r   Zshader_cache_dirr      &r   nvidia_shader_cache_pathZlinux.nvidia_shader_cache_pathn   s     ~~66!6!66r   c                s&   < V ^8  d   QhRS[ RS[ /# )   flatpak_allowedreturn)ZboolZformat__classdict__   "r   __annotate__linux.__annotate__s   s      D D r   c                s    R# )z=Well of course Linux is installed, you're using Linux right ?T )r   r&      &&r   is_installedZlinux.is_installeds   s    r   c                s    R # )Fr-   r"   r#   r   can_uninstallZlinux.can_uninstallw   s    r   c                s6   < V ^8  d   QhRS[ . R3,          RR/# )r%   uninstall_callbackNr'   r   r(   r*   r   r+   r,   z   s$     < <HRX,> <4 <r   c                s    \        R 4      h)zLinux shouldn't be installed.)ZRuntimeError)r   r1   r.   r   	uninstallZlinux.uninstallz   s    :;;r   c                s   R V9   d   \        VR ,          4      pM. p\        P                  P                  VP	                  R4      ;'       g    V P
                  4      pRV9   dR   \        P                  P                  VR,          ;'       g    R4      pVP                  V P                  WT4      4       M$\        V4      ^ 8X  d   \        \        R4      4      hVP	                  R4      '       d   V\        VR,          4      ,          pV# )commandr   r	   r   zIThe runner could not find a command or exe to use for this configuration.r   )r   r   r   r   r   r   appendr!   Zlenr   _)r   Zgameplay_infoZlaunch_configr3   r   Z
config_exes   &&&   r   get_launch_config_commandZlinux.get_launch_config_command}   s     %%mI&>?GGgg(():):=)I)])]TM]M]^M!++M%,@,F,FBGJNN400IJ\Q!!$o"pqqV$$}V'<==Gr   c                s    . # r   r-   r"   r#   r   get_commandZlinux.get_command   s	     	r   c                s   / pV P                   pV'       d   \        P                  ! V4      '       g   \        VR7      h\        P
                  ! V4      P                  pV\
        P                  ,          '       g   \        \        R4      V,          4      hV P                  P                  R4      pV'       d   WAR&   V P                  P                  R4      pV'       d#   \        P                  P                  V4      VR&   V P                  W P                  4      .pV P                  P                  R4      ;'       g    Rp\!        V4       F  pVP#                  V4       K  	  WaR&   V# )zRun native game.)ZfilenamezThe file %s is not executabler   r   r   r   r3   )r   r   Zpath_existsr   r   statZst_modeZS_IXUSRr   r5   r   r   r   r   r!   r   r   r4   )	r   Zlaunch_infor	   Zmoder   r   r3   r   Zargs	   &        r   playZ
linux.play   s   mm&,,S11,c:: wws|##dll""!!$C"Ds"JKK%%)),7
(2%**../@A-/WW-?-?-PK)*((.>.>?@##F+11r"4(CNN3 )!(Ir   )r   r   )T)Z__name__Z
__module__Z__qualname__Z__firstlineno__r5   Z
human_nameZdescriptionZ	platformsZentry_point_optionZgame_optionsr   Zpropertyr   r   r!   r   r$   r/   r0   r2   r6   r7   r9   Z__static_attributes__Z__classdictcell__Z__classcell__)r   r)   s   @@r   r   r      s    7J'(K7I eFKQ|_A78	
 fHQ{^AKL		
 mKQ*+At		
 lFQ()AOP	
 'KQ9:A<	
;)LV + +S # # 7 7 < <*
 r   r   )Z__doc__r   r8   r    r5   Ztypingr   Zlutris.exceptionsr   r   Zlutris.runners.runnerr   Zlutris.utilr   Zlutris.util.stringsr   r   r-   r   r   <module>r:      s3     
     J (  /bF br   