Skip to content

Commit c48280b

Browse files
committed
Merge pull request #1 from skillz/feature-improvements
Feature improvements
2 parents 2d5a5ef + 6d64c10 commit c48280b

36 files changed

+13
-1040
lines changed

LICENSE.meta

Lines changed: 0 additions & 2 deletions
This file was deleted.

PBXBuildFile.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,12 @@ public class PBXBuildFile : PBXObject
1414

1515
public PBXBuildFile( PBXFileReference fileRef, bool weak = false ) : base()
1616
{
17-
1817
this.Add( FILE_REF_KEY, fileRef.guid );
1918
SetWeakLink( weak );
20-
21-
// def Create(cls, file_ref, weak=False):
22-
// if isinstance(file_ref, PBXFileReference):
23-
// file_ref = file_ref.id
24-
//
25-
// bf = cls()
26-
// bf.id = cls.GenerateId()
27-
// bf['fileRef'] = file_ref
28-
//
29-
// if weak:
30-
// bf.set_weak_link(True)
31-
//
32-
// return bf
3319
}
3420

3521
public PBXBuildFile( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
3622
{
37-
// Debug.Log( "constructor child" );
3823
}
3924

4025
public bool SetWeakLink( bool weak = false )
@@ -101,26 +86,6 @@ public bool AddCompilerFlag( string flag )
10186

10287
((PBXDictionary)_data[ SETTINGS_KEY ])[ COMPILER_FLAGS_KEY ] = ( string.Join( " ", flags ) + " " + flag );
10388
return true;
104-
105-
// def add_compiler_flag(self, flag):
106-
// k_settings = 'settings'
107-
// k_attributes = 'COMPILER_FLAGS'
108-
//
109-
// if not self.has_key(k_settings):
110-
// self[k_settings] = PBXDict()
111-
//
112-
// if not self[k_settings].has_key(k_attributes):
113-
// self[k_settings][k_attributes] = flag
114-
// return True
115-
//
116-
// flags = self[k_settings][k_attributes].split(' ')
117-
//
118-
// if flag in flags:
119-
// return False
120-
//
121-
// flags.append(flag)
122-
//
123-
// self[k_settings][k_attributes] = ' '.join(flags)
12489
}
12590

12691
}

PBXBuildFile.cs.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

PBXBuildPhase.cs

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,18 @@ public class PBXBuildPhase : PBXObject
1010

1111
public PBXBuildPhase() :base()
1212
{
13-
// Debug.Log( "base" );
1413
}
1514

1615
public PBXBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
1716
{
18-
// Debug.Log( "constructor " + GetType().Name );
1917
}
2018

2119
public bool AddBuildFile( PBXBuildFile file )
2220
{
23-
// if( ((string)file[ ISA_KEY ]).CompareTo( "PBXBuildFile" ) != 0 )
24-
// return false;
25-
// Debug.Log( "--> buildphase " + (string)_data[ ISA_KEY ] );
26-
27-
2821
if( !ContainsKey( FILES_KEY ) ){
29-
// Debug.Log( "key not present" );
3022
this.Add( FILES_KEY, new PBXList() );
3123
}
32-
// Debug.Log( "key: " + _data[ FILES_KEY ] );
33-
// Debug.Log( "Adding: " + file.guid );
3424
((PBXList)_data[ FILES_KEY ]).Add( file.guid );
35-
// if( ((PBXList)_data[ FILES_KEY ]).Contains( file.guid ) ) {
36-
// Debug.Log( "AGGIUNTO" );
37-
// }
38-
// else {
39-
// Debug.Log( "MANCA" );
40-
// }
4125

4226
return true;
4327
}
@@ -65,73 +49,40 @@ public bool HasBuildFile( string id )
6549
return ((PBXList)_data[ FILES_KEY ]).Contains( id );
6650
}
6751

