o
    p.aã  ã                   @   s‚  d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlZd dlZd dlZdZdZdZi dd“dd“d	d
“dd
“dd“dd“dde “dd“dd“dd“dd“dd“dd“dd“dd“dde “d d!“Zg d"¢Zg d#¢Zg d"¢Zdaed$d%gƒZd&d'„ ZG d(d)„ d)eƒZd*d+„ Zd,d-„ Zd.d/„ Ze d0¡Z d1d2„ Z!e d3¡Z"d4d5„ Z#d6d7„ Z$d8d9„ Z%d:d;„ Z&dS )<é    )Úprint_functionNÚINTERMEDIATE_DIRÚSHARED_INTERMEDIATE_DIRÚLIBRARY_SEARCH_PATHSÚEXECUTABLE_PREFIXÚ ÚEXECUTABLE_SUFFIXÚSTATIC_LIB_PREFIXÚlibÚSHARED_LIB_PREFIXÚSTATIC_LIB_SUFFIXz.aÚSHARED_LIB_SUFFIXz.dylibz$(%s)ÚOSÚmacÚPRODUCT_DIRz$(BUILT_PRODUCTS_DIR)ÚLIB_DIRÚRULE_INPUT_ROOTz$(INPUT_FILE_BASE)ÚRULE_INPUT_EXTz$(INPUT_FILE_SUFFIX)ÚRULE_INPUT_NAMEz$(INPUT_FILE_NAME)ÚRULE_INPUT_PATHz$(INPUT_FILE_PATH)ÚRULE_INPUT_DIRNAMEz$(INPUT_FILE_DIRNAME)ÚCONFIGURATION_NAMEz$(CONFIGURATION))Úmac_bundle_resourcesÚmac_framework_headersÚmac_framework_private_headers)
Úios_app_extensionÚios_watch_appÚios_watchkit_extensionÚ
mac_bundler   r   r   Úmac_xctest_bundleÚmac_xcuitest_bundleÚ#xcode_create_dependents_test_runnerz$(SDKROOT)/usr/libz$(SDKROOT)/usr/local/libc                 C   s\   t j dg i¡}t| ƒdkrdg} | D ]}t j d|i¡}| d|¡ q| d| d ¡ |S )NÚbuildConfigurationsr   ÚDefaultÚnameÚdefaultConfigurationName)ÚgypÚxcodeproj_fileÚXCConfigurationListÚlenÚXCBuildConfigurationÚAppendPropertyÚSetProperty)Úconfiguration_namesÚxcclÚconfiguration_nameÚxcbc© r1   ú5/usr/lib/python3/dist-packages/gyp/generator/xcode.pyÚCreateXCConfigurationListf   s   ÿr3   c                   @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚXcodeProjectc              
   C   sÄ   || _ || _tjj|d| _tj tj 	tj 
| j ¡¡tj 	|¡p"d¡}| j d|¡ tj d| ji¡| _|| _d| _zt | j¡ d| _W d S  tya } z|jtjkrV‚ W Y d }~d S d }~ww )N)ÚpathÚ.ÚprojectDirPathÚ
rootObjectFT)Úgyp_pathr5   r&   r'   Ú
PBXProjectÚprojectÚcommonÚRelativePathÚosÚdirnameÚabspathr,   ÚXCProjectFileÚproject_fileÚbuild_file_dictÚcreated_dirÚmakedirsÚOSErrorÚerrnoÚEEXIST)Úselfr9   r5   rC   r7   Úer1   r1   r2   Ú__init__s   s*   þÿÿ€ÿzXcodeProject.__init__c           #   
   C   sR  g }| j  d¡D ]}| d¡}| d¡}|D ]}| d¡}||vr&| |¡ qqzt|ƒ}| j  d|¡ W n   tj d| j ¡ ‚ | 	t
