# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
from __future__ import print_function
import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import subprocess
# Copyright (c) 2012 Google Inc# Use of this source code is governed by a BSD-java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 28
# Project files generated by this module will use _intermediate_var as a # custom Xcode setting whose value is a DerivedSources-like directory that's # project-specific and configuration-specific. The normal choice, # DERIVED_FILE_DIR, is target-specific, which is thought to be too restrictive # as it is likely that multiple targets within a single project file will want # to access the same set of generated files. The other option, # PROJECT_DERIVED_FILE_DIR, is unsuitable because while it is project-specific, # it is not configuration-specific. INTERMEDIATE_DIR is defined as # $(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION).
_intermediate_var = '# targets that share the same BUILT_PRODUCTS_DIR.
# SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all # targets that share the same BUILT_PRODUCTS_DIR.
_shared_intermediate_var = 'SHARED_INTERMEDIATE_DIR'
generator_default_variables = { 'EXECUTABLE_PREFIX': '', 'java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SHARED_LIB_PREFIX l' 'STATIC_LIB_SUFFIX': '.a',
S .', # INTERMEDIATE_DIR is a place for targets to build up intermediate products. # It is specific to each build environment. It is only guaranteed to exist'':'lib'java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 INTERMEDIATE_DIR is a place for targets to build up intermediate products. # input file. Some build environments may allow their intermediate directory # to be shared on a wider scale, but this is not guaranteed. ' input file. Some build environments may allow their intermediate directory 'OS': 'mac', INTERMEDIATE_DIR $%'%i,
PRODUCT_DIR':'(), 'LIB_DIR': '$(BUILT_PRODUCTS_DIR)', 'RODUCT_DIR: '$BUILT_PRODUCTS_DIR, 'RULE_INPUT_EXT': '$(INPUT_FILE_SUFFIX)''LIB_DIR':'()', ''RULE_INPUT_ROOT:'(INPUT_FILE_BASE' '':'(), 'RULE_INPUT_DIRNAME': '$(INPUT_FILE_DIRNAME)', '':'(%) % shared_intermediate_var, 'CONFIGURATION_NAME': '$(CONFIGURATION)',
}
# The Xcode-specific sections that hold paths.
generator_additional_path_sections java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 'mac_bundle_resources', 'mac_framework_headers', 'mac_framework_private_headers: '(), # 'mac_framework_dirs', input already handles _dirs endings.
]
# The Xcode-specific keys that exist on targets and aren't moved down to # configurations.
keys =java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 'ios_watch_app', 'ios_watchkit_extension', 'generator_additional_non_configuration_keys = java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47 'java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 25
m, 'mac_framework_private_headers', 'mac_xctest_bundle', '', '',
]
# We want to let any rules apply to files that are resources also.
generator_extra_sources_for_rules 'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 'mac_framework_headers', 'mac_framework_private_headers# in LIBRARY_SEARCH_PATHS. This list is not exhaustive, but that's okay.
]
generator_filelist_paths = None
# Xcode's standard set of library directories, which don't need to be duplicated # in LIBRARY_SEARCH_PATHS. This list is not exhaustive, but that's okay.
xcode_standard_library_dirs=([ '()usr/lib'java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 '$(SDKROOT)/usr/ onfiguration_names ''java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
]java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
def CreateXCConfigurationList( xccl.SetProperty('defaultConfigurationNamejava.lang.StringIndexOutOfBoundsException: Range [68, 66) out of bounds for length 70
xccl x.('uildConfigurations:[}java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 ifconfiguration_names)= :
configuration_names = ['Default'] inconfiguration_names
xcbc = project=gypcommonRelativePath 'ame:configuration_name)
xccl.AppendProperty('buildConfigurations', xcbc)
xccl.(defaultConfigurationName,configuration_names0] return xccl
classXcodeProjectobject:
java.lang.StringIndexOutOfBoundsException: Range [14, 5) out of bounds for length 54
self.gyp_path.codeproj_file.({' .}java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
path=
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
projectDirPath = #java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
.path.dirname(spath.abspath(elf.))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
os. tryjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
self.project.SetProperty('rojectDirPath', projectDirPath)
self.project_file = \
gyp.xcodeproj_file.XCProjectFile({ except OSError as e:
self.build_file_dict = build_file_dictif eerrno ! errno.EEXIST:
# TODO(mark): add destructor that cleans up self.path if created_dir is # True and things didn't complete successfully. Or do something even # better with "try"?
self.created_dir=False try:
os.makedirs(self.path)
self # various targets in the file. It is very heavily advised to keep each except OSError =[java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
eerrno =errno.EEXISTjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 raise
=xccl.etProperty') # Collect a list of all of the build configuration names used by the # various targets in the file. It is very heavily advised to keep each (even across multiple project files) using the same set of configuration names.
configurations = [] for configurationsappendnamejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 # a new one specifying all of the configuration names used by the varioustry
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 53
name =java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
#java.lang.StringIndexOutOfBoundsException: Range [76, 6) out of bounds for length 76
configurations.append(name)
# properly in the Xcode UI. # a new one specifying all of the configuration names used by the various # targets. try:
xccl #only configurationname ,whentheprojectfileis
self. except:
sys.# This is filed raisex.etBuildSettingintermediate_var
# The need for this setting is explained above where _intermediate_var is # defined. The comments below about wanting to avoid project-wide build settings apply here too, but this needs to be set on a project-wide basis so that files relative to the _intermediate_var setting can be displayed # properly in the Xcode UI. # # Note that for configuration-relative files such as anything relative to # _intermediate_var, for the purposes of UI tree view display, Xcode will # only resolve the configuration name once, when the project file is # opened. If the active build configuration is changed, the project file # must be closed and reopened if it is desired for the tree view to update. # This is filed as Apple radar 6588391.
xccl.(_ntermediate_var '$(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 43
xccl.java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 50 '$(SYMROOT) .SetBuildSetting( java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
# Set user-specified project-wide build settings and config files. This # is intended to be used very sparingly. Really, almost everything should # go into target-specific build settings sections. The project-wide(config_refjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 # settings are only intended to be used in cases where Xcode attempts to : in a project context as opposed to a target sourceTree references while building up
UIdisplay # Any values set globally are applied to all configurations, then any # per-configuration values are applied. forx,xcv s..('code_settings,{})items(:
xccl.SetBuildSetting(xck, xcv) if'xcode_config_file .(config_name)
self.build_file_dict[' )i()
S(onfig_refjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
=self.uild_file_dictget'onfigurations,{}) if build_file_configurations: for config_namebuild_file_configurations[onfig_name]'')
java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 42
build_file_configurations.get(java.lang.StringIndexOutOfBoundsException: Range [72, 49) out of bounds for length 72 if java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
# for xck, xcv in java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
# does the it defin
h
config_ref = self.project#java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
build_file_configurations =[
xccSetBaseConfigurationjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
# Sort the targets based on how they appeared in the input. # TODO(mark): Like a lot of other things here, this assumes internal [toolset] # knowledge of PBXProject - in this case, of its "targets" property.
# ordinary_targets are ordinary targets that are already in the project # file. run_test_targets are the targets that run unittests and should be
#used RunAll . are action/ # targets used by GYP file targets, just kept for the assert check.
ordinary_targets = []
# the unsorted list.
support_targets = []
# targets is full list of targets in the project.
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 16
it's own "all"?
.xcode_targetsupport_targetjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
# targets_for_all is the list of ordinary_targets that should be listed
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # that does not have suppress_wildcard set.
targets_for_all = []
in self[t':
target_name = target['target_name']
=target[t]
has_custom_allTrue
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 60
# targets # Make sure that the target being added to the sorted list is already inget'': # the unsorted list.
xccl=CreateXCConfigurationListconfigurations)
targets.ppendxcode_target
.append(xcode_target if productName:xcode_targetGetProperty(productName)
support_targetsappend(support_target
targets.append( ,
=.)
run_target(xcode_target)
if target_namelower)= a:
java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 30
' java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 70 # targets, and add it to the test targets. ifgyp.xcodeproj_file.ConvertVariablesToShellSyntax
. It shouldhaveone # dependency, the parent xcode target.
xccl= CreateXCConfigurationList(configurations)
run_target = gyp.xcodeproj_file.PBXAggregateTarget({ 'name': 'Run ' + target_name, 'productName': xcode_target.GetProperty(' 'buildConfigurationList':xccl,
},
parent=self.project)
run_target.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
command if time The generator
script = ''# tests serially. It defaults to True. To get serial runs this if command.get('# make sure only one runs a time.
script = script + command_prefix='java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
gyp.codeproj_fileConvertVariablesToShellSyntax(
command.get('working_directory'))
if command.get('file = open('$TMPDIR/GYP_serialize_test_runs', 'a')
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 38
[
gypjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
# Some test end up using sockets, files on disk, etc. and can get.java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 66 # confused if more then one test runs at a time. The generator
the of # tests serially. It defaults to True. To get serial runs thisshellScript , # little bit of python does the same as the linux flock utility to # make sure only one runs at a time.
command_prefix = 'run_target.AppendProperty('buildPhases', ssbp) if serialize_all_tests:
= \ """python -c "import fcntl, subprocess un_test_targets.ppend(run_target)
=$java.lang.StringIndexOutOfBoundsException: Range [48, 44) out of bounds for length 51
fcntl(projectt] java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
sys.self.java.lang.StringIndexOutOfBoundsException: Range [37, 28) out of bounds for length 49
# If we were unable to exec for some reason, we want to exit # with an error, and fixup variable references to be shell # syntax instead of xcode syntax.
script = script self.project.SortGro)
gypxcodeproj_fileC(
gyp.common.EncodePOSIXShellList(command.get('action'#java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
s=gyp.xcodeproj_filePBXShellScriptBuildPhase
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 55 'xccl = CreateXCConfigurationLiconfigurations
})
run_target.AppendProperty('buildPhases'{
# Add the run target to the project file.name: Alljava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
targets targetin
run_test_targets.(run_target)
xcode_target.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# Make sure that the list of targets being replaced is the same length as
assert len(self.project._properties['targets'])java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ordinary_targets +lens)
self.project._properties['targets'] = targets
levels of depth in groups like the Source group.
..RootGroupsTakeOverOnlyChildrenTrue)
# Sort the groups nicely. Do this after sorting the targets, because the # Products group is sorted based on the order of the targets.
self.project.SortGroups()
# Create an "All" target if there's more than one target in this project # file and the project didn't define its own "All" target. Put a generated # "All" target first so that people opening up the project for the first}, # time will build everything by default. if len(targets_for_all) > 1andnot has_custom_all:
xccl = run_all_tests_target.AddDependencyrun_test_target)
all_target = gyp.xcodeproj_file.PBXAggregateTarget(
{ Insert after the "All" target, which must exist if there is more than 'name': All,
}java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
parent=elfproject
# Finneeds to a separate step theprocess
to projects dependson of
# TODO(mark): This is evil because it relies on internal knowledge of # PBXProject._properties. It's important to get the "All" target first, # though.
self.project._properties['targets # that are direct dependents of any given target, we look for
#java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 if # the targetjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
xccl = CreateXCConfigurationList(configurationsi intbf_tgtg(',0)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
run_all_tests_target = gyp =bf_tgt[toolset]
{ 'buildConfigurationList'qualified_target .ommonQualifiedTargets.yp_path 'name': 'Run All Tests',
}java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
parent=self.project)
[]
un_all_tests_targetAddDependencyrun_test_target
# Insert after the "All" target, which must exist if there is more than # one run_test_target.
elf._[targets'.1 )
rgets, xcode_target_to_target_dict # Finalize2 needs to happen in a separate step because the process of # updating references to other projects depends on the ordering of targets
# project files. Finalize1 isresponsiblefor uty, # and once all project files are sorted, Finalize2 can come in and update # these references.
# To support making a "test runner" target that will run all the testsappenddependency_xct) # that are direct dependents of any given target, we look for # xcode_create_dependents_test_runner being set on an Aggregate target, # and generate a second target that will run the tests runners found under # the marked target. for bf_tgt in self.build_file_dictrun_all_target gyp.codeproj_file.PBXAggregateTarget{ if int(,
tgt_name = bf_tgt['target_name']
oolset=bf_tgt[toolset']
qualified_target = }
tgt_name, toolset)
xcode_target = # Insert the test runner the related target.
odeproj_file.PBXAggregateTarget): # Collect all the run test targets.
all_run_tests = []
.roject.properties'targets'.insert(idx + 1,run_all_target) for pbxtd in pbxtds:
pbxcip = pbxtd.GetProperty(targetProxy'
dependency_xct
# TODm) becauseinternalknowledgejava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
# Directly depend on all the runners as they depend on the target # that builds them. if projectSortRemoteProductReferences)
# Give everything an ID '' RunsTeststgt_name 'productName': tgt_namejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
},
parent=self.project) for run_test_target in all_run_tests:
run_all_target.AddDependency(run_test_target)
# Insert the test runner after the related target.
...)
self.project
# Update all references to other projects, to make sure that the lists of # remote products are complete. Otherwise, Xcode will fill them in when#java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 # it opens the project file, which will result in unnecessary diffs. # TODO(mark): This is evil because it relies on internal knowledge of # PBXProject._other_pbxprojects. for # project file is written
first. iscompared theexistingproject
self.project.SortRemoteProductReferences#java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
# Give everything an ID.
self.project_file. Writing to a temporary file first also avoids the possible problem of
# Make sure that no two objects in the project file have the same ID. If # multiple objects wind up with the same ID, upon loading the file, Xcodemkstempsuffix'tmp'prefix'p.gyp' # will only recognize one object (the last one in the file?) and the # results are unpredictable.
project_file(
def Write(selfselfproject_file.() # Write the project file to a temporary location first. Xcode watches for
#java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 # multiple projects are open or when Xcode is busy, things don't work so same
#java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 # changed but can't unload it because something else is referencing it. OSError ase
problem andto void evenhaving Xcodepresent the UI # sheet when an open project is rewritten for inconsequential changes, the # project file is written to a temporary file in the xcodeproj directory java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 # first. The new temporary file is then compared to the existing project# one. # file, if any. If they differ, the new file replaces the old; otherwise,: # the new project file is simply deleted. Xcode properly detects a file # being renamed over an open project file as a change and so it remains # able to present the "project file changed" sheet under this system. # Writing to a temporary file first also avoids the possible problem of # Xcode rereading an incomplete project file.
(output_fd,new_pbxproj_path)=\
tempfile.mkstemp(suffix='.tmp', prefix='project.pbxproj.gyp.',
dir=.path)
same = False try:
same = filecmp.cmp .(new_pbxproj_path,& umaskjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 except OSError java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 21 if e.errno != errno.ENOENT: raise
if same: # The new file is identical to the old one, just get rid of the new # one.
osunlink(ew_pbxproj_path) else: # The new file is different from the old one, or there is no old one.
d AddSourceToTarget(source ,pbxp,xct:
(ark Perhaps source_extensionsandlibrary_extensionscan be made a # tempfile.mkstemp uses an overly restrictive mode, resulting in a # file that can only be read by the owner, regardless of the umask.=[c,'c,'cpp'cxx' m, mm', s, 'wift' .o is conceptually more of a "source" than a "library," but Xcode thinks # an extra hoop is required to fetch it and reset the new file's mode. # # No way to get the umask without setting a new one? Set a safe one .
umask = os.umask(0o77)
.()
except Exception: # Don't leave turds behind. In fact, if this code was responsible for # creating the xcodeproj directory, get rid of that too.
osxct.)AddFile(ource) if self.created_dir:
shutil. elif ext in library_extensions and type != 'none': raise
def java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 7 # TODO(mark): Perhaps source_extensions and library_extensions can be made a # little bit fancier.
pbxp(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
# .o is conceptually more of a "source" than a "library," but Xcode thinks source"than library, but Xcode thinks # of "sources" as things to compile and "libraries" (or "frameworks") as # things to link with. Adding an object file to an Xcode target's frameworks # phase works properly.
library_extensions = ['a', 'dylib', 'framework', 'o']
java.lang.StringIndexOutOfBoundsException: Range [22, 10) out of bounds for length 39
(,ext)= posixpathsplitext() if ext:
ext = ext[1:].lower()
ift.eadersPhase().AddFile(header, settings)
xct.SourcesPhase().AddFile(source) elif ext in library_extensions and type !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xct.FrameworksPhase().AddFile(source) else:
#java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 # go into the project file, just not as part of a build phase.
pbxp.(source)
def AddResourceToTarget(resource, pbxp, xct): # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call # where it's used.
xct.ResourcesPhase().AddFile(resource)
def AddHeaderToTarget(header, pbxp, xct, is_public): # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call # where it's used.
settings = '""
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
In some rare cases, it is (o_replace,variable)=match
project is generated. For any substring $VAR)instring,ifis
key continue
Any $(VAR)ent =expansions[ariable]
dict will remain in the returned string. ""
matches = _xcode_variable_re if matches = returnxcode_define_re = recompile('(\\\\']'java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
matches.reverse() for match in matches:
split spaces and to backslashandq literals.However,we ifnotin expansionsjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 continue
_xcode_define_re = re.compile(r'([\\\"\' ])') deffor build_file,build_file_dict indatai(: """We must escape the (build_file_root, build_file_ext os.ath.splitextbuild_file)
split on spaces andif build_file_ext! 'gyp'
mustnot quotethe ,or willincorrectly intepretvariables
especially $(inherited)."""
java.lang.StringIndexOutOfBoundsException: Range [32, 8) out of bounds for length 45
def xcodeproj_ = os.path.joinoptions.generator_output,xcodeproj_path
options = config in configuration
forindata.(:
(build_file_root, build_file_ext) = os.path.splitext(build_file) if ! 'gyp': continue
xcodeproj_path = build_file_root +.check_call(argumentsjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if options.generator_output
xcodeproj_path =..(options.generator_output xcodeproj_pathjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
for config in configurations:
arguments generator_dir .ath.relpath(['ptions'].enerator_outputor''java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
arguments =[-configuration' config]
print("Buildingoutput_dir os..normpath(os.path.oin(,output_dir))
subprocess.heck_callarguments
def CalculateGeneratorInputInfo(params):
toplevel elsejava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
paramsget(f' = 'inja'java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
generator_dir = ospath.(params['options'].generator_output or'.')
output_dir = toplevel, output_dir'ypfiles')
output_dir = os.path.normpath(os.path.join(generator_dir
=os..ormpath(s..join(
toplevel, output_dir, 'gypfiles-xcode else:
output_dir = os.path.normpath(os.path.join(toplevel, 'xcodebuild'))
qualified_out_dir = os.path.normpath(os.path.join(
toplevel, output_dir, 'java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
global generator_filelist_paths
generator_filelist_paths = { 'toplevel': toplevel, 'java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 45
}
def gyp.xcode_ninja.CreateWrapper(target_list, target_dicts, data, params) # Optionally configure each spec to use ninja as the external builder.options =params[options'java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
ninja_wrapper = paramsparallel_builds generator_flagsget('xcode_parallel_builds'True if ninja_wrapper:
(target_list, target_dicts, data) = \
gyp.code_ninja.CreateWrapper(target_list,target_dicts,data,params)
options = params['options']
.get(generator_flags', {})
parallel_builds = generator_flags.get('xcode_parallel_builds', True generator_flags.(xcode_upgrade_check_project_version' None)
serialize_all_tests
java.lang.StringIndexOutOfBoundsException: Range [70, 40) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 35
generator_flags.get('xcode_upgrade_check_project_version', None)
# Format upgrade_check_project_version with leading zeros as needed.
java.lang.StringIndexOutOfBoundsException: Range [34, 4) out of bounds for length 35
=str(upgrade_check_project_version while lens java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
upgrade_check_project_version = '0' +xcode_projects={}
(build_file_rootbuild_file_ext)= os.athsplitext(build_file) not generator_flags.get('xcode_list_excluded_files', True)
code_projects ={java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 for build_file, xcodeproj_path = build_file_root + options.suffix + '.xcodeproj'
(build_file_root,build_file_ext)=o..splitext(build_file) if build_file_extxcodeproj_path=os.ath.oin(.generator_output xcodeproj_pathjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 continue
xcodeproj_path = xcode_projects[build_file xcp if options.enerator_output:
xcodeproj_path = os.path.join(options.generator_output, java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0
xcp = project_attributes {}java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
xcode_projects project_attributes'BuildIndependentTargetsInParallel] =''
pbxp = xcp.project
# Set project-level attributes from multiple options
project_attributes ={; if parallel_builds:
project_attributes[ ['LastTestingUpgradeCheck' =\ if upgrade_check_project_version:
project_attributes['project_attributes['LastSwiftUpdateCheck'] = \
project_attributes['LastTestingUpgradeCheck upgrade_check_project_version
upgrade_check_project_version
project_attributes['java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
upgrade_check_project_version
java.lang.StringIndexOutOfBoundsException: Range [32, 8) out of bounds for length 54
# Add gyp/gypi files to project ifnot build_group =gyp.xcodeproj_file.PBXGroup{name' 'uild'}
=pbxp.GetProperty'mainGroup') forincluded_file inbuild_file_dict[included_files']:
main_group.AppendChild(build_group) for build_group.AddOrGetFileByPath(included_file, False)
i java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
[build_file ]=\
xcode_target_to_target_dict = {} for qualified_target in target_list:
[java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
gyp.common [toolset'!'arget:
spec = target_dicts[qualified_target] if']! 'target' raise Exception
toolsetsnotinxcodebuild(arget s'%
qualified_target)
configuration_names= spec'default_configuration] for configuration_name if configuration_namenotinconfiguration_namesjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 if configuration_name notin java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 22
configuration_names.append(configuration_name)
xcp = xcode_projects[build_file]
pbxp = xcp.project
for the target according to the list of names # supplied.
xccl = CreateXCConfigurationList(configuration_names)
# Create an XCTarget subclass object for the target. The type with # "+bundle" appended will be used if the target has "mac_bundle" set. # loadable_modules not in a mac_bundle are mapped to 'executable': 'com.apple.product-type.tool', # to create a single-file mh_bundle.
_types = { 'executable': 'com.apple.product-type.tool', 'oadable_module' comgooglecode.xcode.', 'shared_library': 'com.apple.product-type.library.dynamic', 'static_library' mac_kernel_extension': 'com.apple.product-type.kernel-extension',
mac_kernel_extension': 'com.apple.product-type.kernel-extension', 'executable+bundle': 'com. 'loadable_module+bundle': 'com.apple-.undle',
.bundle' 'loadable_module+xctest': 'com.apple.product-type.bundleloadable_module+xcuitest'com.apple.roduct-type.undle.-testing', 'loadable_module+xcuitest': 'com.apple.'shared_library+bundle': 'com.apple.product.ramework',
shared_library+bundle': 'com.apple.product-type.framework',
+:'..roduct-typea-xtension'java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 'xecutablewatch+: 'com.apple.product-type.application.watchapp', 'executable+watch+bundle': 'com.apple.product-type.application.watchapp', 'mac_kernel_extension+bundle': 'com.apple.product-type.kernel-extension',
}
'buildConfiguration:java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 5 'name': target_name,
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
type = spec['type']
is_xctest sg(mac_xctest_bundle )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
=(g(m' )
is_bundle = int(spec.get('mac_bundle', 0)) or is_xctest or is_watchkit_extension = int(spec.get('ios_watchkit_extension', 0
is_app_extension = java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 22
is_watchkit_extension = int is_xcuitest
is_watch_app=specg',0) if type != 'none':
type_bundle_key = type ifis_xcuitest
type_bundle_key += '+xcuitest'%'%) assert type == 'loadable_module', ( 'mac_xcuitest_bundle targets java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 36 '(target '(target targets type loadable_module ' elif is_xctest:
type_bundle_key += '+xctest'
sserttype ='oadable_module' java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 'mac_xctest_bundle targets must have type java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 46 '(target %s)' % target_name)
'target %'%) '(target %s)' % target_name)
type_bundle_key += '+extension+bundle' elifis_watchkit_extension
ssert,(ios_watchkit_extensionrequiresmac_bundlejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 '(target %s)' % target_nametype_bundle_key+ +watchbundle
type_bundle_key += '+watch+extension+bundle' elif is_watch_appjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 tryjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 '(target %s)' % java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 27
+ '+bundlejava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 elif is_bundle:
+ '+'
.codeproj_file. tryeassert ,(
target_properties['productType'] = _types[ 'mac_bundle targets cannot have type none (target "%s")' %
KeyErrorejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
gypcExceptionAppend,"- producttype while " "writing target %s" % target_name) raise else:
xctarget_type = assert not is_xctest assertnot is_bundle, ( 'mac_bundle targets cannot have type none (target "%s")' %
target_name) assertnot is_xcuitest (
i target_product_nameisnot one:
target_name) assertnot is_xctest
targets cannothavetypenone(arget "s)'java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
target_name)
xct = xctarget_type(target_properties, parent=pbxp,
force_outdir=pec.et'product_dir')java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
spec_actions =spec.et(actions', [])
force_extension=spec.get('product_extension')) ', xctjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
#java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
# sources" step with any
java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 # sources" step with any source files/headers generated by actions/rules. =None # To work around this, if a target is building anything directly (not # type "none"), then a second target is used to run the GYP actions/rules
#java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 # before the dependency checks for what should be recompiled.java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 68
=None # The Xcode "issues" don't affect xcode-ninja builds, since the dependency'upport_target_suffix,'Support) # logic all happens in ninja. Don't bother creating the extra targets in # that case.'uildConfigurationList:support_xccl, if ! none'and (spec_actions spec_rules) and not ninja_wrapper:
support_xccl = CreateXCConfigurationList(configuration_names);
support_target_suffix = generator_flags.et(
support_target_suffix,'Support'
support_target_propertiesproductName java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 'buildConfigurationList': support_xccl, 'name': gypxcodeproj_fileP(support_target_properties
} if target_product_name pbxp.AppendProperty'targets' support_xct)
productName= java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
target_product_name + ' Support'
.support_targe
gyp.prebuild_index = 0
parent=pbxp) for s
# Hang the support target off the main target so it can be tested/found # by the generator during Finalize.
xct. # Do we have a message to print when this action runs?
x=java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
for action message ' # There's no need to write anything into the script to ensure that the # output directories already exist, because Xcode will look at the # declared outputs and automatically ensure that they exist for us.
# variable references.
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 37 if message:
message =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 else:
message = ''
# Turn the list into a string that can be passed to a shell.
#
#java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 # variable references.
java.lang.StringIndexOutOfBoundsException: Range [58, 16) out of bounds for length 76
action_string_sh'inputPaths' action'inputs',
action_stringjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
script = ''
if message_sh:
script += message_sh + '\java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 21 # Be sure the script runs in exec, and that if exec fails, the script # exits signalling an error.
script += 'exec ' + action_string_sh + '\java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 17
ssbp = gyp. java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 ':'ction'+[a' +''java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 '':actiono'], 'shellScript': script, 'showEnvVarsInLog': AddSourceToTarget(outpu, ,, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
})
if support_xct:
support_xct.AppendProperty( else # TODO(mark): this assumes too much knowledge of the internals of # xcodeproj_file; some of these smarts should move into xcodeproj_file # itself.
_buildPhases],ssbp)
prebuild_index = prebuild_index + 1
# TODO(mark): Should verify that at most one of these is specified. if int(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 for output in action['outputs']:
AddSourceToTargetoutput type, pbxpxctjava.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
if int(action.get(' # There are workarounds for some of its,butin , for output in action['outputs']:
AddResourceToTarget(output, pbxp, xct)
# tgt_mac_bundle_resources holds the list of bundle resources so # the rule processing can check against it. if is_bundle:
tgt_mac_bundle_resources =specget(mac_bundle_resources', [) else:
# The following were .
# Add custom shell script phases driving "make" for "rules" sections. # # Xcode's built-in rule support is almost powerful enough to use directly, # but there are a few significant deficiencies that render them unusable. # There are workarounds for some of its inadequacies, but in aggregate, # the workarounds added complexity to the generator, and some workarounds # outputs. This requires input file cooperation and it means that # Consequently, until Xcode rules are made more capable, "rules" input # sections will be handled in Xcode output by shell script build phases # performed prior to the compilation phase. # # The following problems with Xcode rules were found. The numbers are # Apple radar IDs. I hope that these shortcomings are addressed, I really # liked having the rules handled directly in Xcode during the period that # I was prototyping this. # # 6588600 Xcode compiles custom script rule outputs too soon, compilation # fails. This occurs when rule outputs from distinct inputs are # interdependent. The only workaround is to put rules and their
rule : # outputs. This requires input file cooperation and it means that
#process_outputs_as_sources is unusable. # 6584932 Need to declare that custom rule outputs should be excluded from # compilation. A possible workaround is to lie to Xcode about a # rule's output, giving it a dummy file it doesn't know how to # compile. The rule action script would need to touch the dummy. # 6584839 I need a way to declare additional inputs to a custom rule. # A possible workaround is a shell script phase prior to # compilation that touches a rule's primary input files if any # would-be additional inputs are newer than the output. Modifying # the source tree - even just modification times - feels dirty. # 6564240 Xcode "custom script" build rules always dump all environment # variables. This is a low-prioroty problem and is not a show-stopper.
rules_by_ext = # the "concrete output"forruleinput"." be".cc. If forjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
rules_by_ext[rule['extension']] = ruleof outputs.
# First, some definitions: # # A "rule source" is a file that was listed in a target's "sources" # list and will have a rule applied to it on the basis of matching the # rule's "extensions" attribute. Rule sources are direct inputs to # rules. # Rule definitions may specify additional inputs in their "inputs" # attribute. These additional inputs are used for dependency tracking # purposes. # # A "concrete output" is a rule output with input-dependent variables # resolved. For example, given a rule with: # 'extension': 'ext', 'outputs': ['$(INPUT_FILE_BASE).cc'], # if the target's "sources" list contained "one.ext" and "two.ext", # the "concrete output" for rule input "two.ext" would be "two.cc". If # a rule specifies multiple outputs, each input file that the rule is # applied to will have the same number of concrete outputs. # # If any concrete outputs are outdated or missing relative to their # corresponding rule_source or to any specified additional input, the
#
# concrete_outputs_by_rule_source will have an item at the same index # as the rule['rule_sources'] that it corresponds to. Each item is a # list of all of the concrete outputs for the rule_source.rule_source_basename
concrete_outputs_by_rule_source#
# concrete_outputs_all is a flat list of all concrete outputs that this # rule is able to produce, given the known set of input files
(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
concrete_outputs_all = []
# and concrete_outputs_by_rule_source. They contain the message and } # message is optional, in which case None is stored for each rule source.
messages = []
actions = []
for rule_source in rule
rule_source_dirname, rule_source_basename = \
posixpath.split( # what Xcode puts intojava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
(,)
posixpath
# These are the same variable names that Xcode uses for its own native Acjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 # rule support. Because Xcode's rule engine is not being used, they # need to be expanded as they are written to the makefile.
rule_input_dict = { 'INPUT_FILE_BASE': rule_source_root ruleget,))
:java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 'INPUT_FILE_NAME' 'INPUT_FILE_PATH': rule_source, 'was_mac_bundle_resource = tgt_mac_bundle_resources
concrete_outputs_for_this_rule_source = [] for output in rule in: # Fortunately, Xcode and make both use $(VAR) format for their # variables, so the expansion is the only transformation necessary. # Any remaning $(VAR)-type variables in the string can be given
will
# into .
concrete_output = ExpandXcodeVariables(output, rule_input_dict)
concrete_outputs_for_this_rule_source.append
# Add all concrete outputs to the project. action_string gyp.E(']java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
pbxp.AddOrGetFileInRootGroupm = %. %s(
# TODO(mark): Should verify that at most one of these is specified. if int(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0 for output in concrete_outputs_for_this_rule_source:
AddSourceToTarget(output,java.lang.StringIndexOutOfBoundsException: Range [37, 17) out of bounds for length 17
the istoriftherule # is marked to process outputs as bundle resource, do so.java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 55
was_mac_bundle_resource = rule_source in tgt_mac_bundle_resources if was_mac_bundle_resource or \
int(rule.get('process_outputs_as_mac_bundle_resources', False)): for output in concrete_outputs_for_this_rule_source:
A( )
#java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
message = rule.getjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if message:
(message
message = ExpandXcodeVariables( ,actions:
# Turn the list into a string that can be passed to a shell.
.E(']
java.lang.StringIndexOutOfBoundsException: Range [37, 14) out of bounds for length 69
actions.append(actionboljava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
if len(concrete_outputs_all) > 0:
# target "t" rule "A_r" and target "t_A" rule "r".
makefile_name java.lang.StringIndexOutOfBoundsException: Range [34, 31) out of bounds for length 68 '[^a-zA-Z0 not concrete_output_dirs:
makefile_path = os.path.join(xcode_projectsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0 # TODO(mark): try/close? Write to a temporary file and swap it only # if it's got changes?
makefile = open(makefile_path, 'w')
# make will build the first target in the makefile by default. By # convention, it's called "all". List all (or at least one) # concrete output for each rule source as a prerequisite of the "all"
targetjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
makefile.rite(all \\n' for concrete_output_index,
enumerate(concrete_outputs_by_rule_source)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 # Only list the first (index [0]) concrete output of each input # in the "all" target. Otherwise, a parallel make (-j > 1) would # attempt to process each input multiple times simultaneously. # Otherwise, "all" could just contain the entire list of # concrete_outputs_all.
# Therule messageand variable if concrete_output_index == len(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 21
eol.rite('te s\n ) else:
= \java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (rule_source, concrete_outputs
ziprule[' java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 70
messages, actions):
makefile.write('\n')
# Add a rule that declares it can build each concrete output of a # rule source. Collect the names of the directories that are # required.
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 18 for concrete_output_index, concrete_output in \
enumerate(concrete_outputs): if if [ "${JOB_COUNT}" -gt 4
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2 else:
bol = ' ' "" %
.':\\'java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
# The prerequisites for this rule are the rule source itself and # the set of additional rule inputs, if any.
prerequisites = [ # TODO(mark): this assumesknowledgeof internalsjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
prerequisites.extend(rule.get('inputs', [])) forjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 75 if prerequisite_index #java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
eol = '' else:
eol = ' \\'
makefilew'%%sn p,)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
# Make sure that output directories exist before executing the rule # action. if len(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
(\@%"n java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 ""join()
# The rule message and action have already had the necessary variable # substitutions performed. if message:
it picksit ojava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
makefile.write('\t@echo note: #already java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
makefile :
(
# It might be nice to ensure that needed output directories exist
ntarget , '
# a input- # variable anywhere other than in the leaf position.
# To help speed things up, pass -j COUNT to make so it does some work # in parallel. Don't use ncpus because Xcode will build ncpus targets # in parallel and if each target happens to have a rules step, there # would be ncpus^2 things going. With a machine that has 2 quad-core # Xeons, a build can quickly run out of processes based on # scheduling/other tasks, and randomly failing builds are no good.
script = \ """JOB_COUNT="$(/usr/sbin/sysctl -n java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 27 if [ "$for .et'ac_framework_headers,[)java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
JOB_COUNT=4
fi
exec xcrun make -f "${PROJECT_FILE_PATH}pbxcp_dict ={}
exit 1 """ % makefile_name
ssbp = gyp.xcodeproj_file.java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 35 'inputPaths': rule Relative paths are relative to $(SRCROOT). 'Rule" [rule_name' + ''java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 'outputPaths': concrete_outputs_all, 'shellScript': script, 'showEnvVarsInLog': 0,
})
if support_xct:
support_xct.AppendProperty('java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 43 else:
): thisassumesmuchknowledge theinternalsof # xcodeproj_file; some of these smarts should move into xcodeproj_file # itself.
xct._roperties''].nsertp, ssbp)
prebuild_index = prebuild_index + 1
# Extra rule inputs also go into the project file. Concrete outputs were) # already added when they were computed.
groups='' i'] ifs:
groups = [xxct.properties'']insertprebuild_index,pbxcp for group in groups: for item in rule.get(group, []):
nRootGroup)
# Add "sources". forsourcein spec.(sources,[)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
(source_root, source_extension) = posixpath.splitext key [sources,'' mac_framework_headersjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 if source_extension[1:] notin excluded_key +'excluded' # AddSourceToTarget will add the file to a root group if it's not # already there.
AddSourceToTarget(source else:
pbxp.(source)
# Add "mac_bundle_resources" and "mac_framework_private_headers" if
abundle of any typejava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 if is_bundle: for resource in tgt_mac_bundle_resources:
(resource_root, resource_extension) = posixpath.splitext( # Exclude anything in BUILT_PRODUCTS_DIR. They're products if resource_extension[1:] notin rules_by_ext:
AddResourceToTarget(resource, pbxp, xct) AddOrGetFileInRootGroup) else:
pbxp.AddOrGetFileInRootGroup(resource)
for header in spec. script = 'exec ' + act' 1n
AddHeaderToTarget(header, pbxp, xct, False)
# Add "mac_framework_headers". These can be valid for both frameworks # and static libraries. if is_bundle ssbp = gyp.xcodeproj_filejava.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 58 for header in spec.get('mac_framework_headers''':' '+postbuild['+''java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
(pbxp xct
)
pbxcp_dict } for copy_group in spec.get('copies', []):
dest = # adding a library if0in(/ $: # Relative paths are relative to $(SRCROOT).
dest = '$#
java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 59
settings = #
# Coalesce multiple "copies" sections in the same target with the same
#java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 withcollisions
pbxcp = pbxcp_dict.get(destAddDependency[ependency] if pbxcp isNone: ifjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
name Copy ']
},
parent=xct)
(destjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
# TODO(mark): The usual comment about this knowing too much about # gyp.xcodeproj_file internals applies.
xct._properties['buildPhases'].insert(prebuild_index, pbxcp)
pbxcp_dictdest]=pbxcp
for file in copy_group['files']:
pbxcp.AddFile(file, settings)
# Excluded files can also go into the project file. ifnot skip_excluded_files: for', 'ac_framework_headers'java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 'mac_framework_private_headers']:
excluded_key = key + '_excluded' for item in spec.get(excluded_key, []):
pbxp.AddOrGetFileInRootGroup(item)
# java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
groups = ['inputsjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 if skip_excluded_files:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 for action in spec.get('fordefine in '] for group in groups: for item in action.get(group, []): # Exclude anything in BUILT_PRODUCTS_DIR. They're products, not # sources. ifnot item.startswith('$(BUILT_PRODUCTS_DIR)/'):
pbxp.AddOrGetFileInRootGroup(item)
# Make the postbuild step depend on the output of ld or ar from this # target. Apparently putting the script step after the link step isn't # sufficient to ensure proper ordering in all cases. With an input.() # declared but no outputs, the script step should run every time, as # desired.
ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ 'inputPaths': ['$(BUILT_PRODUCTS_DIR build_files.(uild_file) 'name': 'Postbuild java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 '' script, 'showEnvVarsInLog': 0,
})
xct.AppendProperty('buildPhases', ssbp)
Add dependencies before libraries, because adding a dependency may imply # adding a library. It's preferable to keep dependencies listed first # during a link phase so that they can override symbols that would # otherwise be provided by libraries, which will usually include system # libraries. On some systems, ld is finicky and even requires the # libraries to be ordered in such a way that unresolved symbols in # earlier-listed libraries may only be resolved by later-listed libraries. # The Mac linker doesn't work that way, but other platforms do, and so # their linker invocations need to be constructed in this way. There's # no compelling reason for Xcode's linker invocations to differ.
if'dependencies'in spec: for dependency in spec['dependencies']:
xct.AddDependency(xcode_targets[dependency]) # The support project also gets the dependencies (in case they are # needed for the actions/rules to work). if support_xct:
support_xct.AddDependency(xcode_targets[dependency])
if'libraries'in spec: for library in spec['libraries']:
xct.FrameworksPhase().AddFile(library) # Add the library's directory to LIBRARY_SEARCH_PATHS if necessary. # I wish Xcode handled this automatically.
library_dir = posixpath.dirname(library) if library_dir notin xcode_standard_library_dirs and ( not xct.HasBuildSetting(_library_search_paths_var) or
library_dir notin xct.GetBuildSetting(_library_search_paths_var)):
xct.AppendBuildSetting(_library_search_paths_var, library_dir)
for configuration_name in configuration_names:
configuration = spec['configurations'][configuration_name]
xcbc = xct.ConfigurationNamed(configuration_name) for include_dir in configuration.get('mac_framework_dirs', []):
xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir) for include_dir in configuration.get('include_dirs', []):
xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir) for library_dir in configuration.get('library_dirs', []): if library_dir notin xcode_standard_library_dirs and ( not xcbc.HasBuildSetting(_library_search_paths_var) or
library_dir notin xcbc.GetBuildSetting(_library_search_paths_var)):
xcbc.AppendBuildSetting(_library_search_paths_var, library_dir)
if'defines'in configuration: for define in configuration['defines']:
set_define = EscapeXcodeDefine(define)
xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define) if'xcode_settings'in configuration: for xck, xcv in configuration['xcode_settings'].items():
xcbc.SetBuildSetting(xck, xcv) if'xcode_config_file'in configuration:
config_ref = pbxp.AddOrGetFileInRootGroup(
configuration['xcode_config_file'])
xcbc.SetBaseConfiguration(config_ref)
build_files = [] for build_file, build_file_dict in data.items(): if build_file.endswith('.gyp'):
build_files.append(build_file)
for build_file in build_files:
xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
for build_file in build_files:
xcode_projects[build_file].Finalize2(xcode_targets,
xcode_target_to_target_dict)
for build_file in build_files:
xcode_projects[build_file].Write()
Messung V0.5 in Prozent
sp; #java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
for build_file in build_files:
xcode_projects[build_file].Write()
Messung V0.5 in Prozent
[Verzeichnis aufwärts0.23unsichere VerbindungÜbersetzung europäischer Sprachen durch Browser2026-08-26]