68-
// class PBXBuildPhase(PBXObject):
69-
// def add_build_file(self, bf):
70-
// if bf.get('isa') != 'PBXBuildFile':
71-
// return False
72-
//
73-
// if not self.has_key('files'):
74-
// self['files'] = PBXList()
75-
//
76-
// self['files'].add(bf.id)
77-
//
78-
// return True
79-
//
80-
// def remove_build_file(self, id):
81-
// if not self.has_key('files'):
82-
// self['files'] = PBXList()
83-
// return
84-
//
85-
// self['files'].remove(id)
86-
//
87-
// def has_build_file(self, id):
88-
// if not self.has_key('files'):
89-
// self['files'] = PBXList()
90-
// return False
91-
//
92-
// if not PBXObject.IsGuid(id):
93-
// id = id.id
94-
//
95-
// return id in self['files']
9652
}
9753

9854
public class PBXFrameworksBuildPhase : PBXBuildPhase
9955
{
10056
public PBXFrameworksBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
10157
{
102-
// Debug.Log( "constructor child" + GetType().Name );
10358
}
10459
}
10560

10661
public class PBXResourcesBuildPhase : PBXBuildPhase
10762
{
10863
public PBXResourcesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
10964
{
110-
// Debug.Log( "constructor child" + GetType().Name );
11165
}
11266
}
11367

11468
public class PBXShellScriptBuildPhase : PBXBuildPhase
11569
{
11670
public PBXShellScriptBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
11771
{
118-
// Debug.Log( "constructor child" + GetType().Name );
11972
}
12073
}
12174

12275
public class PBXSourcesBuildPhase : PBXBuildPhase
12376
{
12477
public PBXSourcesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
12578
{
126-
// Debug.Log( "constructor child" + GetType().Name );
12779
}
12880
}
12981

13082
public class PBXCopyFilesBuildPhase : PBXBuildPhase
13183
{
13284
public PBXCopyFilesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
13385
{
134-
// Debug.Log( "constructor child" + GetType().Name );
13586
}
13687
}
13788
}

PBXBuildPhase.cs.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

