Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature improvements #1

Merged
merged 6 commits into from
Mar 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions LICENSE.meta

This file was deleted.

35 changes: 0 additions & 35 deletions PBXBuildFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,12 @@ public class PBXBuildFile : PBXObject

public PBXBuildFile( PBXFileReference fileRef, bool weak = false ) : base()
{

this.Add( FILE_REF_KEY, fileRef.guid );
SetWeakLink( weak );

// def Create(cls, file_ref, weak=False):
// if isinstance(file_ref, PBXFileReference):
// file_ref = file_ref.id
//
// bf = cls()
// bf.id = cls.GenerateId()
// bf['fileRef'] = file_ref
//
// if weak:
// bf.set_weak_link(True)
//
// return bf
}

public PBXBuildFile( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor child" );
}

public bool SetWeakLink( bool weak = false )
Expand Down Expand Up @@ -101,26 +86,6 @@ public bool AddCompilerFlag( string flag )

((PBXDictionary)_data[ SETTINGS_KEY ])[ COMPILER_FLAGS_KEY ] = ( string.Join( " ", flags ) + " " + flag );
return true;

// def add_compiler_flag(self, flag):
// k_settings = 'settings'
// k_attributes = 'COMPILER_FLAGS'
//
// if not self.has_key(k_settings):
// self[k_settings] = PBXDict()
//
// if not self[k_settings].has_key(k_attributes):
// self[k_settings][k_attributes] = flag
// return True
//
// flags = self[k_settings][k_attributes].split(' ')
//
// if flag in flags:
// return False
//
// flags.append(flag)
//
// self[k_settings][k_attributes] = ' '.join(flags)
}

}
Expand Down
7 changes: 0 additions & 7 deletions PBXBuildFile.cs.meta

This file was deleted.

49 changes: 0 additions & 49 deletions PBXBuildPhase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,18 @@ public class PBXBuildPhase : PBXObject

public PBXBuildPhase() :base()
{
// Debug.Log( "base" );
}

public PBXBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor " + GetType().Name );
}

public bool AddBuildFile( PBXBuildFile file )
{
// if( ((string)file[ ISA_KEY ]).CompareTo( "PBXBuildFile" ) != 0 )
// return false;
// Debug.Log( "--> buildphase " + (string)_data[ ISA_KEY ] );


if( !ContainsKey( FILES_KEY ) ){
// Debug.Log( "key not present" );
this.Add( FILES_KEY, new PBXList() );
}
// Debug.Log( "key: " + _data[ FILES_KEY ] );
// Debug.Log( "Adding: " + file.guid );
((PBXList)_data[ FILES_KEY ]).Add( file.guid );
// if( ((PBXList)_data[ FILES_KEY ]).Contains( file.guid ) ) {
// Debug.Log( "AGGIUNTO" );
// }
// else {
// Debug.Log( "MANCA" );
// }

return true;
}
Expand Down Expand Up @@ -65,73 +49,40 @@ public bool HasBuildFile( string id )
return ((PBXList)_data[ FILES_KEY ]).Contains( id );
}

// class PBXBuildPhase(PBXObject):
// def add_build_file(self, bf):
// if bf.get('isa') != 'PBXBuildFile':
// return False
//
// if not self.has_key('files'):
// self['files'] = PBXList()
//
// self['files'].add(bf.id)
//
// return True
//
// def remove_build_file(self, id):
// if not self.has_key('files'):
// self['files'] = PBXList()
// return
//
// self['files'].remove(id)
//
// def has_build_file(self, id):
// if not self.has_key('files'):
// self['files'] = PBXList()
// return False
//
// if not PBXObject.IsGuid(id):
// id = id.id
//
// return id in self['files']
}

public class PBXFrameworksBuildPhase : PBXBuildPhase
{
public PBXFrameworksBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor child" + GetType().Name );
}
}

public class PBXResourcesBuildPhase : PBXBuildPhase
{
public PBXResourcesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor child" + GetType().Name );
}
}

public class PBXShellScriptBuildPhase : PBXBuildPhase
{
public PBXShellScriptBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor child" + GetType().Name );
}
}

public class PBXSourcesBuildPhase : PBXBuildPhase
{
public PBXSourcesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor child" + GetType().Name );
}
}

public class PBXCopyFilesBuildPhase : PBXBuildPhase
{
public PBXCopyFilesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
// Debug.Log( "constructor child" + GetType().Name );
}
}
}
7 changes: 0 additions & 7 deletions PBXBuildPhase.cs.meta

This file was deleted.

