public SourceFileEntry(PListDictionary dic) : base(dic) { CompilerFlags = dic.StringValue(COMPILER_FLAGS_KEY); //check for old key name if (string.IsNullOrEmpty(CompilerFlags)) { CompilerFlags = dic.StringValue("Attributes"); } }
internal override bool DrawEntry(Egomotion.EgoXproject.Internal.PListDictionary dic) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(dic.StringValue(SETTING_KEY)); EditorGUILayout.LabelField(dic.StringValue(NAME_KEY)); var type = dic.StringValue(TYPE_KEY); if (type == BOOL_TYPE_VALUE) { var value = dic.BoolValue(VALUE_KEY); EditorGUILayout.LabelField(value ? "Yes" : "No"); } else if (type == STRING_TYPE_VALUE) { var value = dic.StringValue(VALUE_KEY); EditorGUILayout.LabelField(value); } else if (type == INTEGER_TYPE_VALUE) { var value = dic.IntValue(VALUE_KEY); EditorGUILayout.LabelField(value.ToString()); } else if (type == REAL_TYPE_VALUE) { var value = dic.FloatValue(VALUE_KEY); EditorGUILayout.LabelField(value.ToString()); } else if (type == ARRAY_TYPE_VALUE) { //TODO should also be able to draw a defaul array entries EditorGUILayout.LabelField("Array"); } else if (type == DICTIONARY_TYPE_VALUE) { //TODO should also be able to draw a defaul array entries EditorGUILayout.LabelField("Dictionary"); } else { EditorGUILayout.LabelField("UNKNOWN"); } bool remove = false;; if (GUILayout.Button("-")) { remove = true; } EditorGUILayout.EndHorizontal(); return(remove); }
public PlatformConfiguration(PListDictionary dic) { if (dic == null) { return; } var configs = dic.DictionaryValue(CONFIGURATIONS_KEY); if (configs != null && configs.Count > 0) { foreach (var kvp in configs) { var entries = kvp.Value as PListArray; if (entries == null || entries.Count <= 0) { AddConfiguration(kvp.Key); continue; } for (int ii = 0; ii < entries.Count; ++ii) { AddChangeFileToConfiguration(entries.StringValue(ii), kvp.Key); } } } ActiveConfiguration = dic.StringValue(ACTIVE_CONFIGURATION_KEY); IsDirty = false; }
public static BaseFileEntry Create(PListDictionary dic) { var type = dic.StringValue(BaseFileEntry.TYPE_KEY); if (string.IsNullOrEmpty(type)) { //TODO error? try and parse old version? Debug.LogError("EgoXproject: Corrupt entry, skipping: " + dic); return(null); } switch (type) { case SourceFileEntry.TYPE: return(CreateSourceEntry(dic)); case FrameworkEntry.TYPE: return(CreateFrameworkEntry(dic)); case StaticLibraryEntry.TYPE: return(CreateStaticLibraryEntry(dic)); case FolderEntry.TYPE: return(CreateFolderEntry(dic)); case FileEntry.TYPE: return(CreateFileEntry(dic)); default: Debug.LogError("EgoXproject: Unknown entry, skipping: " + dic); return(null); } }
//only used for upgrading from version 1 to 2 public static BaseFileEntry CreateFromObsolete(PListDictionary dic) { string path = dic.StringValue("Path"); var fileType = PBXFileTypeHelper.FileTypeFromFileName(path); if (PBXFileTypeHelper.IsSourceCodeFile(fileType)) { var entry = CreateSourceEntry(dic); return(entry); } else if (PBXFileTypeHelper.IsFramework(fileType)) { return(CreateFrameworkEntry(dic)); } else if (PBXFileTypeHelper.IsLibrary(fileType)) { return(CreateStaticLibraryEntry(dic)); } else if (PBXFileTypeHelper.IsContainer(fileType)) { return(CreateFileEntry(dic)); } else if (dic.ContainsKey("Files") || dic.ContainsKey("Folders")) { return(CreateFolderEntry(dic)); } else { return(CreateFileEntry(dic)); } }
void AddString(PListDictionary dic) { string settingName, displayName, group; ExtractCommon(dic, out settingName, out displayName, out group); var value = dic.StringValue(VALUE_KEY); bool path = dic.BoolValue(PATH_KEY); _settings[settingName] = new StringBuildSetting(settingName, displayName, group, path, value); }
protected BaseBuildSettingEntry(PListDictionary dic) { if (dic == null) { throw new System.ArgumentNullException((dic).ToString(), "Dictionary cannot be null"); } if (!dic.ContainsKey(NAME_KEY)) { throw new System.ArgumentException("No name key in dictionary"); } Name = dic.StringValue(NAME_KEY); }
public SigningChanges(PListDictionary dic) { if (dic == null) { return; } TeamId = dic.StringValue(TEAM_ID_KEY); if (dic.ContainsKey(AUTO_PROVISIONING_KEY)) { AutomaticProvisioning = dic.BoolValue(AUTO_PROVISIONING_KEY); } else { AutomaticProvisioning = true; } }
public ICloudCapability(PListDictionary dic) { KeyValueStorage = dic.BoolValue(KEY_VALUE_STORAGE_KEY); iCloudDocuments = dic.BoolValue(ICLOUD_DOCUMENTS_KEY); CloudKit = dic.BoolValue(CLOUDKIT_KEY); UseCustomContainers = dic.BoolValue(USE_CUSTOM_CONTAINERS_KEY); UbiquityKvstoreIdentifier = dic.StringValue(UBIQUITY_KVSTORE_KEY); var groups = dic.ArrayValue(CUSTOM_CONTAINERS_KEY); if (groups != null && groups.Count > 0) { CustomContainers = new List <string>(groups.ToStringArray()); } else { CustomContainers = new List <string>(); } }
public CollectionBuildSettingEntry(PListDictionary dic) : base(dic) { //try to get array with new key var array = dic.ArrayValue(VALUE_KEY); //then try with old key if (array == null) { array = dic.ArrayValue(OLD_VALUE_KEY); } //get the values if (array != null) { Values = new List <string>(); Values.AddRange(array.ToStringArray()); } //if all failed see if it is a string (could be a custom string that is now known about. else { var strVal = dic.StringValue(VALUE_KEY); Values = StringUtils.StringListToList(strVal); } MergeMethod m; if (dic.EnumValue(MERGE_KEY, out m)) { Merge = m; } else { Merge = MergeMethod.Append; } }
void ExtractCommon(PListDictionary dic, out string settingName, out string displayName, out string group) { settingName = dic.StringValue(SETTING_KEY); displayName = dic.StringValue(DISPLAY_NAME_KEY); group = dic.StringValue(GROUP_KEY); }