+
    Ki"  c                   s    R t ^ RIt^ RIHt ^ RIHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHtHt ^ R
IHtHtHt ^ RIHt ^ RIHt R tR t ! R R]4      tR# )zSteam for Linux runnerN)gettext)MissingGameExecutableErrorUnavailableRunnerError)MonitoredCommand)NonInstallableRunnerError)Runner)linuxsystem)logger)get_appmanifest_from_appidget_path_from_appmanifest)get_default_acfget_steam_dirget_steamapps_dirs)to_vdf)split_argumentsc                 s.    \         P                  ! R4      # )zReturn pid of Steam process.zsteam$)r   Zget_pid     9/usr/lib/python3.14/site-packages/lutris/runners/steam.pyget_steam_pidr      s    >>(##r   c                 s(    \        \        4       4      # )zChecks if Steam is running.)boolr   r   r   r   
is_runningr      s      r   c                   sD  a a ] tR t^t o]! R4      t]! R4      t]! R4      .tR tRt	RRR]! R4      R	R
R]! R4      /RRR	R
R]! R4      R]! R4      /RRR]! R4      R	RRRRRR]! R4      /RRR	RR]! R4      RRR]! R4      /.t
RRR]! R4      R	RRRR]! R4      /RRR	R
R]! R4      RRR]! R4      /.tRR RR/RR!RR/.t]R" 4       t]R# 4       t]R$ 4       t]R% 4       tR& tV3R' lR( lt]V 3R) l4       t]R* 4       tR+ tR, tR3R- ltR4R. ltR/ tR0 tR5R1 ltR2tVtV ;t# )6steamzRuns Steam for Linux gamesZSteamZLinuxzcom.valvesoftware.SteamZoptionappidZlabelzApplication IDZtypeZstringZhelpzThe application ID can be retrieved from the game's page at steampowered.com. Example: 235320 is the app ID for <i>Original War</i> in: 
http://store.steampowered.com/app/<b>235320</b>/argsZ	ArgumentszdCommand line arguments used when launching the game.
Ignored when Steam Big Picture mode is enabled.run_without_steamz#DRM free mode (Do not launch Steam)r   ZdefaultFZadvancedTzLRun the game directly without Steam, requires the game binary path to be setsteamless_binaryZfilezGame binary pathz7Path to the game executable (Required by DRM free mode)start_in_big_picturezStart Steam in Big Picture modezLaunches Steam in Big Picture mode.
Only works if Steam is not running or already running in Big Picture mode.
Useful when playing with a Steam Controller.z6Extra command line arguments used when launching SteamZdisable_runtimeZgamemodec                sH    \         P                  P                  4       '       * # N)r   LINUX_SYSTEM
is_flatpakself   &r   runnable_aloneZsteam.runnable_alone`   s    %%00222r   c                sL    V P                   P                  R 4      ;'       g    R# )r    )game_configgetr   r!   r   r   Zsteam.appidd   s!    ##G,222r   c                s`    V P                   '       g   R # V P                  V P                   4      # r   )r   get_game_path_from_appidr   r!   r   	game_pathZsteam.game_pathh   s#    zzz,,TZZ88r   c                s    \        4       # )z%Main installation directory for Steam)r   r   r!   r   steam_data_dirZsteam.steam_data_dirn   s     r   c                s   . p\        4        F3  p\        W P                  4      pV'       g   K"  VP                  V4       K5  	  \	        V4      ^8  d"   \
        P                  ! RV P                  4       V'       d
   V^ ,          # R# )z+Return an AppManifest instance for the gamez3More than one AppManifest for %s returning only 1stN)r   r	   r   appendZlenr   Zwarning)r    Zappmanifests	apps_pathZappmanifests   &   r   get_appmanifestZsteam.get_appmanifests   sl    +-I4Y

KK{##K0 . |q NNPRVR\R\]?" r   c                s    < V ^8  d   QhRS[ /# )i   Zreturn)Zstr)Zformat__classdict__s   "r   Z__annotate__Zsteam.__annotate__   s     G G Gr   c                sJ   \         P                  P                  4       '       d   \        P                  ! R 4      # V P
                  P                  R4      pV'       d(   \        P                  P                  V4      '       d   V# \        P                  ! V P                  4      # )zxdg-openrunner_executable)r   r   r   r   Zfind_required_executablerunner_configr%   ospathisfiler-   )r    r-      & r   get_executableZsteam.get_executable   ss    ((**22:>> ..223FG0A!B!B$$..t/E/EFFr   c                s(  < V P                   P                  R4      '       dh   V P                   P                  R4      pV'       dE   \        P                  P	                  V4      '       d    \        P                  P                  V4      # \        SV `  # )z:Return the working directory to use when running the game.r   r   )r$   r%   r/   r0   r1   ZdirnameZsuperworking_dir)r    r   	__class__s   & r   r4   Zsteam.working_dir   sj      344#//334FGBGGNN3C$D$Dww'788w""r   c                s    V P                  4       pV P                  P                  R4      '       d   VP                  R4       T\	        V P                  P                  R4      ;'       g    R4      ,           # )z"Provide launch arguments for Steamr   z-bigpicturer   r#   )get_commandr.   r%   r)   r   )r    commandr2   r   launch_argsZsteam.launch_args   s_     ""$!!"899NN=)););)?)?)G)M)M2NNNr   c                s    \        4        F  p\        W!4      pV'       g   K  Vu # 	  \        P                  ! RV4       R# )zReturn the game directory.z$Data path for SteamApp %s not found.r#   )r   r
   r   Zinfo)r    r   r*   r'   s   &&  r   r&   Zsteam.get_game_path_from_appid   s8    +-I1)CIy   . 	:EBr   c                s<    \        4       pV'       d
   V^ ,          # R# )i    r#   )r   )r    Zsteamapps_pathsr2   r   get_default_steamapps_pathZ steam.get_default_steamapps_path   s    ,."1%%r   c                s@    \        \        R 4      \        R4      R7      h)z6Steam for Linux installation is not handled by Lutris.zSteam for Linux installation is not handled by Lutris.