d¡ | 	td¡ | j di ¡ ¡ D ]
\}	}
| 	|	|
¡ qXd	| jv rv| j  | jd	 ¡}| |¡ | j d
i ¡}|r·|D ]5}| |i ¡}|r¶| |¡}| di ¡ ¡ D ]
\}	}
| 	|	|
¡ q˜d	|v r¶| j  || d	 ¡}| |¡ qg }g }g }g }d}g }| jd D ]Ý}|d }|d }tj | j||¡}|| }|| j jd v séJ ‚| |¡ | |¡ |jr| |j¡ | |j¡ t| dd¡ƒs| |¡ | ¡ dkrd}| d¡r¥t|ƒ}tjjd| | d¡|dœ| j d}| |¡ |d }d}| d¡rT|dtj | d¡¡  }| d¡rm|d dd„ | d¡ ¡ D ƒ¡ d }d}|rtd}|d | dtj tj | d ¡¡¡  }tj |d!d"œ¡}|  d#|¡ | |¡ | |¡ ||_!qÈt"| j jd ƒt"|ƒt"|ƒ ks¹J ‚|| j jd< | j  #d¡ | j  $¡  t"|ƒd$krù|sùt|ƒ}tjj|d%d&œ| j d} |D ]}|  |¡ qæ| j jd  %d!| ¡ t"|ƒd$kr't|ƒ}tjj|d'd&œ| j d}!|D ]}"|! |"¡ q| j jd  %d$|!¡ d S d S )(NÚtargetsÚbuildConfigurationListr"   r$   zProblem with gyp file %s
z,$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)z*$(SYMROOT)/DerivedSources/$(CONFIGURATION)Úxcode_settingsÚxcode_config_fileÚconfigurationsFÚtarget_nameÚtoolsetÚsuppress_wildcardÚallTÚrun_aszRun ÚproductName)r$   rV   rM   ©Úparentr   Úworking_directoryzcd "%s"
ÚenvironmentÚ
c                 S   s$   g | ]\}}d |t j |¡f ‘qS )zexport %s="%s")r&   r'   ÚConvertVariablesToShellSyntax)Ú.0ÚkeyÚvalr1   r1   r2   Ú
<listcomp>  s
    þÿz*XcodeProject.Finalize1.<locals>.<listcomp>z°python -c "import fcntl, subprocess, sys
file = open('$TMPDIR/GYP_serialize_test_runs', 'a')
fcntl.flock(file.fileno(), fcntl.LOCK_EX)
sys.exit(subprocess.call(sys.argv[1:]))" úexec z
%s
exit 1
Úactionr   )ÚshellScriptÚshowEnvVarsInLogÚbuildPhasesé   ÚAll©rM   r$   zRun All Tests)&r;   ÚGetPropertyÚappendr3   r,   ÚsysÚstderrÚwriter9   ÚSetBuildSettingÚ_intermediate_varÚ_shared_intermediate_varrC   ÚgetÚitemsÚAddOrGetFileInRootGroupÚSetBaseConfigurationÚConfigurationNamedr&   r<   ÚQualifiedTargetÚ_propertiesÚsupport_targetÚintÚlowerr'   ÚPBXAggregateTargetÚAddDependencyr\   ÚjoinÚEncodePOSIXShellListÚPBXShellScriptBuildPhaser+   Útest_runnerr)   ÚRootGroupsTakeOverOnlyChildrenÚ
SortGroupsÚinsert)#rI   Úxcode_targetsÚserialize_all_testsrP   Úxctr.   Úxcbcsr0   r$   ÚxckÚxcvÚ
config_refÚbuild_file_configurationsÚconfig_nameÚbuild_file_configuration_namedÚxccÚordinary_targetsÚrun_test_targetsÚsupport_targetsrL   Úhas_custom_allÚtargets_for_allÚtargetrQ   rR   Úqualified_targetÚxcode_targetÚ
run_targetÚcommandÚscriptÚcommand_prefixÚssbpÚ
all_targetÚrun_all_tests_targetÚrun_test_targetr1   r1   r2   Ú	Finalize1Š   s   



€ýÿÿ
ÿ

ÿ
ÿ
ÿ
ÿ
€
ÿ


ýû
ÿÿþÿýÿ	ÿÿþ

€
ÿ
þûþûózXcodeProject.Finalize1c                 C   s@  | j d D ]z}t| dd¡ƒr|d }|d }tj | j||¡}|| }t|tjj	ƒrg }| 
d¡}	|	D ]}
|
 
