+
     Vj                     V   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	^ RI
t	^ RIHt ^ RIHt RtR] R2t]P                   ! R]P"                  4      t]! R4      t]P)                  ]P*                  R	,           4      t]P)                  ]P*                  R
,           4      tRt^<tR tR tR tR tR tR tR t ]!R8X  d    ]PD                  ! ] ! 4       4       R# R#   ]	PF                  PH                  ]%]&]'](3 d)   t#]! R]# 24       ]PD                  ! ^4        Rt#A#R# Rt#A#ii ; i)zGDownload the newest R5R CN Launcher x64 installer from GitHub Releases.N)datetime)Pathzsleep1223/r5r-cn-launcherzhttps://api.github.com/repos/z/releases/latestz#^R5R-CN-Launcher_.+_x64-setup\.exe$z0/var/www/r5r-patch/R5R-CN-Launcher_x64-setup.exez.jsonz.lockzr5r-cn-launcher-updater/1.0c                     \        R \        P                  ! 4       P                  4       P	                  RR7       RV  2RR7       R# )[secondstimespecz] T)flushN)printr   now
astimezone	isoformat)messages   &update_r5r_cn_launcher.pylogr      s8    	Ahlln'')33Y3GH7)
T\`a    c                    \         P                  P                  V R RR\        /R7      p\         P                  P	                  V\
        R7      ;_uu_ 4       p\        P                  ! V4      uuRRR4       #   + '       g   i     R# ; i)Acceptzapplication/vnd.github+json
User-AgentheaderstimeoutN)urllibrequestRequest
USER_AGENTurlopenTIMEOUTjsonload)urlr   responses   &  r   request_jsonr#      sd    nn$$8,
S % G 
				9	9Xyy" 
:	9	9	9s   A88B		c           	      >   V P                  R . 4       Uu. uF2  p\        P                  VP                  RR4      4      '       g   K0  VNK4  	  ppV'       g    \        RV P                  RR4       R24      h\	        V4      ^8  d   \        R4      hV^ ,          # u upi )assetsname zrelease tag_namez	<unknown>z has no x64 setup assetz:latest release contains multiple matching x64 setup assets)getASSET_PATTERNmatchRuntimeErrorlen)releaseassetmatchess   &  r   find_installerr1   (   s    ";;x44%uyy45 	4   Xgkk*k&J%KKbcdd
7|aWXX1:s   -BBc                       \         P                  R RR7      ;_uu_ 4       p \        P                  ! V 4      uuRRR4       #   + '       g   i     R# ; i  \        \
        \        3 d    / u # i ; i)rutf-8encodingN)
STATE_FILEopenr   r    FileNotFoundErrorOSError
ValueError)files    r   
read_stater=   4   sP    __S7_33t99T? 4333w
3 	s-   A A
A A	A A A10A1c           
         \         P                  P                  V R ,          RRR\        /R7      pRp \         P                  P	                  V\
        R7      ;_uu_ 4       pVP                  P                  R4      p\        P                  ! R\        P                  R	,           R
\        P                  RR7      ;_uu_ 4       p\        VP                  4      p^ p VP                  R4      pV'       g   M%VP                  V4       V\!        V4      ,          pK@  VP#                  4        \$        P&                  ! VP)                  4       4       RRR4       RRR4       Xe"   X\+        V4      8w  d   \-        RV RV 24      hV P                  R4      '       d0   X\+        V R,          4      8w  d   \-        RV R,           RV 24      h\$        P.                  ! VR4       \$        P0                  ! V\        4       RpXVe    VP3                  4        # #   + '       g   i     L; i  + '       g   i     L; i  \4         d     # i ; i  Te$    TP3                  4        i   \4         d     i i ; ii ; i)browser_download_urlr   zapplication/octet-streamr   r   Nr   zContent-Lengthwb.z.partF)modeprefixsuffixdirdeletezincomplete download: expected z bytes, got sizezasset size mismatch: expected i  i   )r   r   r   r   r   r   r   r)   tempfileNamedTemporaryFileDESTINATIONr&   parentr   readwriter-   r	   osfsyncfilenointr,   chmodreplaceunlinkr9   )r/   r   temporary_pathr"   expected_sizeoutputtotalchunks   &       r   downloadrZ   <   s   nn$$$%5|ZP % G N ^^##GW#==$,,001ABM,,+"2"2S"8&&u  !%fkk!2$MM+6E LL'SZ'E) >" $#m2D)D!?l[`Zabcc99V#eFm*<!<!?fl[`Zabcc
'


>;/%%%' &3  >=< %  %%%'$  &s{   -I !A"H)BH	H)AI A$I H<H&!H))H9	4I <I
	I
I6I$#I6$I2/I61I22I6c                    R V P                  R4      RV P                  R4      RVP                  R4      RVP                  R4      RVP                  R4      R\        P                  ! 4       P                  4       P	                  R	R
7      /p\
        P                  \
        P                  R,           4      pVP                  RRR7      ;_uu_ 4       p\        P                  ! W$R^R7       VP                  R4       VP                  4        \        P                  ! VP                  4       4       RRR4       \        P                   ! V\
        4       R#   + '       g   i     L-; i)
release_ididr(   asset_id
asset_namer&   download_urlr?   
updated_atr   r   z.tmpwr4   r5   F)ensure_asciiindent
N)r)   r   r   r   r   r7   with_suffixrD   r8   r   dumprM   r	   rN   rO   rP   rS   )r.   r/   state	temporaryr<   s   &&   r   write_staterj   e   s    gkk$'GKK
+EIIdOeii'		"89hlln//1;;Y;OE &&z'8'86'ABI	g	.	.$		%E!<

4


	 
/
 JJy*% 
/	.s   AEE$	c            	         \         P                  P                  R R R7       \        P	                  R4      ;_uu_ 4       p  \
        P                  ! V \
        P                  \
        P                  ,          4       \        \        4      p\        T4      p\        4       p\         P                  4       '       d~   TP!                  R4      TP!                  R4      8X  dY   TP!                  R4      TP!                  R4      8X  d4   \        RTP!                  R	4       R
TR,           R24        RRR4       ^ # \        RTP!                  R	4       RTR,           24       \#        T4      p\%        Y4       \        R\          R
T R24        RRR4       ^ #   \         d    \        R4        RRR4       ^ # i ; i  + '       g   i     R# ; i)T)parentsexist_okza+z3another updater process is already running; skippedNr\   r]   r^   zalready current: r(   z (r&   )zdownloading z: zupdated z bytes))rJ   rK   mkdir	LOCK_FILEr8   fcntlflockLOCK_EXLOCK_NBBlockingIOErrorr   r#   API_URLr1   r=   is_filer)   rZ   rj   )lockr.   r/   rh   rG   s        r   mainry   w   se   TD9				KKemmemm;<
 w'w'!!		,'7;;t+<<		*%48#GKK
$;#<BuV}oQOP! 
	$ 	l7;;z232eFm_EFG#h{m2dV734- 
	  	EF 
		 
		s7   F9:F;B1F96AF9F6*F95F66F99G
	__main__zERROR: ))__doc__rq   r   rN   resysrH   timeurllib.errorr   urllib.requestr   pathlibr   
REPOSITORYrv   compile
IGNORECASEr*   rJ   rf   rD   r7   rp   r   r   r   r#   r1   r=   rZ   rj   ry   __name__exiterrorURLErrorTimeoutErrorr:   r;   r,    r   r   <module>r      s)   M   	 	 
       )
)*5E
F

A2==QEF$$[%7%7'%AB
##K$6$6$@A	*

b#	&R&$6 z  LL!!<*lS geWs   C    D( D##D(