public bool AddFrameworkSearchPaths(PBXList paths)
        {
            PBXList relativePaths = new PBXList();

            foreach (String path in paths)
            {
                relativePaths.Add(AddXcodeQuotes(CreateRelativePath(RemoveXcodeQuotes(path))));
            }

            foreach (KeyValuePair <string, XCBuildConfiguration> buildConfig in buildConfigurations)
            {
                buildConfig.Value.AddFrameworkSearchPaths(relativePaths, false);
            }
            modified = true;
            return(modified);
        }
示例#2
0
        public void SetWeakLink(bool weak)
        {
            PBXDictionary settings   = null;
            PBXList       attributes = null;

            if (_data.ContainsKey(SETTINGS_KEY))
            {
                settings = _data[SETTINGS_KEY] as PBXDictionary;
                if (settings.ContainsKey(ATTRIBUTES_KEY))
                {
                    attributes = settings[ATTRIBUTES_KEY] as PBXList;
                }
            }

            if (weak)
            {
                if (settings == null)
                {
                    settings = new PBXDictionary();
                    settings.internalNewlines = false;
                    _data.Add(SETTINGS_KEY, settings);
                }

                if (attributes == null)
                {
                    attributes = new PBXList();
                    attributes.internalNewlines = false;
                    attributes.Add(WEAK_VALUE);
                    settings.Add(ATTRIBUTES_KEY, attributes);
                }
            }
            else
            {
                if (attributes != null && attributes.Contains(WEAK_VALUE))
                {
                    attributes.Remove(WEAK_VALUE);
                }
            }
        }
示例#3
0
        protected bool AddSearchPaths(PBXList paths, string key, bool recursive = true)
        {
            bool modified = false;

            if (!ContainsKey(BUILDSETTINGS_KEY))
            {
                this.Add(BUILDSETTINGS_KEY, new PBXDictionary());
            }

            foreach (string path in paths)
            {
                string currentPath = path;
                if (recursive && !path.EndsWith("/**"))
                {
                    currentPath += "**";
                }
                if (!((PBXDictionary)_data[BUILDSETTINGS_KEY]).ContainsKey(key))
                {
                    ((PBXDictionary)_data[BUILDSETTINGS_KEY]).Add(key, new PBXList());
                }
                else if (((PBXDictionary)_data[BUILDSETTINGS_KEY])[key] is string)
                {
                    PBXList list = new PBXList();
                    list.Add(((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]);
                    ((PBXDictionary)_data[BUILDSETTINGS_KEY])[key] = list;
                }


                if (!((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Contains(currentPath))
                {
                    ((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Add(currentPath);
                    modified = true;
                }
            }

            return(modified);
        }
 private PBXList ParseArray()
 {
     PBXList list = new PBXList();
     bool complete = false;
     while( !complete ) {
         switch( NextToken() ) {
             case END_OF_FILE:
                 Debug.Log( "Error: Reached end of file inside a list: " + list );
                 complete = true;
                 break;
             case ARRAY_END_TOKEN:
                 complete = true;
                 break;
             case ARRAY_ITEM_DELIMITER_TOKEN:
                 break;
             default:
                 StepBackward();
                 list.Add( ParseValue() );
                 break;
         }
     }
     return list;
 }
示例#5
0
 public bool AddFrameworkSearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, FRAMEWORK_SEARCH_PATHS_KEY, recursive));
 }
示例#6
0
 public bool AddLibrarySearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, LIBRARY_SEARCH_PATHS_KEY, recursive));
 }
示例#7
0
 public bool AddHeaderSearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, HEADER_SEARCH_PATHS_KEY, recursive));
 }
		public void SetWeakLink( bool weak)
		{
			PBXDictionary settings = null;
			PBXList attributes = null;

			if (_data.ContainsKey (SETTINGS_KEY)) {
				settings = _data[SETTINGS_KEY] as PBXDictionary;
				if (settings.ContainsKey(ATTRIBUTES_KEY)) {
					attributes = settings[ATTRIBUTES_KEY] as PBXList;
				}
			}

			if (weak) {
				if (settings == null) {
					settings = new PBXDictionary();
					settings.internalNewlines = false;
					_data.Add(SETTINGS_KEY, settings);
				}

				if (attributes == null) {
					attributes = new PBXList();
					attributes.internalNewlines = false;
					attributes.Add(WEAK_VALUE);
					settings.Add(ATTRIBUTES_KEY, attributes);
				}
			}
			else {
				if(attributes != null  && attributes.Contains(WEAK_VALUE)) {
					attributes.Remove(WEAK_VALUE);
				}
			}
		}
		public bool AddOtherLDFlags( PBXList flags )
		{
			foreach( KeyValuePair<string, XCBuildConfiguration> buildConfig in buildConfigurations ) {
				buildConfig.Value.AddOtherLDFlags( flags );
			}
			modified = true;
			return modified;	
		}		
示例#10
0
		public bool AddFrameworkSearchPaths( PBXList paths )
		{
			foreach( KeyValuePair<string, XCBuildConfiguration> buildConfig in buildConfigurations ) {
				buildConfig.Value.AddFrameworkSearchPaths( paths, false );
			}
			modified = true;
			return modified;
		}