d¡}| 
d¡}t|d	ƒrK| |j¡ q4t|ƒdkrtjj	d
| |dœ| jd}|D ]}| |¡ qb| jjd  |¡}| jjd  |d |¡ q| jj ¡ D ]}| j |¡ q†| j ¡  | j ¡  | j ¡  d S )NrL   r!   r   rQ   rR   ÚdependenciesÚtargetProxyÚremoteGlobalIDStringr€   zRun %s Tests)r$   rV   rW   rf   )rC   ry   rq   r&   r<   rv   r9   Ú
isinstancer'   r{   ri   Úhasattrrj   r€   r)   r;   r|   rw   Úindexrƒ   Ú_other_pbxprojectsÚkeysÚAddOrGetProjectReferenceÚSortRemoteProductReferencesrB   Ú
ComputeIDsÚEnsureNoIDCollisions)rI   r„   Úxcode_target_to_target_dictÚbf_tgtÚtgt_namerR   r•   r–   Úall_run_testsÚpbxtdsÚpbxtdÚpbxcipÚdependency_xctÚrun_all_targetrž   ÚidxÚother_pbxprojectr1   r1   r2   Ú	Finalize2l  sD   
ÿ



€þü€

zXcodeProject.Finalize2c              
   C   s  t jdd| jd\}}zct |d¡}| j |¡ | ¡  tj | jd¡}d}z	t	 
||d¡}W n tyH } z|jtjkr>‚ W Y d }~nd }~ww |rSt |¡ W d S t d¡}t |¡ t |d| @ ¡ t ||¡ W d S  ty…   t |¡ | jr„t | jd	¡ ‚ w )
Nz.tmpzproject.pbxproj.gyp.)ÚsuffixÚprefixÚdirÚwzproject.pbxprojFé?   i¶  T)ÚtempfileÚmkstempr5   r>   ÚfdopenrB   ÚPrintÚcloser}   ÚfilecmpÚcmprF   rG   ÚENOENTÚunlinkÚumaskÚchmodÚrenameÚ	ExceptionrD   ÚshutilÚrmtree)rI   Ú	output_fdÚnew_pbxproj_pathÚoutput_fileÚpbxproj_pathÚsamerJ   rÆ   r1   r1   r2   ÚWrite«  s<   ÿÿÿ€ÿ


úzXcodeProject.WriteN)Ú__name__Ú
__module__Ú__qualname__rK   rŸ   r·   rÑ   r1   r1   r1   r2   r4   r   s     c?r4   c           	      C   sŽ   g d¢}g d¢}t  | ¡}t  |¡\}}|r|dd …  ¡ }||v r/|dkr/| ¡  | ¡ d S ||v r@|dkr@| ¡  | ¡ d S | | ¡ d S )N)ÚcÚccÚcppÚcxxÚmÚmmÚsÚswift)ÚaÚdylibÚ	frameworkÚorf   Únone)Ú	posixpathÚbasenameÚsplitextrz   ÚSourcesPhaseÚAddFileÚFrameworksPhasers   )	ÚsourceÚtypeÚpbxpr†   Úsource_extensionsÚlibrary_extensionsrã   ÚrootÚextr1   r1   r2   ÚAddSourceToTargetí  s   
rï   c                 C   s   |  ¡  | ¡ d S )N)ÚResourcesPhaseræ   )Úresourcerê   r†   r1   r1   r2   ÚAddResourceToTarget  s   rò   c                 C   s    dd|  }|  ¡  | |¡ d S )Nz{ATTRIBUTES = (%s, ); })ÚPrivateÚPublic)ÚHeadersPhaseræ   )Úheaderrê   r†   Ú	is_publicÚsettingsr1   r1   r2   ÚAddHeaderToTarget  s   rù   z(\$\((.*?)\))c                 C   sZ   t  | ¡}|dkr| S | ¡  |D ]}|\}}||vrq|| }t t |¡|| ¡} q| S )a£  Expands Xcode-style $(VARIABLES) in string per the expansions dict.

  In some rare cases, it is appropriate to expand Xcode variables when a
  project file is generated.  For any substring $(VAR) in string, if VAR is a
  key in the expansions dict, $(VAR) will be replaced with expansions[VAR].
  Any $(VAR) substring in string for which VAR is not a key in the expansions
  dict will remain in the returned string.
  N)Ú_xcode_variable_reÚfindallÚreverseÚreÚsubÚescape)ÚstringÚ
expansionsÚmatchesÚmatchÚ
to_replaceÚvariableÚreplacementr1   r1   r2   ÚExpandXcodeVariables  s   

