;i vddlmZddlZddlZdedeedededef dZgd gd d gd d gggd ggd gdZdS))TupleN icon_path allowed_types convert_typeworkpathreturnc > tj|std|dtj|\}}|dd}||vr~t |}t |d5}|td|D dddn #1swxYwYt fd|Dr|S dd l m }ddl } n*#t$rtd |d |d |d |d wxYw dtj|d|} tj|| } ||5} | jdkr0| jdd| d} | | dddn #1swxYwY| }n&#| j$rtd|d|d|wxYw|S)a Returns a valid icon path or raises an Exception on error. Ensures that the icon exists, and, if necessary, attempts to convert it to correct OS-specific format using Pillow. Takes: icon_path - the icon given by the user allowed_types - a tuple of icon formats that should be allowed through EX: ("ico", "exe") convert_type - the type to attempt conversion too if necessary EX: "icns" workpath - the temp directory to save any newly generated image files zIcon input file z not foundNrbc34K|]}t|VdSN)len).0ss MC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\PyInstaller/building/icon.py z&normalize_icon_type..,s(;;1A;;;;;;c3hK|],}tdt||kV-dSr )listr)rrheaders rrz&normalize_icon_type..-s=>>atF||GSVVG$)>>>>>>rr)ImagezReceived icon image 'zH' which exists but is not in the correct format. On this platform, only z images may be used as icons. If Pillow is installed, automatic conversion will be attempted. Please install Pillow or convert your 'z' file to one of z and try again.z generated-.P transparencyRGBAz,Something went wrong converting icon image 'z' to '.z' with Pillow, perhaps the image format is unsupported. Try again with a different file or use a file that can be used without conversion on this platform: )ospathexistsFileNotFoundErrorsplitexthex_signaturesopenreadmaxanyPILr ImportError ValueErrorhashlibsha256encode hexdigestjoinmodeinfogetconvertsaveUnidentifiedImageError)rrrr_ extension signaturesfPILImager&_generated_namegenerated_iconimrs @rnormalize_icon_typer<s! 7>>) $ $J H9 H H HIII7##I..LAy!"" IM!!#I. )T " " =aVVC;; ;;;;;<>>>:>>> > >    ))))))     I  !  DM  `m        fw~i6F6F6H6H'I'I'S'S'U'UffXdffh@@ ]]9 % % $w#~~"'++nd"C"C"OZZ'' GGN # # #  $ $ $ $ $ $ $ $ $ $ $ $ $ $ $#  %    L9 L L\ L LB># C..'DA3G7 AG) G7)G--G70G-1G77#H)PNG rBMZ)rrr r)icns)pngexeicoicns)typingrrr)strr<r!rrrQs >3>uSz>QT>`c>hk>>>>H = < < = 4L4, ' $ $ $ % % % % & r