Please go to <a href='http://steampowered.com'>http://steampowered.com</a> or install Steam with the package provided by your distribution.)ZmessageZmessage_markup)r   _)r    Zinstall_ui_delegateZversionZcallbacks   &&&&r   installZsteam.install   s&    'NOT
 	
r   c                s   \         P                  ! R V4       V'       d   \        W4      p\        V4      pV P	                  4       pV'       g   \        \        R4      4      h\        P                  P                  VRV,          4      p\        VRRR7      ;_uu_ 4       pVP                  V4       RRR4       \        P                  ! V P                  4       RV 2.,           4       R#   + '       g   i     LA; i)zInstalling steam game %sz.Could not find Steam path, is Steam installed?zappmanifest_%s.acfZwzutf-8)ZencodingNzsteam://install/)r   Zdebugr   r   r9   r   r:   r/   r0   ZjoinZopenZwriter   Zspawnr6   )r    r   Zgenerate_acfZacf_dataZacf_contentZsteamapps_pathZacf_pathZacf_files   &&&     r   install_gameZsteam.install_game   s    /7&u4H *K!<<>N!,Q/_-`aaww||N4H54PQHhg66({+ 7T%%'-=eW+E*FFG 76s   C**C:	c                s>    R V P                   RV P                  4       /# )r7   env)r8   get_envr   r!   r   get_run_dataZsteam.get_run_data   s    4++UDLLNCCr   c                s   V P                   P                  R 4      ;'       g    RpV P                   P                  R4      pV P                   P                  R4      '       d5   V'       d-   \        P                  ! V4      '       g   \	        VR7      hV.pM\
        P                  P                  4       '       dX   V'       d   RV P                  : RV: R2pMRV P                  ,          pR	V P                  V.,           R
V P                  4       /# V P                  pV P                  P                  R4      '       g	   V'       g$   VP                  RV P                  ,          4       M,VP                  R4       VP                  V P                  4       V'       d$   \        V4       F  pVP                  V4       K  	  R	VR
V P                  4       /# )r   r#   r   r   )Zfilenamezsteam://run/z//Z/zsteam://rungameid/%sr7   r=   r   z
-applaunch)r$   r%   r   Zpath_existsr   r   r   r   r   r8   r>   r.   r)   r   )r    Z	game_argsZbinary_pathr7   Z	steam_uriZargs   &     r   playZ
steam.play   sf   $$((066B	&&**+=> 344%%k220+FF"mG !!,,..99=Y OI 6 CIt//9+=4<<>  &&G!!%%&<==Y5

BC|,tzz*&y1s# 2 w4<<>
 	
r   c                s    V P                  4       '       g   R # T;'       g    V P                  p\        V P                  4       RV 2.,           V V P	                  4       R7      pVP                  4        R# )Fzsteam://uninstall/)Zrunnerr=   N)Zis_installedr   r   r6   r>   Zstart)r    Zapp_idZkwargsr7   s   &&, r   remove_game_dataZsteam.remove_game_data   sb      ""%%4::"$6vh"?!@@

 	r   r   )NN)Fr   ) Z__name__Z
__module__Z__qualname__Z__firstlineno__r:   ZdescriptionZ
human_nameZ	platformsr-   Z
flatpak_idZgame_optionsZrunner_optionsZsystem_options_overrideZpropertyr"   r   r'   r(   r+   r3   r4   r8   r&   r9   r;   r<   r?   r@   rA   Z__static_attributes__Z__classdictcell__Z__classcell__)r5   r,   s   @@r   r   r      s$    01K7J7I*J gQ'(HAC	
	
 fHQ{^Aw		
 )Q<=FuAde	
 (FQ)*AOP	
9#LL ,Q89FuA?	
 fHQ{^ANO	
N, 
$i6	:y%0
 3 3 3 3 9 9
  
#G G # # O O	
HD"
H	 	r   r   ) Z__doc__r/   r    r:   Zlutris.exceptionsr   r   Zlutris.monitored_commandr   Zlutris.runnersr   Zlutris.runners.runnerr   Zlutris.utilr   r   Zlutris.util.logr   Zlutris.util.steam.appmanifestr	   r
   Zlutris.util.steam.configr   r   r   Zlutris.util.steam.vdfutilsr   Zlutris.util.stringsr   r   r   r   r   r   r   <module>rB      sG     	   P 5 4 ( % " _ W W - /$
!
TF Tr   