Esempio n. 1
0
        private XCSettingItem CreateXCSettingItem(TXCSettingInfoType iType, List <string> iValue)
        {
            XCSettingItem item = CreateXCSettingItem(iType);

            if (item == null)
            {
                return(null);
            }
            item.Value.LValue = iValue;
            return(item);
        }
Esempio n. 2
0
        private XCSettingItem CreateXCSettingItem(TXCSettingInfoType iType, string iKey)
        {
            XCSettingItem item = CreateXCSettingItem(iType);

            if (item == null)
            {
                return(null);
            }
            item.Key = iKey;
            return(item);
        }
Esempio n. 3
0
        private XCSettingItem CreateXCSettingItem(TXCSettingInfoType iType, string iKey, List <string> iDebug, List <string> iRelease)
        {
            XCSettingItem item = CreateXCSettingItem(iType, iKey);

            if (item == null)
            {
                return(null);
            }
            item.Debug.LValue   = iDebug;
            item.Release.LValue = iRelease;
            return(item);
        }
Esempio n. 4
0
        private XCSettingItem CreateXCSettingItem(TXCSettingInfoType iType)
        {
            XCSettingItem item = new XCSettingItem();

            if (item == null)
            {
                return(null);
            }
            ++this.XCSettingItemNo;
            item.No   = this.XCSettingItemNo;
            item.Type = iType;
            return(item);
        }
Esempio n. 5
0
        /// <summary>
        /// 取得导出XCode工程用的设定信息一览.
        /// </summary>
        /// <returns>导出XCode工程用的设定信息一览.</returns>
        /// <param name="iProjectName">工程名.</param>
        public XCSettingItem[] GetXCSettingInfo(string iProjectName)
        {
            List <XCSettingItem> objRet = null;
            XCodeSettings        xcode  = this.GetXCodeSetting(iProjectName);

            if (xcode == null)
            {
                return(null);
            }
            objRet = new List <XCSettingItem> ();
            this.XCSettingItemNo = 0;

            // Replace Targets
            if (xcode.Settings.ReplaceTargets != null)
            {
                XCSettingItem item = this.CreateXCSettingItem(
                    TXCSettingInfoType.ReplaceSource, xcode.Settings.ReplaceTargets);
                if (item != null)
                {
                    objRet.Add(item);
                }
            }

            // FrameWorks
            if (xcode.Settings.FrameWorks != null)
            {
                XCSettingItem item = this.CreateXCSettingItem(
                    TXCSettingInfoType.FrameWorks, xcode.Settings.FrameWorks);
                if (item != null)
                {
                    objRet.Add(item);
                }
            }

            // libraries
            if (xcode.Settings.Libraries != null)
            {
                XCSettingItem item = this.CreateXCSettingItem(
                    TXCSettingInfoType.Libraries, xcode.Settings.Libraries);
                if (item != null)
                {
                    objRet.Add(item);
                }
            }

            // IncludeFiles
            if (xcode.Settings.IncludeFiles != null)
            {
                XCSettingItem item = this.CreateXCSettingItem(
                    TXCSettingInfoType.IncludeFiles, xcode.Settings.IncludeFiles);
                if (item != null)
                {
                    objRet.Add(item);
                }
            }

            // IncludeFolders
            if (xcode.Settings.IncludeFiles != null)
            {
                XCSettingItem item = this.CreateXCSettingItem(
                    TXCSettingInfoType.IncludeFolders, xcode.Settings.IncludeFolders);
                if (item != null)
                {
                    objRet.Add(item);
                }
            }

            // Linking
            if (xcode.Settings.Linking != null)
            {
                // OtherLinkerFlags
                if (xcode.Settings.Linking.OtherLinkerFlags != null)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.List,
                        xcode.Settings.Linking.OtherLinkerFlags.Key,
                        xcode.Settings.Linking.OtherLinkerFlags.Debug,
                        xcode.Settings.Linking.OtherLinkerFlags.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }
            }

            // Language
            if (xcode.Settings.Language != null)
            {
                // C++
                if (xcode.Settings.Language.Cpp != null)
                {
                    // Enable C++ Exceptions
                    if (xcode.Settings.Language.Cpp.EnableCppExceptions != null)
                    {
                        XCSettingItem item = this.CreateXCSettingItem(
                            TXCSettingInfoType.Bool,
                            xcode.Settings.Language.Cpp.EnableCppExceptions.Key,
                            xcode.Settings.Language.Cpp.EnableCppExceptions.Debug,
                            xcode.Settings.Language.Cpp.EnableCppExceptions.Release);
                        if (item != null)
                        {
                            objRet.Add(item);
                        }
                    }
                }

                // Objective-C
                if (xcode.Settings.Language.ObjectC != null)
                {
                    // Objective-C Automatic Reference Counting
                    if (xcode.Settings.Language.ObjectC.AutomaticReferenceCounting != null)
                    {
                        XCSettingItem item = this.CreateXCSettingItem(
                            TXCSettingInfoType.Bool,
                            xcode.Settings.Language.ObjectC.AutomaticReferenceCounting.Key,
                            xcode.Settings.Language.ObjectC.AutomaticReferenceCounting.Debug,
                            xcode.Settings.Language.ObjectC.AutomaticReferenceCounting.Release);
                        if (item != null)
                        {
                            objRet.Add(item);
                        }
                    }
                }
            }

            // Deployment
            if (xcode.Settings.Deployment != null)
            {
                // Deployment Postprocessing
                if (xcode.Settings.Deployment.DeploymentPostprocessing != null)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.Bool,
                        xcode.Settings.Deployment.DeploymentPostprocessing.Key,
                        xcode.Settings.Deployment.DeploymentPostprocessing.Debug,
                        xcode.Settings.Deployment.DeploymentPostprocessing.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }
            }

            // Build Options
            if (xcode.Settings.BuildOptions != null)
            {
                // Enable BitCode
                if (xcode.Settings.BuildOptions.EnableBitCode != null)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.Bool,
                        xcode.Settings.BuildOptions.EnableBitCode.Key,
                        xcode.Settings.BuildOptions.EnableBitCode.Debug,
                        xcode.Settings.BuildOptions.EnableBitCode.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }
            }

            // Signing
            if (xcode.Settings.Signing != null)
            {
                // Development Team
                if (xcode.Settings.Signing.DevelopmentTeam != null)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.String,
                        xcode.Settings.Signing.DevelopmentTeam.Key,
                        xcode.Settings.Signing.DevelopmentTeam.Debug,
                        xcode.Settings.Signing.DevelopmentTeam.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }
            }

            // User-Defined
            if (xcode.Settings.UserDefined != null)
            {
            }

            // Other Setting
            if (xcode.Settings.OtherSetting != null)
            {
                // Bool Targets
                foreach (XCBoolItem boolItem in xcode.Settings.OtherSetting.BoolTargets)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.Bool,
                        boolItem.Key, boolItem.Debug, boolItem.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }

                // String Targets
                foreach (XCStringItem stringItem in xcode.Settings.OtherSetting.StringTargets)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.String,
                        stringItem.Key, stringItem.Debug, stringItem.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }

                // List Targets
                foreach (XCListItem listItem in xcode.Settings.OtherSetting.ListTargets)
                {
                    XCSettingItem item = this.CreateXCSettingItem(
                        TXCSettingInfoType.List,
                        listItem.Key, listItem.Debug, listItem.Release);
                    if (item != null)
                    {
                        objRet.Add(item);
                    }
                }
            }

            if ((objRet == null) || (objRet.Count <= 0))
            {
                return(null);
            }
            else
            {
                return(objRet.OrderBy(o => o.No).ToArray());
            }
        }