コード例 #1
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 += "/**";
				
//				Debug.Log( "adding: " + 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;
				}
				
				currentPath = "\\\"" + currentPath + "\\\"";
				
				if( !((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Contains( currentPath ) ) {
					((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Add( currentPath );
					modified = true;
				}
			}
		
			return modified;
		}
コード例 #2
0
ファイル: XCProject.cs プロジェクト: MadsAnthony/Minion
 public bool AddOtherLDFlags(PBXList flags)
 {
     foreach (KeyValuePair <string, XCBuildConfiguration> buildConfig in buildConfigurations)
     {
         buildConfig.Value.AddOtherLDFlags(flags);
     }
     modified = true;
     return(modified);
 }
コード例 #3
0
ファイル: XCProject.cs プロジェクト: MadsAnthony/Minion
 public bool AddFrameworkSearchPaths(PBXList paths)
 {
     foreach (KeyValuePair <string, XCBuildConfiguration> buildConfig in buildConfigurations)
     {
         buildConfig.Value.AddFrameworkSearchPaths(paths);
     }
     modified = true;
     return(modified);
 }
コード例 #4
0
ファイル: XCProject.cs プロジェクト: MadsAnthony/Minion
        public bool AddHeaderSearchPaths(PBXList paths)
        {
            foreach (KeyValuePair <string, XCBuildConfiguration> buildConfig in buildConfigurations)
            {
//				Debug.Log( "ADDING HEADER PATH: " + paths + " to " + buildConfig.Key );
                buildConfig.Value.AddHeaderSearchPaths(paths);
            }
            modified = true;
            return(modified);
        }
コード例 #5
0
ファイル: PBXBuildFile.cs プロジェクト: MadsAnthony/Minion
        public bool SetWeakLink(bool weak = false)
        {
            PBXDictionary settings   = null;
            PBXList       attributes = null;

            if (!_data.ContainsKey(SETTINGS_KEY))
            {
                if (weak)
                {
                    attributes = new PBXList();
                    attributes.Add(WEAK_VALUE);

                    settings = new PBXDictionary();
                    settings.Add(ATTRIBUTES_KEY, attributes);
                    _data[SETTINGS_KEY] = settings;
                }
                return(true);
            }

            settings = _data[SETTINGS_KEY] as PBXDictionary;
            if (!settings.ContainsKey(ATTRIBUTES_KEY))
            {
                if (weak)
                {
                    attributes = new PBXList();
                    attributes.Add(WEAK_VALUE);
                    settings.Add(ATTRIBUTES_KEY, attributes);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                attributes = settings[ATTRIBUTES_KEY] as PBXList;
            }

            if (weak)
            {
                attributes.Add(WEAK_VALUE);
            }
            else
            {
                attributes.Remove(WEAK_VALUE);
            }

            settings.Add(ATTRIBUTES_KEY, attributes);
            this.Add(SETTINGS_KEY, settings);

            return(true);
        }
コード例 #6
0
ファイル: PBXBuildFile.cs プロジェクト: serenitii/jeisimple
		public bool SetWeakLink( bool weak = false )
		{
			PBXDictionary settings = null;
			PBXList attributes = null;
			
			if( !_data.ContainsKey( SETTINGS_KEY ) ) {
				if( weak ) {
					attributes = new PBXList();
					attributes.Add( WEAK_VALUE );
					
					settings = new PBXDictionary();
					settings.Add( ATTRIBUTES_KEY, attributes );
					_data[ SETTINGS_KEY ] = settings;
				}
				return true;
			}
			
			settings = _data[ SETTINGS_KEY ] as PBXDictionary;
			if( !settings.ContainsKey( ATTRIBUTES_KEY ) ) {
				if( weak ) {
					attributes = new PBXList();
					attributes.Add( WEAK_VALUE );
					settings.Add( ATTRIBUTES_KEY, attributes );
					return true;
				}
				else {
					return false;
				}
			}
			else {
				attributes = settings[ ATTRIBUTES_KEY ] as PBXList;
			}
			
			if( weak ) {
				attributes.Add( WEAK_VALUE );
			}
			else {
				attributes.Remove( WEAK_VALUE );
			}
			
			settings.Add( ATTRIBUTES_KEY, attributes );
			this.Add( SETTINGS_KEY, settings );
			
			return true;
		}
コード例 #7
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 += "/**";
                }

//				Debug.Log( "adding: " + 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;
                }

                currentPath = "\\\"" + currentPath + "\\\"";

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

            return(modified);
        }