PBXDictionary.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace UnityEditor.XCodeEditor
66
{
77
public class PBXDictionary : Dictionary<string, object>
88
{
9-
109
public void Append( PBXDictionary dictionary )
1110
{
1211
foreach( var item in dictionary) {

PBXDictionary.cs.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

PBXFileReference.cs

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -114,81 +114,6 @@ private void SetFileType( string fileType )
114114

115115
this.Add( EXPLICIT_FILE_TYPE_KEY, fileType );
116116
}
117-
118-
// class PBXFileReference(PBXType):
119-
// def __init__(self, d=None):
120-
// PBXType.__init__(self, d)
121-
// self.build_phase = None
122-
//
123-
// types = {
124-
// '.a':('archive.ar', 'PBXFrameworksBuildPhase'),
125-
// '.app': ('wrapper.application', None),
126-
// '.s': ('sourcecode.asm', 'PBXSourcesBuildPhase'),
127-
// '.c': ('sourcecode.c.c', 'PBXSourcesBuildPhase'),
128-
// '.cpp': ('sourcecode.cpp.cpp', 'PBXSourcesBuildPhase'),
129-
// '.framework': ('wrapper.framework','PBXFrameworksBuildPhase'),
130-
// '.h': ('sourcecode.c.h', None),
131-
// '.icns': ('image.icns','PBXResourcesBuildPhase'),
132-
// '.m': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
133-
// '.mm': ('sourcecode.cpp.objcpp', 'PBXSourcesBuildPhase'),
134-
// '.nib': ('wrapper.nib', 'PBXResourcesBuildPhase'),
135-
// '.plist': ('text.plist.xml', 'PBXResourcesBuildPhase'),
136-
// '.png': ('image.png', 'PBXResourcesBuildPhase'),
137-
// '.rtf': ('text.rtf', 'PBXResourcesBuildPhase'),
138-
// '.tiff': ('image.tiff', 'PBXResourcesBuildPhase'),
139-
// '.txt': ('text', 'PBXResourcesBuildPhase'),
140-
// '.xcodeproj': ('wrapper.pb-project', None),
141-
// '.xib': ('file.xib', 'PBXResourcesBuildPhase'),
142-
// '.strings': ('text.plist.strings', 'PBXResourcesBuildPhase'),
143-
// '.bundle': ('wrapper.plug-in', 'PBXResourcesBuildPhase'),
144-
// '.dylib': ('compiled.mach-o.dylib', 'PBXFrameworksBuildPhase')
145-
// }
146-
//
147-
// trees = [
148-
// '<absolute>',
149-
// '<group>',
150-
// 'BUILT_PRODUCTS_DIR',
151-
// 'DEVELOPER_DIR',
152-
// 'SDKROOT',
153-
// 'SOURCE_ROOT',
154-
// ]
155-
//
156-
// def guess_file_type(self):
157-
// self.remove('explicitFileType')
158-
// self.remove('lastKnownFileType')
159-
// ext = os.path.splitext(self.get('name', ''))[1]
160-
//
161-
// f_type, build_phase = PBXFileReference.types.get(ext, ('?', None))
162-
//
163-
// self['lastKnownFileType'] = f_type
164-
// self.build_phase = build_phase
165-
//
166-
// if f_type == '?':
167-
// print 'unknown file extension: %s' % ext
168-
// print 'please add extension and Xcode type to PBXFileReference.types'
169-
//
170-
// return f_type
171-
//
172-
// def set_file_type(self, ft):
173-
// self.remove('explicitFileType')
174-
// self.remove('lastKnownFileType')
175-
//
176-
// self['explicitFileType'] = ft
177-
//
178-
// @classmethod
179-
// def Create(cls, os_path, tree='SOURCE_ROOT'):
180-
// if tree not in cls.trees:
181-
// print 'Not a valid sourceTree type: %s' % tree
182-
// return None
183-
//
184-
// fr = cls()
185-
// fr.id = cls.GenerateId()
186-
// fr['path'] = os_path
187-
// fr['name'] = os.path.split(os_path)[1]
188-
// fr['sourceTree'] = '<absolute>' if os.path.isabs(os_path) else tree
189-
// fr.guess_file_type()
190-
//
191-
// return fr
192117
}
193118

194119
public enum TreeEnum {

PBXFileReference.cs.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

PBXGroup.cs

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -107,60 +107,5 @@ public string GetName()
107107
return (string)_data[ NAME_KEY ];
108108
}
109109

110-
// class PBXGroup(PBXObject):
111-
// def add_child(self, ref):
112-
// if not isinstance(ref, PBXDict):
113-
// return None
114-
//
115-
// isa = ref.get('isa')
116-
//
117-
// if isa != 'PBXFileReference' and isa != 'PBXGroup':
118-
// return None
119-
//
120-
// if not self.has_key('children'):
121-
// self['children'] = PBXList()
122-
//
123-
// self['children'].add(ref.id)
124-
//
125-
// return ref.id
126-
//
127-
// def remove_child(self, id):
128-
// if not self.has_key('children'):
129-
// self['children'] = PBXList()
130-
// return
131-
//
132-
// if not PBXObject.IsGuid(id):
133-
// id = id.id
134-
//
135-
// self['children'].remove(id)
136-
//
137-
// def has_child(self, id):
138-
// if not self.has_key('children'):
139-
// self['children'] = PBXList()
140-
// return False
141-
//
142-
// if not PBXObject.IsGuid(id):
143-
// id = id.id
144-
//
145-
// return id in self['children']
146-
//
147-
// def get_name(self):
148-
// path_name = os.path.split(self.get('path',''))[1]
149-
// return self.get('name', path_name)
150-
//
151-
// @classmethod
152-
// def Create(cls, name, path=None, tree='SOURCE_ROOT'):
153-
// grp = cls()
154-
// grp.id = cls.GenerateId()
155-
// grp['name'] = name
156-
// grp['children'] = PBXList()
157-
//
158-
// if path:
159-
// grp['path'] = path
160-
// grp['sourceTree'] = tree
161-
// else:
162-
// grp['sourceTree'] = '<group>'
163-
//
164-
// return grp
165110
}
166111
}

0 commit comments

Comments
 (0)