r  z([\\\"\' ])c                 C   s   t  td| ¡S )a  We must escape the defines that we give to XCode so that it knows not to
     split on spaces and to respect backslash and quote literals. However, we
     must not quote the define, or Xcode will incorrectly intepret variables
     especially $(inherited).z\\\1)rý   rþ   Ú_xcode_define_re)rÛ   r1   r1   r2   ÚEscapeXcodeDefine0  s   r	  c                 C   s–   |d }|   ¡ D ]#\}}tj |¡\}}|dkrq||j d }|jr+tj |j|¡}q|D ]}	dd|g}
|
d|	g7 }
td|	|
f ƒ t 	|
¡ q.d S )NÚoptionsú.gypú
.xcodeprojÚ
xcodebuildz-projectz-configurationzBuilding [%s]: %s)
rr   r>   r5   rä   r¸   Úgenerator_outputr}   ÚprintÚ
subprocessÚ
check_call)ÚdatarP   Úparamsr
  Ú
build_filerC   Úbuild_file_rootÚbuild_file_extÚxcodeproj_pathÚconfigÚ	argumentsr1   r1   r2   ÚPerformBuild8  s   €
ür  c                 C   s®   | d j }|  d¡dkr9tj | d jpd¡}|  di ¡ dd¡}tj tj ||¡¡}tj tj ||d¡¡}ntj tj |d	¡¡}tj tj ||d
¡¡}||dœad S )Nr
  ÚflavorÚninjar6   Úgenerator_flagsÚ
output_dirÚoutzgypfiles-xcode-ninjar  Úgypfiles)ÚtoplevelÚqualified_out_dir)	Útoplevel_dirrq   r>   r5   Úrelpathr  Únormpathr}   Úgenerator_filelist_paths)r  r!  Úgenerator_dirr  r"  r1   r1   r2   ÚCalculateGeneratorInputInfoJ  s   
ÿÿ
þr(  c           z      C   s:  |  d¡dk}|rtj | |||¡\} }}|d }|  di ¡}|  dd¡}|  dd¡}|  dd ¡}	|	rGt|	ƒ}	t|	ƒd	k rGd
|	 }	t|	ƒd	k s=|  dd¡ }
i }| ¡ D ]p\}}tj 	|¡\}}|dkreqT||j
 d }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
}ct9|c||-dƒ qŽi }d|  d‚g ¡D ]W}e|edƒ }f|fd0 d„vr²d…|f }ft|e  d†d0¡ƒ}gd‡|g }h|d  |fd ¡}i|id u rétjj:ddˆ|edƒ  i|-dS}i|i ;|f¡ |-j(da  )|4|i¡ |i|d|f< |ed‰ D ]	}j|i <|j|h¡ qíq¡|
sdŠD ]}k|kd‹ }l|  |lg ¡D ]}\| /|\¡ q
qþg dŒ¢}Z|
r#dd}„ |ZD ƒ}Z|  dOg ¡D ]}5|ZD ]}[|5  |[g ¡D ]}\|\ =dŽ¡sB| /|\¡ q5q-q)|  dg ¡D ])}mtj %|mdW ¡}9dY|9 dZ }:tj 'dgd‘|md’  d^ |:d0d“œ¡};|- !da|;¡ qNd”|v r–|d” D ]}n|- "||n ¡ |0r”|0 "||n ¡ qd•|v rÈ|d• D ](}o|- >¡  <|o¡ t, 7|o¡}p|pt?vrÆ|- @tA¡rÀ|p|- BtA¡vrÆ|- CtA|p¡ qŸ|D ]}|d | }q|- D|¡}r|q  d–g ¡D ]	}s|r Cd—|s¡ qÝ|q  d˜g ¡D ]	}s|r Cd™|s¡ qí|q  dšg ¡D ]}p|pt?vr|r @tA¡r|p|r BtA¡vr|r CtA|p¡ qýd›|qv r1|qd› D ]}ttE|tƒ}u|r Cdœ|u¡ q#d|qv rH|qd  ¡ D ]\}v}w|r F|v|w¡ q<dž|qv rY| /|qdž ¡}x|r G|x¡ qÊqËg }y| ¡ D ]\}}| Hd¡rq|y |¡ qb|yD ]}||  I||¡ qu|yD ]}||  J||¡ qƒ|yD ]	}||  K¡  q‘d S )ŸNr  r  r
  r  Úxcode_parallel_buildsTÚxcode_serialize_all_test_runsÚ#xcode_upgrade_check_project_versioné   Ú0Úxcode_list_excluded_filesr  r  ÚYESÚ!BuildIndependentTargetsInParallelÚLastUpgradeCheckÚLastTestingUpgradeCheckÚLastSwiftUpdateCheckÚ