コード例 #8
0
 public bool AddLibrarySearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, LIBRARY_SEARCH_PATHS_KEY, recursive));
 }
コード例 #9
0
 public bool AddHeaderSearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, HEADER_SEARCH_PATHS_KEY, recursive));
 }
コード例 #10
0
		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;
		}
コード例 #11
0
		public bool AddOtherCFlags( PBXList flags )
		{
			//Debug.Log( "INIZIO 2" );
			
			bool modified = false;
			
			if( !ContainsKey( BUILDSETTINGS_KEY ) )
				this.Add( BUILDSETTINGS_KEY, new PBXDictionary() );
			
			foreach( string flag in flags ) {
				
				if( !((PBXDictionary)_data[BUILDSETTINGS_KEY]).ContainsKey( OTHER_C_FLAGS_KEY ) ) {
					((PBXDictionary)_data[BUILDSETTINGS_KEY]).Add( OTHER_C_FLAGS_KEY, new PBXList() );
				}
				else if ( ((PBXDictionary)_data[BUILDSETTINGS_KEY])[ OTHER_C_FLAGS_KEY ] is string ) {
					string tempString = (string)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY];
					((PBXDictionary)_data[BUILDSETTINGS_KEY])[ OTHER_C_FLAGS_KEY ] = new PBXList();
					((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY]).Add( tempString );
				}
				
				if( !((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY]).Contains( flag ) ) {
					((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY]).Add( flag );
					modified = true;
				}
			}
			
			return modified;
		}
コード例 #12
0
		public bool AddHeaderSearchPaths( PBXList paths )
		{
			foreach( KeyValuePair<string, XCBuildConfiguration> buildConfig in buildConfigurations ) {
//				Debug.Log( "ADDING HEADER PATH: " + paths + " to " + buildConfig.Key );
				buildConfig.Value.AddHeaderSearchPaths( paths );
			}
			modified = true;
			return modified;
		}
コード例 #13
0
		public bool AddLibrarySearchPaths( PBXList paths, bool recursive = true )
		{
			return this.AddSearchPaths( paths, LIBRARY_SEARCH_PATHS_KEY, recursive );
		}
コード例 #14
0
		public bool AddHeaderSearchPaths( PBXList paths, bool recursive = true )
		{
			return this.AddSearchPaths( paths, HEADER_SEARCH_PATHS_KEY, recursive );
		}
コード例 #15
0
		protected bool AddSearchPaths( string path, string key, bool recursive = true )
		{
			PBXList paths = new PBXList();
			paths.Add( path );
			return AddSearchPaths( paths, key, recursive );
		}
コード例 #16
0
 public bool AddFrameworkSearchPaths(PBXList paths, bool recursive = true)
 {
     return(this.AddSearchPaths(paths, FRAMEWORK_SEARCH_PATHS_KEY, recursive));
 }
コード例 #17
0
		public bool AddOtherLDFlags( PBXList flags )
		{
			foreach( KeyValuePair<string, XCBuildConfiguration> buildConfig in buildConfigurations ) {
				buildConfig.Value.AddOtherLDFlags( flags );
			}
			modified = true;
			return modified;	
		}
コード例 #18
0
		public bool AddFrameworkSearchPaths(PBXList paths, bool recursive = true)
		{
			return this.AddSearchPaths(paths, FRAMEWORK_SEARCH_PATHS_KEY, recursive);
		}
コード例 #19
0
		public bool AddFrameworkSearchPaths(PBXList paths)
		{
			foreach (KeyValuePair<string, XCBuildConfiguration> buildConfig in buildConfigurations)
			{
				buildConfig.Value.AddFrameworkSearchPaths(paths);
			}
			modified = true;
			return modified;
		}
コード例 #20
0
		public bool AddOtherCFlags( string flag )
		{
			//Debug.Log( "INIZIO 1" );
			PBXList flags = new PBXList();
			flags.Add( flag );
			return AddOtherCFlags( flags );
		}