1 change: 0 additions & 1 deletion PBXDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace UnityEditor.XCodeEditor
{
public class PBXDictionary : Dictionary<string, object>
{

public void Append( PBXDictionary dictionary )
{
foreach( var item in dictionary) {
Expand Down
7 changes: 0 additions & 7 deletions PBXDictionary.cs.meta

This file was deleted.

75 changes: 0 additions & 75 deletions PBXFileReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,81 +114,6 @@ private void SetFileType( string fileType )

this.Add( EXPLICIT_FILE_TYPE_KEY, fileType );
}

// class PBXFileReference(PBXType):
// def __init__(self, d=None):
// PBXType.__init__(self, d)
// self.build_phase = None
//
// types = {
// '.a':('archive.ar', 'PBXFrameworksBuildPhase'),
// '.app': ('wrapper.application', None),
// '.s': ('sourcecode.asm', 'PBXSourcesBuildPhase'),
// '.c': ('sourcecode.c.c', 'PBXSourcesBuildPhase'),
// '.cpp': ('sourcecode.cpp.cpp', 'PBXSourcesBuildPhase'),
// '.framework': ('wrapper.framework','PBXFrameworksBuildPhase'),
// '.h': ('sourcecode.c.h', None),
// '.icns': ('image.icns','PBXResourcesBuildPhase'),
// '.m': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
// '.mm': ('sourcecode.cpp.objcpp', 'PBXSourcesBuildPhase'),
// '.nib': ('wrapper.nib', 'PBXResourcesBuildPhase'),
// '.plist': ('text.plist.xml', 'PBXResourcesBuildPhase'),
// '.png': ('image.png', 'PBXResourcesBuildPhase'),
// '.rtf': ('text.rtf', 'PBXResourcesBuildPhase'),
// '.tiff': ('image.tiff', 'PBXResourcesBuildPhase'),
// '.txt': ('text', 'PBXResourcesBuildPhase'),
// '.xcodeproj': ('wrapper.pb-project', None),
// '.xib': ('file.xib', 'PBXResourcesBuildPhase'),
// '.strings': ('text.plist.strings', 'PBXResourcesBuildPhase'),
// '.bundle': ('wrapper.plug-in', 'PBXResourcesBuildPhase'),
// '.dylib': ('compiled.mach-o.dylib', 'PBXFrameworksBuildPhase')
// }
//
// trees = [
// '<absolute>',
// '<group>',
// 'BUILT_PRODUCTS_DIR',
// 'DEVELOPER_DIR',
// 'SDKROOT',
// 'SOURCE_ROOT',
// ]
//
// def guess_file_type(self):
// self.remove('explicitFileType')
// self.remove('lastKnownFileType')
// ext = os.path.splitext(self.get('name', ''))[1]
//
// f_type, build_phase = PBXFileReference.types.get(ext, ('?', None))
//
// self['lastKnownFileType'] = f_type
// self.build_phase = build_phase
//
// if f_type == '?':
// print 'unknown file extension: %s' % ext
// print 'please add extension and Xcode type to PBXFileReference.types'
//
// return f_type
//
// def set_file_type(self, ft):
// self.remove('explicitFileType')
// self.remove('lastKnownFileType')
//
// self['explicitFileType'] = ft
//
// @classmethod
// def Create(cls, os_path, tree='SOURCE_ROOT'):
// if tree not in cls.trees:
// print 'Not a valid sourceTree type: %s' % tree
// return None
//
// fr = cls()
// fr.id = cls.GenerateId()
// fr['path'] = os_path
// fr['name'] = os.path.split(os_path)[1]
// fr['sourceTree'] = '<absolute>' if os.path.isabs(os_path) else tree
// fr.guess_file_type()
//
// return fr
}

public enum TreeEnum {
Expand Down
7 changes: 0 additions & 7 deletions PBXFileReference.cs.meta

This file was deleted.

55 changes: 0 additions & 55 deletions PBXGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,60 +107,5 @@ public string GetName()
return (string)_data[ NAME_KEY ];
}

// class PBXGroup(PBXObject):
// def add_child(self, ref):
// if not isinstance(ref, PBXDict):
// return None
//
// isa = ref.get('isa')
//
// if isa != 'PBXFileReference' and isa != 'PBXGroup':
// return None
//
// if not self.has_key('children'):
// self['children'] = PBXList()
//
// self['children'].add(ref.id)
//
// return ref.id
//
// def remove_child(self, id):
// if not self.has_key('children'):
// self['children'] = PBXList()
// return
//
// if not PBXObject.IsGuid(id):
// id = id.id
//
// self['children'].remove(id)
//
// def has_child(self, id):
// if not self.has_key('children'):
// self['children'] = PBXList()
// return False
//
// if not PBXObject.IsGuid(id):
// id = id.id
//
// return id in self['children']
//
// def get_name(self):
// path_name = os.path.split(self.get('path',''))[1]
// return self.get('name', path_name)
//
// @classmethod
// def Create(cls, name, path=None, tree='SOURCE_ROOT'):
// grp = cls()
// grp.id = cls.GenerateId()
// grp['name'] = name
// grp['children'] = PBXList()
//
// if path:
// grp['path'] = path
// grp['sourceTree'] = tree
// else:
// grp['sourceTree'] = '<group>'
//
// return grp
}
}
7 changes: 0 additions & 7 deletions PBXGroup.cs.meta

This file was deleted.

7 changes: 0 additions & 7 deletions PBXList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,4 @@ public PBXList( object firstValue )
}
}

// public class PBXList<T> : ArrayList
// {
// public int Add( T value )
// {
// return (ArrayList)this.Add( value );
// }
// }
}
7 changes: 0 additions & 7 deletions PBXList.cs.meta

This file was deleted.

Loading