attributesÚ
standaloneÚ	mainGroupr$   ÚBuildÚincluded_filesFrR   r”   z:Multiple toolsets not supported in xcode build (target %s)Údefault_configurationrP   zcom.apple.product-type.toolzcom.googlecode.gyp.xcode.bundlez&com.apple.product-type.library.dynamicz%com.apple.product-type.library.staticz'com.apple.product-type.kernel-extensionz"com.apple.product-type.applicationzcom.apple.product-type.bundlez'com.apple.product-type.bundle.unit-testz(com.apple.product-type.bundle.ui-testingz com.apple.product-type.frameworkz$com.apple.product-type.app-extensionz)com.apple.product-type.watchkit-extensionz+com.apple.product-type.application.watchapp)Ú
executableÚloadable_moduleÚshared_libraryÚstatic_libraryÚmac_kernel_extensionzexecutable+bundlezloadable_module+bundlezloadable_module+xctestzloadable_module+xcuitestzshared_library+bundlezexecutable+extension+bundlez!executable+watch+extension+bundlezexecutable+watch+bundlezmac_kernel_extension+bundlerh   ré   r   r   r    r   r   r   r   rá   z	+xcuitestr;  zFmac_xcuitest_bundle targets must have type loadable_module (target %s)z+xctestzDmac_xctest_bundle targets must have type loadable_module (target %s)z6ios_app_extension flag requires mac_bundle (target %s)z+extension+bundlez;ios_watchkit_extension flag requires mac_bundle (target %s)z+watch+extension+bundlez2ios_watch_app flag requires mac_bundle (target %s)z+watch+bundlez+bundleÚproductTypez/-- unknown product type while writing target %sz6mac_bundle targets cannot have type none (target "%s")z?mac_xcuitest_bundle targets cannot have type none (target "%s")z=mac_xctest_bundle targets cannot have type none (target "%s")Úproduct_namerV   Úproduct_dirÚproduct_prefixÚproduct_extension)rX   Úforce_outdirÚforce_prefixÚforce_extensionrL   ÚactionsÚrulesÚsupport_target_suffixz SupportrW   Úmessagezecho note: r   rb   r[   ra   z
exit 1
ÚinputszAction "Úaction_nameú"Úoutputs)Ú
inputPathsr$   ÚoutputPathsrc   rd   re   rf   Úprocess_outputs_as_sourcesÚ'process_outputs_as_mac_bundle_resourcesr   Ú	extensionÚrule_sources)ÚINPUT_FILE_BASEÚINPUT_FILE_SUFFIXÚINPUT_FILE_NAMEÚINPUT_FILE_PATHÚINPUT_FILE_DIRNAMEz%s.makez[^a-zA-Z0-9_]Ú_z%s_%sÚ	rule_namer»   zall: \
z \z	    %s%s
z    z%s%s \
z    : \
z	@mkdir -p "%s"
z" "z	@echo note: %s
z	%s
z¤JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)"
if [ "${JOB_COUNT}" -gt 4 ]; then
  JOB_COUNT=4
fi
exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}"
exit 1
zRule "Úinputs_excludedc                 S   ó   g | ]	}|  d ¡s|‘qS ©Ú	_excluded©Úendswith©r]   Úxr1   r1   r2   r`   l  ó    z"GenerateOutput.<locals>.<listcomp>Úsourcesr   r=  r   ÚcopiesÚdestination)ú/ú$z$(SRCROOT)/Úxcode_code_sign)Nz#{ATTRIBUTES = (CodeSignOnCopy, ); }zCopy to Úfiles)re  r   r   r   r_  )rK  r\  rN  Úoutputs_excludedc                 S   r]  r^  r`  rb  r1   r1   r2   r`   ¸  rd  z$(BUILT_PRODUCTS_DIR)/Ú
postbuildsz($(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)zPostbuild "Úpostbuild_name)rO  r$   rc   rd   r    Ú	librariesÚmac_framework_dirsÚFRAMEWORK_SEARCH_PATHSÚinclude_dirsÚHEADER_SEARCH_PATHSÚlibrary_dirsÚdefinesÚGCC_PREPROCESSOR_DEFINITIONSrN   rO   )Lrq   r&   Úxcode_ninjaÚCreateWrapperÚstrr)   rr   r>   r5   rä   r¸   r  r}   r4   r;   r,   ri   r'   ÚPBXGroupÚAppendChildÚAddOrGetFileByPathr<   ÚParseQualifiedTargetrÉ   Úsortedr§   rj   r3   ry   ÚPBXNativeTargetÚKeyErrorÚExceptionAppendr{   r+   r|   rx   ÚEncodePOSIXShellArgumentr~   r\   r   rw   rƒ   rï   rò   râ   Úsplitr  rs   Úextendrý   rþ   Úopenrm   Ú	enumerateÚzipr?   rÁ   rù   ÚPBXCopyFilesBuildPhaseÚSetDestinationræ   Ú
startswithrç   Úxcode_standard_library_dirsÚHasBuildSettingÚ_library_search_paths_varÚGetBuildSettingÚAppendBuildSettingru   r	  rn   rt   ra  rŸ   r·   rÑ   )zÚtarget_listÚtarget_dictsr  r  Úninja_wrapperr
  r  Úparallel_buildsr…   Úupgrade_check_project_versionÚskip_excluded_filesÚxcode_projectsr  rC   r  r  r  Úxcprê   Úproject_attributesÚ
main_groupÚbuild_groupÚincluded_filer„   r¬   r•   rQ   rR   Úspecr-   r/   r.   Ú_typesÚtarget_propertiesré   Ú	is_xctestÚis_xcuitestÚ	is_bundleÚis_app_extensionÚis_watchkit_extensionÚis_watch_appÚtype_bundle_keyÚxctarget_typerJ   Útarget_product_namer†   Úspec_actionsÚ
spec_rulesÚsupport_xctÚsupport_xcclrI  Úsupport_target_propertiesÚprebuild_indexrb   rJ  Úaction_stringÚ
message_shÚaction_string_shr™   r›   ÚoutputÚtgt_mac_bundle_resourcesÚrules_by_extÚruleÚconcrete_outputs_by_rule_sourceÚconcrete_outputs_allÚmessagesrG  Úrule_sourceÚrule_source_dirnameÚrule_source_basenameÚrule_source_rootÚrule_source_extÚrule_input_dictÚ%concrete_outputs_for_this_rule_sourceÚconcrete_outputÚwas_mac_bundle_resourceÚmakefile_nameÚmakefile_pathÚmakefileÚconcrete_output_indexÚconcrete_output_by_rule_sourceÚeolÚconcrete_outputsÚconcrete_output_dirsÚbolÚconcrete_output_dirÚprerequisitesÚprerequisite_indexÚprerequisiteÚgroupsÚgroupÚitemrè   Úsource_rootÚsource_extensionrñ   Úresource_rootÚresource_extensionrö   Ú
pbxcp_dictÚ
copy_groupÚdestÚ	code_signrø   ÚpbxcpÚfiler^   Úexcluded_keyÚ	postbuildÚ
dependencyÚlibraryÚlibrary_dirÚconfigurationr0   Úinclude_dirÚdefineÚ
set_definerˆ   r‰   rŠ   Úbuild_filesr1   r1   r2   ÚGenerateOutput^  sŽ  ÿ
ÿ
ÿÿÿÿÿ


€

ÿÿÿ

€ðþ
ÿÿÿÿ
ÿ

ÿ

ÿ

ÿ€ýÿÿÿÿÿÿ

ýÿþÿÿÿ

ÿû€$
ÿÿû

ÿ
ÿ



ÿÿ


ÿ
ÿÿ

ÿ



€
ÿúÿûÿÿ
ÿý
ÿÿ
€üÿü
€


ÿ€

ÿ€


ÿ
€é
€
ÿÿrå  )'Ú
__future__r   rÂ   Ú
gyp.commonr&   Úgyp.xcodeproj_fileÚgyp.xcode_ninjarG   r>   rk   râ   rý   rÊ   r  r½   ro   rp   r  Úgenerator_default_variablesÚ"generator_additional_path_sectionsÚ+generator_additional_non_configuration_keysÚ!generator_extra_sources_for_rulesr&  Ú	frozensetr‹  r3   Úobjectr4   rï   rò   rù   Úcompilerú   r  r  r	  r  r(  rå  r1   r1   r1   r2   Ú<module>   s’   ÿþýüûúôóòñðïîíìëê	þ  }

